Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/frontend/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ body {
position: fixed;
top: 0;
right: 0;
width: 700px;
width: 840px;
min-width: 400px;
max-width: 90vw;
height: 100vh;
Expand Down
39 changes: 22 additions & 17 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,29 +466,34 @@ function saveLLMConfig(config) {

function callLLM(config, conversation, totalMessages) {
return new Promise((resolve, reject) => {
const prompt = `Below is a coding session (first and last messages from ${totalMessages} total).
const systemPrompt = `<MAIN_ROLE>
You are a coding session summarizer. You read coding conversations and produce a single short concrete title describing what was done.
</MAIN_ROLE>

<MAIN_GUIDELINES>
- Write 5-15 words summarizing WHAT was concretely done
- Mention specific: technologies, files, features, bugs, configs
- Write in the SAME language the user used in the conversation
- Never write vague/generic descriptions
- Respond ONLY with JSON: {"title": "your summary"}

GOOD: "Фикс авторизации OAuth + рефактор middleware"
GOOD: "Добавил Cursor сессии, cmux терминал, WSL поддержку"
GOOD: "Настройка nginx reverse proxy для staging"
GOOD: "Fix Codex message count bug in grid view"
BAD: "Coding session about project" — too vague
BAD: "Bug fix and improvements" — no specifics
BAD: "Working with code" — meaningless
</MAIN_GUIDELINES>`;

const prompt = `Coding session: ${totalMessages} messages total. First and last messages below.

Write a SHORT summary (5-15 words) of what was CONCRETELY done in this session. Be specific: mention technologies, files, features, bugs — not vague descriptions. Write in the same language the user used.

Good examples:
- "Фикс авторизации через OAuth + рефактор middleware"
- "Добавил поддержку Cursor сессий и cmux терминала"
- "Настройка nginx reverse proxy для staging сервера"
- "Fix Codex message count bug in grid view"
- "Docker compose setup for multi-agent dashboard"

Bad examples (too vague):
- "Coding session about project setup"
- "Bug fix and improvements"
- "Working with code"

Conversation:
${conversation}`;

const body = JSON.stringify({
model: config.model,
messages: [
{ role: 'system', content: 'Write a short concrete summary of what was done. Respond ONLY with JSON: {"title": "your summary here"}' },
{ role: 'system', content: systemPrompt },
{ role: 'user', content: prompt },
],
response_format: { type: 'json_object' },
Expand Down
Loading