teleton 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2019,12 +2019,10 @@ ${options.context}`);
|
|
|
2019
2019
|
## \u26A0\uFE0F Memory Flush Warning
|
|
2020
2020
|
|
|
2021
2021
|
Your conversation context is approaching the limit and may be compacted soon.
|
|
2022
|
-
|
|
2022
|
+
**Always respond to the user's message first.** Then, if there's anything important worth preserving, consider using \`memory_write\` alongside your response:
|
|
2023
2023
|
|
|
2024
|
-
-
|
|
2025
|
-
-
|
|
2026
|
-
|
|
2027
|
-
After compaction, earlier messages may be summarized. Save important details before they're lost!
|
|
2024
|
+
- \`target: "persistent"\` for facts, lessons, contacts, decisions
|
|
2025
|
+
- \`target: "daily"\` for session notes, events, temporary context
|
|
2028
2026
|
`);
|
|
2029
2027
|
}
|
|
2030
2028
|
parts.push(`
|
|
@@ -3418,6 +3416,7 @@ ${statsContext}`;
|
|
|
3418
3416
|
let rateLimitRetries = 0;
|
|
3419
3417
|
let finalResponse = null;
|
|
3420
3418
|
const totalToolCalls = [];
|
|
3419
|
+
const accumulatedTexts = [];
|
|
3421
3420
|
while (iteration < maxIterations) {
|
|
3422
3421
|
iteration++;
|
|
3423
3422
|
console.log(`
|
|
@@ -3482,6 +3481,9 @@ ${statsContext}`;
|
|
|
3482
3481
|
throw new Error(`API error: ${errorMsg || "Unknown error"}`);
|
|
3483
3482
|
}
|
|
3484
3483
|
}
|
|
3484
|
+
if (response2.text) {
|
|
3485
|
+
accumulatedTexts.push(response2.text);
|
|
3486
|
+
}
|
|
3485
3487
|
const toolCalls = response2.message.content.filter((block) => block.type === "toolCall");
|
|
3486
3488
|
if (toolCalls.length === 0) {
|
|
3487
3489
|
console.log(`\u2705 Agent finished (no more tool calls)`);
|
|
@@ -3581,7 +3583,7 @@ ${statsContext}`;
|
|
|
3581
3583
|
`\u{1F4B0} Usage: ${usage.input} in, ${usage.output} out, ${usage.cacheRead} cache read | Cost: $${usage.cost.total.toFixed(4)}`
|
|
3582
3584
|
);
|
|
3583
3585
|
}
|
|
3584
|
-
let content = response.text;
|
|
3586
|
+
let content = accumulatedTexts.join("\n").trim() || response.text;
|
|
3585
3587
|
const telegramSendTools = [
|
|
3586
3588
|
"telegram_send_message",
|
|
3587
3589
|
"telegram_send_gif",
|
package/dist/cli/index.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/src/templates/SOUL.md
CHANGED
|
@@ -27,7 +27,7 @@ Be the assistant you'd actually want to talk to. Concise when needed, thorough w
|
|
|
27
27
|
|
|
28
28
|
## Continuity
|
|
29
29
|
|
|
30
|
-
Each session, you wake up fresh. **These files _are_ your memory.** Read them. Update them.
|
|
30
|
+
Each session, you wake up fresh. **These files _are_ your memory.** Read them. Update them only when you learn something genuinely worth remembering — not on every message.
|
|
31
31
|
|
|
32
32
|
- **MEMORY.md** = Curated long-term memory (important events, preferences, context)
|
|
33
33
|
- **memory/YYYY-MM-DD.md** = Daily session notes
|