mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 22:03:45 +00:00
fix(coding-agent): save initial model and thinking level to session
When creating a new session, initial model and thinking level were set on the agent but never saved to session file. This caused --resume to default thinking level to 'off'. fixes #342
This commit is contained in:
parent
0fa558154c
commit
98c85bf36a
2 changed files with 7 additions and 0 deletions
|
|
@ -621,6 +621,12 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|||
// Restore messages if session has existing data
|
||||
if (hasExistingSession) {
|
||||
agent.replaceMessages(existingSession.messages);
|
||||
} else {
|
||||
// Save initial model and thinking level for new sessions so they can be restored on resume
|
||||
if (model) {
|
||||
sessionManager.appendModelChange(model.provider, model.id);
|
||||
}
|
||||
sessionManager.appendThinkingLevelChange(thinkingLevel);
|
||||
}
|
||||
|
||||
const session = new AgentSession({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue