feat(agent): make model presets session-scoped (#4866)

This commit is contained in:
chengyongru
2026-07-23 00:38:49 +08:00
committed by GitHub
parent 66690fdb0c
commit c22efb5f7a
41 changed files with 1140 additions and 155 deletions
+2
View File
@@ -132,6 +132,7 @@ export async function listSessions(
updated_at: string | null;
title?: string;
preview?: string;
model_preset?: string | null;
run_started_at?: number | null;
workspace_scope?: WorkspaceScopePayload | null;
};
@@ -148,6 +149,7 @@ export async function listSessions(
updatedAt: s.updated_at,
title: s.title ?? "",
preview: s.preview ?? "",
modelPreset: s.model_preset ?? null,
runStartedAt: s.run_started_at ?? null,
workspaceScope: s.workspace_scope ?? null,
}));
+3
View File
@@ -245,6 +245,8 @@ export interface ChatSummary {
updatedAt: string | null;
title?: string;
preview: string;
/** Model preset persisted for this session; null means it still follows the global default. */
modelPreset?: string | null;
/** Unix epoch seconds when this session currently has a turn in flight. */
runStartedAt?: number | null;
workspaceScope?: WorkspaceScopePayload | null;
@@ -406,6 +408,7 @@ export interface SettingsPayload {
is_default: boolean;
model: string;
provider: string;
resolved_provider?: string | null;
max_tokens: number;
context_window_tokens: number;
temperature: number;