The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(settings-chat): an accepted card says the change is done; one item reads as one setting
purplef7b017bf9357
diff --git a/src/api/mcp/settings-tools.ts b/src/api/mcp/settings-tools.tsindex 7ecab986..4b5c79e6 100644--- a/src/api/mcp/settings-tools.ts+++ b/src/api/mcp/settings-tools.ts@@ -254,7 +254,7 @@ export async function executeSetSetting(args: ToolArgs, run?: AgentRunContext, sreturn `Error: ${entry.label} could not be changed: ${String(e)}. Nothing changed.`}audit(run, model, { ...item, outcome: 'applied', rawFrom: before, rawTo: value, tainted: verdict.taintedBy })- return `Changed: ${entry.label} ${item.from} → ${item.to}.${item.note ? ` ${item.note}` : ''} The user can undo it on the card.\n${markOf({ key: entry.key, from: before, to: value })}`+ return `Changed: ${entry.label} ${item.from} → ${item.to}.${item.note ? ` ${item.note}` : ''} The user accepted the card, the change is done. They can undo it on the card.\n${markOf({ key: entry.key, from: before, to: value })}`}export async function executeSetSettings(args: ToolArgs, run?: AgentRunContext, signal?: AbortSignal): Promise<string> {@@ -323,7 +323,7 @@ export async function executeSetSettings(args: ToolArgs, run?: AgentRunContext,lines.push(`Changed: ${c.entry.label} ${c.item.from} → ${c.item.to}.${c.item.note ? ` ${c.item.note}` : ''}`)marks.push(markOf({ key: c.entry.key, from: c.before, to: c.value }))}- if (marks.length) lines.push('The user can undo each on the card.', ...marks)+ if (marks.length) lines.push('The user accepted the card, these changes are done. They can undo each on the card.', ...marks)return lines.join('\n')}diff --git a/src/components/chat/SettingChangeCard.tsx b/src/components/chat/SettingChangeCard.tsxindex e0cf28b3..2b13bd18 100644--- a/src/components/chat/SettingChangeCard.tsx+++ b/src/components/chat/SettingChangeCard.tsx@@ -43,7 +43,7 @@ export function SettingChangeAsk({ req }: { req: SettingChangeRequest }) {const Icon = strong ? ShieldAlert : req.action ? Zap : SlidersHorizontalconst title = req.action? req.action.title- : items ? `Change these ${items.length} settings?` : 'Change this setting?'+ : items ? (items.length === 1 ? 'Change this setting?' : `Change these ${items.length} settings?`) : 'Change this setting?'return (<div role="group" aria-label={req.action ? 'Confirm an action of LU' : 'Change an app setting'} data-testid="setting-change-ask"data-risk={strong ? 'strong' : 'card'} className={`${strong ? boxStrong : box} px-3 py-2.5`}>diff --git a/src/components/chat/__tests__/a-settings-change-asks-on-a-card.test.tsx b/src/components/chat/__tests__/a-settings-change-asks-on-a-card.test.tsxindex 56c9923a..2c7b75ac 100644--- a/src/components/chat/__tests__/a-settings-change-asks-on-a-card.test.tsx+++ b/src/components/chat/__tests__/a-settings-change-asks-on-a-card.test.tsx@@ -29,8 +29,13 @@ const call = (over: Partial<AgentToolCall> = {}): AgentToolCall => ({})const q = (id: string) => document.querySelector(`[data-testid="${id}"]`) as HTMLElement | nullconst threshold = () => useSettingsStore.getState().settings.autoCompactThreshold+// The tool loads its stores lazily (C60), so the first card can take a real+// moment on a cold import: wait on time, not on a count of ticks.const waitForCard = async () => {- for (let i = 0; i < 50 && useSettingsConfirmStore.getState().queue.length === 0; i++) await act(async () => {})+ const until = Date.now() + 4_000+ while (useSettingsConfirmStore.getState().queue.length === 0 && Date.now() < until) {+ await act(async () => { await new Promise((r) => setTimeout(r, 10)) })+ }}beforeEach(() => {diff --git a/src/lib/__tests__/keine-deutschen-saetze-in-der-oberflaeche.test.ts b/src/lib/__tests__/keine-deutschen-saetze-in-der-oberflaeche.test.tsindex 4ae186df..d571b994 100644--- a/src/lib/__tests__/keine-deutschen-saetze-in-der-oberflaeche.test.ts+++ b/src/lib/__tests__/keine-deutschen-saetze-in-der-oberflaeche.test.ts@@ -66,6 +66,7 @@ const DEUTSCH_MIT_GRUND: Record<string, string> = {'lib/create/media-wish.ts': 'Deutsche Medienwuensche, gegen die getippte Saetze gelesen werden (aus dem Web gespiegelt).','lib/create/chat-control.ts': 'Muster, gegen die der Schlusstext eines Modells gelesen wird, auch der deutsche (aus dem Web gespiegelt). Nichts davon wird angezeigt.','lib/explicit-search.ts': 'Deutsche Suchauftraege, gegen die getippte Saetze gelesen werden.',+ 'lib/settings-tool-names.ts': 'Deutsche Wendungen fuer LUs Aussehen, gegen die getippte Saetze gelesen werden (C60). Nichts davon wird angezeigt.',}/** Jede .ts und .tsx unter den Ordnern, ohne die Testbaeume. */