mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-12 00:12:30 +02:00
fix: sanitize SessionStart session summaries (#710)
This commit is contained in:
parent
40f18885b1
commit
35071150b7
2 changed files with 32 additions and 3 deletions
|
|
@ -40,11 +40,10 @@ async function main() {
|
|||
log(`[SessionStart] Latest: ${latest.path}`);
|
||||
|
||||
// Read and inject the latest session content into Claude's context
|
||||
const content = readFile(latest.path);
|
||||
const content = stripAnsi(readFile(latest.path));
|
||||
if (content && !content.includes('[Session context goes here]')) {
|
||||
// Only inject if the session has actual content (not the blank template)
|
||||
// Strip ANSI escape codes that may have leaked from terminal output (#642)
|
||||
output(`Previous session summary:\n${stripAnsi(content)}`);
|
||||
output(`Previous session summary:\n${content}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue