Skip to content

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.

merge: C60 (feat/310-settings-chat f7b017bf9) into integ/310

purple17d67b053d68
diff --cc src/api/__tests__/tool-registry.test.ts
index eb00af2d,f620d97c..1ba2d888
--- a/src/api/__tests__/tool-registry.test.ts
+++ b/src/api/__tests__/tool-registry.test.ts
@@@ -43,10 -42,12 +43,15 @@@ describe('AGENT_TOOL_DEFS', () =>
// Prompt, der nicht nach Einstellungen fragt: im Chat und in Agent nur
// ueber SETTINGS_KEYWORDS, in Code hinter dem Tor (GATE_KEYWORDS).
//
+ // 3.1.0 (P-L): +1, web_research. Es ersetzt fuer kleine Modelle das Paar
+ // web_search+web_fetch in einem Aufruf (lib/tool-selection.ts). Dazu die
+ // fuenf Werkzeuge des LU-Browsers, nur auf macOS und Windows registriert.
- expect(AGENT_TOOL_DEFS).toHaveLength(20 + (browserExistsHere() ? BROWSER_TOOL_NAMES.length : 0))
+ // 3.1.0 (C60): +5, set_settings, lu_models, lu_service, lu_download und
+ // lu_open_settings. LU bedient sich selbst; eine Aktion (Modell, Dienst,
+ // Download) hat Nebenwirkungen und eine eigene Karte und passt deshalb
+ // nicht in set_setting. Alle fuenf stehen hinter demselben Tor wie
+ // get_settings und fahren nur auf einer Nachricht ueber LU selbst mit.
- expect(AGENT_TOOL_DEFS).toHaveLength(24)
++ expect(AGENT_TOOL_DEFS).toHaveLength(25 + (browserExistsHere() ? BROWSER_TOOL_NAMES.length : 0))
})
const expectedTools = [
@@@ -101,11 -101,12 +106,14 @@@
// 3.0.8 (A11): get_settings liest nur, set_setting fragt mit seiner
// eigenen Karte (alt -> neu), auch im Bypass. Eine zweite Rueckfrage
// davor fragte doppelt, wie bei create_order.
+ // 3.1.0 (P-L): web_research and the browser read only, like web_fetch.
+ // 3.1.0 (C60): die fuenf Selbststeuerungswerkzeuge aus demselben Grund
+ // wie set_setting: jede Aenderung fragt mit ihrer eigenen Karte.
expect(autoNames).toEqual([
+ ...(browserExistsHere() ? [...BROWSER_TOOL_NAMES] : []),
- 'check_tasks', 'get_settings', 'message_agent', 'set_setting', 'todo_write', 'web_fetch', 'web_research', 'web_search',
+ 'check_tasks', 'get_settings', 'lu_download', 'lu_models', 'lu_open_settings', 'lu_service', 'message_agent',
- 'set_setting', 'set_settings', 'todo_write', 'web_fetch', 'web_search',
- ])
++ 'set_setting', 'set_settings', 'todo_write', 'web_fetch', 'web_research', 'web_search',
+ ].sort())
})
it('confirm-permission tools include file ops, code, shell, image, workflow, screenshot, delegate_task, sprint A/B/C tools', () => {
diff --cc src/api/mcp/__tests__/mobile-tool-filter.test.ts
index d4bcd82d,06035877..549912f0
--- a/src/api/mcp/__tests__/mobile-tool-filter.test.ts
+++ b/src/api/mcp/__tests__/mobile-tool-filter.test.ts
@@@ -46,13 -45,12 +46,14 @@@ function registryHere(): ToolRegistry
const GONE = ['shell_execute', 'pr_resume', 'screenshot', 'image_generate', 'video_generate']
/** The settings tools of A11 (3.0.8): desktop only, see MOBILE_UNBUILT_TOOLS. */
- const SETTINGS = ['get_settings', 'set_setting']
+ // A11 (3.0.8) and C60 (3.1.0): LU's own settings and actions, desktop only.
+ const SETTINGS = ['get_settings', 'set_setting', 'set_settings', 'lu_models', 'lu_service', 'lu_download', 'lu_open_settings']
const STAYS = [
- 'todo_write', 'web_search', 'web_fetch', 'file_read', 'file_write', 'file_edit', 'file_list',
+ 'todo_write', 'web_research', 'web_search', 'web_fetch', 'file_read', 'file_write', 'file_edit', 'file_list',
'file_search', 'run_workflow', 'delegate_task', 'check_tasks', 'message_agent',
]
+/** The LU browser (P-L, 3.1.0): macOS and Windows desktop only. */
+const BROWSER = ['browser_open', 'browser_snapshot', 'browser_scroll', 'browser_click_link', 'browser_screenshot']
const DESKTOP_WORDS = /this computer|shell_execute|image_generate|video_generate|PowerShell|drive letter|uname|Get-ComputerInfo|ComfyUI|Finder/
afterEach(() => { vi.unstubAllGlobals() })
diff --cc src/components/chat/ToolCallBlock.tsx
index 52debfb0,0314c465..fd501c48
--- a/src/components/chat/ToolCallBlock.tsx
+++ b/src/components/chat/ToolCallBlock.tsx
@@@ -13,13 -13,11 +13,15 @@@ import { DiffView } from './DiffView
import { ScreenTaskSteps } from './ScreenTaskSteps'
import { ScreenShotStrip } from '../computer/ScreenShotStrip'
import { ComputerChatPermission, useComputerChatAsk } from '../computer/ComputerChatPermission'
- import { SettingChangeAsk, SettingChangeDone } from './SettingChangeCard'
+ import { SettingChangeAsk, SettingChangeDone, SelfControlDone } from './SettingChangeCard'
+import { WebSourceCards, WebUrlAsk } from './WebSourceCards'
+import { BrowserControls, BrowserShot } from './BrowserControls'
+import { parseSourceCards, stripSourcesMarker } from '../../lib/web-evidence'
+import { useWebUrlConfirmStore, pendingUrlForCall } from '../../stores/webUrlConfirmStore'
import { useSettingsConfirmStore, pendingForCall } from '../../stores/settingsConfirmStore'
- import { parseSettingChange } from '../../api/mcp/settings-tools'
+ import { parseSettingChanges } from '../../api/mcp/settings-tools'
+ import { parseSelfControlAction } from '../../api/mcp/self-control-defs'
+ import { isSelfControlToolName } from '../../lib/settings-tool-names'
import { useChatStore } from '../../stores/chatStore'
import { commandIcon } from '../../lib/shell-command-classify'
import { requestGenerationCancel } from '../../api/vram-handoff'
@@@ -279,15 -268,12 +281,17 @@@ function ToolCallBlockImpl({ toolCall,
const isFailed = toolCall.status === 'failed' || toolCall.status === 'rejected'
// The first use of computer control in a chat waits here for the user's yes.
const chatAsk = useComputerChatAsk(toolCall.toolName, isRunning, useChatStore((s) => s.activeConversationId))
- // A11: a settings change waits here for Accept, and stays with Undo.
- const isSetSetting = toolCall.toolName === 'set_setting'
+ // A11 / C60: a change LU makes to itself waits here for Accept, and stays
+ // with Undo: one setting, several on one card, or an action.
+ const isSetSetting = isSelfControlToolName(toolCall.toolName) && toolCall.toolName !== 'get_settings' && toolCall.toolName !== 'lu_open_settings'
const settingAsk = useSettingsConfirmStore((s) => (isSetSetting && isRunning ? pendingForCall(s.queue, toolCall.id) : null))
- const settingChange = isSetSetting && toolCall.status === 'completed' ? parseSettingChange(toolCall.result) : null
+ const settingChanges = isSetSetting && toolCall.status === 'completed' ? parseSettingChanges(toolCall.result) : []
+ const selfAction = isSetSetting && toolCall.status === 'completed' ? parseSelfControlAction(toolCall.result) : null
+ // P-L: a web address the model made up waits here for Open; the sources of
+ // a web tool stay visible under it, from the tool result and not the model.
+ const isWebTool = WEB_URL_TOOLS.has(toolCall.toolName)
+ const urlAsk = useWebUrlConfirmStore((s) => (isWebTool && isRunning ? pendingUrlForCall(s.queue, toolCall.id) : null))
+ const sourceCards = isWebTool && toolCall.status === 'completed' ? parseSourceCards(toolCall.result) : []
// Real cancel (2026-06-16): only image/video generation supports a true
// abort (ComfyUI /interrupt + loop abort). Local "cancelling" state flips the
// mini button to a "stopping…" indicator the moment it's clicked.
@@@ -450,11 -436,8 +454,12 @@@
)}
{chatAsk && <div className="ml-3.5 pl-2"><ComputerChatPermission ask={chatAsk} /></div>}
{settingAsk && <div className="ml-3.5 pl-2"><SettingChangeAsk req={settingAsk} /></div>}
- {settingChange && <div className="ml-3.5 pl-2"><SettingChangeDone change={settingChange} /></div>}
+ {settingChanges.map((c) => <div key={c.key} className="ml-3.5 pl-2"><SettingChangeDone change={c} /></div>)}
+ {selfAction && <div className="ml-3.5 pl-2"><SelfControlDone action={selfAction} /></div>}
+ {urlAsk && <div className="ml-3.5 pl-2"><WebUrlAsk req={urlAsk} /></div>}
+ {sourceCards.length > 0 && <div className="ml-3.5 pl-2"><WebSourceCards cards={sourceCards} /></div>}
+ {toolCall.toolName === 'browser_screenshot' && <div className="ml-3.5 pl-2"><BrowserShot toolCallId={toolCall.id} /></div>}
+ {toolCall.toolName.startsWith('browser_') && <div className="ml-3.5 pl-2"><BrowserControls live={isRunning} /></div>}
{isRunning && toolCall.toolName === 'computer_task' && <ScreenTaskSteps />}
{(toolCall.toolName === 'computer_task' || toolCall.toolName === 'computer_use') && (
<ScreenShotStrip callId={toolCall.id} className="ml-3.5 mb-1 pl-2" />
diff --cc src/lib/settings-catalog.ts
index a7182cdb,912edc05..cbfacee7
--- a/src/lib/settings-catalog.ts
+++ b/src/lib/settings-catalog.ts
@@@ -247,10 -326,8 +326,11 @@@ export const CATALOG: readonly CatalogE
}),
e('codexConfirmShell', 'Ask before commands', 'agent', 'Coding agent asks before running a command.', bool(), {
allowed: 'on (off only by hand)', safe: (v) => v === true, safeWhy: 'Turning the question off is the user\'s choice',
+ lockOverride: 'One way only, towards asking before a shell command.',
}),
+ e('webStrictUrls', 'Ask before unknown web addresses', 'agent', 'Web tools ask before opening an address that neither you nor a web result gave.', bool(), {
+ allowed: 'on (off only by hand)', safe: (v) => v === true, safeWhy: 'Turning the question off is the user\'s choice',
+ }),
e('codexCloudConfirmOptIn', 'Ask before cloud commands', 'agent', 'Ask before a cloud model runs a command.', bool(), {
allowed: 'on (off only by hand)', safe: (v) => v === true, safeWhy: 'Turning the question off is the user\'s choice',
}),
diff --cc src/lib/tool-selection.ts
index 8ad253d9,f8078c76..ec60361b
--- a/src/lib/tool-selection.ts
+++ b/src/lib/tool-selection.ts
@@@ -287,8 -284,8 +289,9 @@@ export const EMBEDDING_ROUTING_THRESHOL
import type { EmbeddingFn } from '../api/agents/embedding-router'
import { REA_SERVER_ID, reaToolsFor } from './plugins/rea-tools'
+ import { SELF_CONTROL_TOOL_NAMES, settingsGateWords } from './settings-tool-names'
import { selectToolsByEmbedding } from '../api/agents/embedding-router'
+import { isMobile } from './device-kind'
/**
* Select relevant tools based on user message content.
diff --cc src/mobile/boot/__tests__/settings-durable.test.ts
index 7d555fee,f8a5f9c6..3f33eca5
--- a/src/mobile/boot/__tests__/settings-durable.test.ts
+++ b/src/mobile/boot/__tests__/settings-durable.test.ts
@@@ -111,7 -110,7 +111,8 @@@ describe('which keys are kept', () =>
'lu-local-api': 'desktop only',
'locally-uncensored-computer': 'desktop only: the settings of computer use, which the phone does not have',
'lu-neuron-tweaker': 'desktop only (3.0.9, P11): the Neuron tweaker steers LU Engine, which the phone does not have',
+ 'lu-neuron-window': 'desktop only (3.1.0): where the Neurons window stood, a window the phone does not have',
+ 'lu-settings-audit': 'desktop only (3.1.0, C60): what the agent changed in the desktop app; the phone has no self-control tools',
'LU-create-orders': 'the orders of Create in chat, which is locked on the phone until it has the order card',
'lu-mobile-switched-under-answer': 'a note per answer; lost, the chat says "interrupted" instead of "you switched models"',
'lu-mobile-settings-stamp': 'the stamp of this copy itself; in the native backup it dates the settings there (L5)',