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.

fix(agent): the intent check reads what the user typed, the workflow report is LU's own (C60 S3, with S5)

purplef45569da11ba
diff --git a/src/lib/run-taint.ts b/src/lib/run-taint.ts
index b27558c9..eba21342 100644
--- a/src/lib/run-taint.ts
+++ b/src/lib/run-taint.ts
@@ -20,6 +20,11 @@ const OWN_OUTPUT_TOOLS: ReadonlySet<string> = new Set([
'todo_write', 'file_write', 'file_edit',
'get_settings', 'set_setting', 'set_settings', 'lu_models', 'lu_service', 'lu_download', 'lu_open_settings',
'image_generate', 'video_generate', 'create_options', 'create_order',
+ // C60 S5: LU's own structured workflow report. Names from a source are cut
+ // to letters, digits and ._-+()/ (at most 80), descriptions, notes and
+ // prompt texts never reach the model, only their length (workflow-tools.ts,
+ // tested there).
+ 'workflow_find', 'workflow_inspect', 'workflow_install', 'workflow_assign',
])
/** True when this tool's output is content from outside LU. */
diff --git a/src/lib/self-control-policy.ts b/src/lib/self-control-policy.ts
index 7bc1cabc..aafb706f 100644
--- a/src/lib/self-control-policy.ts
+++ b/src/lib/self-control-policy.ts
@@ -59,7 +59,10 @@ export function turnTextOf(conversationId: string | null): TurnText | null {
if (u < 0) return null
let a: Message | undefined
for (let i = u - 1; i >= 0; i--) if (msgs[i].role === 'assistant') { a = msgs[i]; break }
- return { user: msgs[u].content ?? '', previousAssistant: textOf(a) }
+ // What the user typed: with an attached file or a slash command, `content`
+ // carries the file or the command's template, foreign words that could
+ // satisfy the intent check (found by S5, 09.11.2026).
+ return { user: msgs[u].displayContent ?? msgs[u].content ?? '', previousAssistant: textOf(a) }
}
export type PolicyVerdict =