Skip to content

Commit 0dfdf64

Browse files
Merge pull request #8 from ArtiBorisevich/readme-fix
[dev] upd readme
2 parents c549b4b + 5a5a9f4 commit 0dfdf64

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,19 @@ the user's request provided via the chatbot, is sent to LLM, which then calls a
3030
1. **Function calling with LLM**
3131

3232
- The backend uses the function calling feature of the OpenAI API.
33-
- Available functions are defined in `backend/schemaList`.js.
33+
- Available functions are defined in `backend/schemaList`.ts.
3434
- Each function has a schema describing the parameters the model can return.
3535

3636
2. **Client-side command runner**
3737

38-
- On the frontend, the returned tool calls are handled in `frontend/src/command-runner.js`
38+
- On the frontend, the returned tool calls are handled in `frontend/src/command-runner.ts`
3939

40-
3. **System prompt and context**
40+
3. **System prompt and history management**
4141

42-
- The LLM only receives a system prompt with project generation rules, the latest user message, and a current snapshot of tasks/links in the project.
43-
- The model does not keep track of earlier conversation history, so each command is interpreted independently.
42+
- Per-client session storage: Each Socket.IO connection maintains its own conversation history using `sessionMessagesByClient` Map.
43+
- Smart history trimming: The `trimHistory()` function intelligently groups messages into "blocks" (user/assistant pairs + complete tool call cycles) and keeps only the most recent `MAX_MESSAGES` blocks to stay within token limits.
44+
- Dynamic system prompt: `generateSystemPrompt()` creates a fresh system message for each new session.
45+
- Tool call lifecycle: Assistant tool_calls are grouped with ALL their corresponding tool results before trimming, preserving complete execution cycles for the LLM context.
4446

4547
4. **Models and limitations**
4648

0 commit comments

Comments
 (0)