mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 10:03:27 +00:00
fix(coding-agent): preserve session thinking for scoped model cycling
closes #1789
This commit is contained in:
parent
4cb1a56b53
commit
e64cd15c25
6 changed files with 22 additions and 17 deletions
|
|
@ -23,7 +23,7 @@ interface ModelItem {
|
|||
|
||||
interface ScopedModelItem {
|
||||
model: Model<any>;
|
||||
thinkingLevel: string;
|
||||
thinkingLevel?: string;
|
||||
}
|
||||
|
||||
type ModelScope = "all" | "scoped";
|
||||
|
|
|
|||
|
|
@ -3307,13 +3307,11 @@ export class InteractiveMode {
|
|||
// Helper to update session's scoped models (session-only, no persist)
|
||||
const updateSessionModels = async (enabledIds: Set<string>) => {
|
||||
if (enabledIds.size > 0 && enabledIds.size < allModels.length) {
|
||||
// Use current session thinking level, not settings default
|
||||
const currentThinkingLevel = this.session.thinkingLevel;
|
||||
const newScopedModels = await resolveModelScope(Array.from(enabledIds), this.session.modelRegistry);
|
||||
this.session.setScopedModels(
|
||||
newScopedModels.map((sm) => ({
|
||||
model: sm.model,
|
||||
thinkingLevel: sm.thinkingLevel ?? currentThinkingLevel,
|
||||
thinkingLevel: sm.thinkingLevel,
|
||||
})),
|
||||
);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue