diff --git a/tools/ui/src/lib/stores/conversations/preferences.svelte.ts b/tools/ui/src/lib/stores/conversations/preferences.svelte.ts index 8106a0d85a..5e75f1d7c6 100644 --- a/tools/ui/src/lib/stores/conversations/preferences.svelte.ts +++ b/tools/ui/src/lib/stores/conversations/preferences.svelte.ts @@ -49,12 +49,20 @@ export interface ConversationsPreferencesHost { applyConversationUpdate(id: string, updates: Partial): void; } -/** Effective disabled tool keys: conversation row, falling back to defaults. */ +/** + * Effective disabled tool keys: the active conversation row, or the global + * defaults when there is no conversation. An existing row with an unset + * field has an empty policy, not a fallback to defaults. + */ function buildDisabledTools(conv: DatabaseConversation | null): Set { return new Set(conv ? (conv.disabledTools ?? []) : [...toolsStore.disabledTools]); } -/** Effective disabled tool categories: conversation row, falling back to defaults. */ +/** + * Effective disabled tool categories: the active conversation row, or the + * global defaults when there is no conversation. An existing row with an + * unset field has an empty policy, not a fallback to defaults. + */ function buildDisabledToolCategories(conv: DatabaseConversation | null): Set { return new Set( conv ? (conv.disabledToolCategories ?? []) : [...toolsStore.disabledToolCategories] @@ -184,6 +192,14 @@ export class ConversationPreferences { this.pendingCwd = null; } + /** + * + * + * Working Directory + * + * + */ + /** * Sets the working directory for the active conversation. Pass `null` or * an empty string to clear it, which restores the picker's empty state. @@ -217,6 +233,14 @@ export class ConversationPreferences { this.pendingCwd = null; } + /** + * + * + * Reasoning Effort + * + * + */ + /** * Sets the reasoning effort for the active conversation. * If no conversation exists, stores the global default. @@ -268,14 +292,6 @@ export class ConversationPreferences { await this.toggleTool(toolsStore.getMcpServerToolsKey(serverId)); } - /** - * - * - * Reasoning Effort - * - * - */ - async toggleTool(key: string): Promise { const conv: DatabaseConversation | null = this.host.activeConversation; @@ -305,14 +321,6 @@ export class ConversationPreferences { await DatabaseService.updateConversation(conv.id, { disabledToolCategories }); } - /** - * - * - * Working Directory - * - * - */ - private async persistDisabledTools(disabled: Set): Promise { const conv = this.host.activeConversation;