mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-22 05:00:41 +00:00
Fix session persistence: flush all buffered entries on first assistant message
- SessionManager: add flushed flag, _persist() flushes all entries when first assistant seen - SessionManager: reset() now creates session header - MomSessionManager: same pattern, remove pendingEntries/sessionInitialized/startSession/shouldInitializeSession
This commit is contained in:
parent
974c8f57e5
commit
184c648334
3 changed files with 62 additions and 86 deletions
|
|
@ -411,12 +411,7 @@ function createRunner(sandboxConfig: SandboxConfig, channelId: string, channelDi
|
|||
const systemPrompt = buildSystemPrompt(workspacePath, channelId, memory, sandboxConfig, [], [], skills);
|
||||
|
||||
// Create session manager and settings manager
|
||||
// Pass model info so new sessions get a header written immediately
|
||||
const sessionManager = new MomSessionManager(channelDir, {
|
||||
provider: model.provider,
|
||||
id: model.id,
|
||||
thinkingLevel: "off",
|
||||
});
|
||||
const sessionManager = new MomSessionManager(channelDir);
|
||||
const settingsManager = new MomSettingsManager(join(channelDir, ".."));
|
||||
|
||||
// Create agent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue