Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
feat(ok): show the command the permission gate is asking you to approve (PRD-8027) (#4455)
Abraham4a1591d40063
diff --git a/.changeset/permission-gate-shows-the-command.md b/.changeset/permission-gate-shows-the-command.mdnew file mode 100644index 000000000..a00e98a43--- /dev/null+++ b/.changeset/permission-gate-shows-the-command.md@@ -0,0 +1,7 @@+---+"@inkeep/open-knowledge": patch+---++When an agent asks to run a shell command, the permission gate in the **Agents panel** now shows the command it is asking you to approve, for agents that send the command with the request (Claude Code and Codex both do). Before, the gate showed only the agent's one-line description of what it wanted to do, while the command was truncated in the row above and the full text sat in a collapsed `Input` block as JSON. Approving meant trusting a sentence the agent wrote about itself.++The command is read from the permission request itself, so it shows even when the request arrives before the tool call it gates, and it cannot change while the gate waits for your answer. A one-line command is laid out one statement per line: a `;`, `&&` or `||` ends a line and a long pipeline continues on an indented one, without splitting inside quotes, `$( )`, backticks, `${ }`, escapes or comments. A command that already spans several lines, such as a heredoc, is shown exactly as written. A long command scrolls inside the gate rather than being cut short, and hidden characters such as bidirectional overrides or zero-width spaces are shown as `⟨U+…⟩` codes with a warning.diff --git a/packages/app/src/components/acp/ThreadView.dom.test.tsx b/packages/app/src/components/acp/ThreadView.dom.test.tsxindex 404507b2d..3e30be518 100644--- a/packages/app/src/components/acp/ThreadView.dom.test.tsx+++ b/packages/app/src/components/acp/ThreadView.dom.test.tsx@@ -1,4 +1,4 @@-import type { ThreadInfo } from '@inkeep/open-knowledge-core/acp/thread-protocol';+import type { ThreadEvent, ThreadInfo } from '@inkeep/open-knowledge-core/acp/thread-protocol';import {act,cleanup,@@ -113,6 +113,7 @@ const { resetStagedThreadDrafts, subscribeStagedThreadDraft } = await import();const { launchAgentThread } = await import('@/lib/acp/launch-agent-thread');const { ThreadResumeError } = await import('@/lib/acp/thread-client');+const { buildThreadRenderModel } = await import('@/lib/acp/thread-event-model');const { agentSettingsKey, getRememberedAgentConfig, getRememberedAgentMode } = await import('@/lib/acp/agent-settings-store');@@ -159,12 +160,161 @@ function toolCall(overrides?: Partial<Extract<RenderedItem, { kind: 'tool_call'};}+describe('ThreadView permission gate shows the command', () => {+ const COMPOUND =+ 'ps -p $$ -o pid,command 2>/dev/null | tail -n +1; echo "----unavailable----"; curl -s -o /dev/null -w "%{http_code}" --max-time 5 http://localhost:5173/ 2>&1 || echo "curl failed"';++ const request = (toolCall: Record<string, unknown>): ThreadEvent => ({+ kind: 'permission_request',+ requestId: 'r1',+ toolCall: {+ toolCallId: 'tc1',+ title: 'Run a diagnostic',+ kind: 'execute',+ ...toolCall,+ } as never,+ options: [{ optionId: 'yes', name: 'Allow', kind: 'allow_once' }],+ ts: 3,+ });+ const call = (update: Record<string, unknown>): ThreadEvent => ({+ kind: 'session_update',+ update: {+ sessionUpdate: 'tool_call',+ toolCallId: 'tc1',+ title: 'Run a diagnostic',+ kind: 'execute',+ status: 'pending',+ ...update,+ } as never,+ ts: 2,+ });+ const showGate = (...events: ThreadEvent[]): void => {+ model = buildThreadRenderModel([{ kind: 'turn_started', ts: 1 }, ...events], null);+ render(<ThreadView info={makeInfo({ status: 'awaiting_permission' })} />);+ };+ const commandLines = (): string[] =>+ [...screen.getByTestId('agent-thread-permission-command').querySelectorAll('code > span')].map(+ (row) => row.textContent ?? '',+ );++ test('the gate shows the command it is asking you to approve, not just the description', () => {+ showGate(+ call({ rawInput: { command: COMPOUND } }),+ request({+ title: 'Run a long compound diagnostic',+ rawInput: { command: COMPOUND, description: 'Run a long compound diagnostic' },+ }),+ );++ const body = screen.getByTestId('agent-thread-permission-command');+ expect(body.textContent).toContain('ps -p $$');+ expect(body.textContent).toContain('curl failed');+ });++ test('a request that arrives before its call shows the command it carries', () => {+ showGate(request({ rawInput: { command: 'ls -la' } }));++ expect(commandLines()).toEqual(['ls -la']);+ });++ test('a Codex exec approval, which lands before its call, shows the script inside its shell wrapper', () => {+ showGate(+ request({+ rawInput: {+ call_id: 'tc1',+ command: ['/bin/zsh', '-lc', 'ls; pwd'],+ cwd: '/repo',+ parsed_cmd: [],+ },+ }),+ );++ expect(commandLines()).toEqual(['ls;', 'pwd']);+ });++ test("the gate shows the request's own command, not the one on the call it gates", () => {+ showGate(+ call({ rawInput: { command: 'echo from-call' } }),+ request({ rawInput: { command: 'echo from-request' } }),+ );++ expect(commandLines()).toEqual(['echo from-request']);+ });++ test('each statement lands on its own line rather than one unreadable run', () => {+ showGate(request({ rawInput: { command: 'one && two; three' } }));++ expect(commandLines()).toEqual(['one &&', 'two;', 'three']);+ });++ test('a long command stays whole, with nothing to expand, while the gate waits for an answer', () => {+ const long = Array.from({ length: 10 }, (_, index) => `step${index}`).join('; ');+ showGate(request({ rawInput: { command: long } }));++ expect(commandLines()).toHaveLength(10);+ expect(commandLines().at(-1)).toBe('step9');+ expect(+ within(screen.getByTestId('agent-thread-permission-command')).queryByRole('button'),+ ).toBeNull();+ });++ test('the command reads left to right as code and is never auto-translated, whatever the page direction', () => {+ document.documentElement.dir = 'rtl';+ try {+ showGate(request({ rawInput: { command: 'one && two' } }));++ const pre = screen.getByTestId('agent-thread-permission-command').querySelector('pre');+ expect(pre?.getAttribute('dir')).toBe('ltr');+ expect(pre?.getAttribute('translate')).toBe('no');+ expect(pre?.querySelector('code')?.textContent).toBe('one &&\ntwo');+ expect(pre?.querySelector('div')).toBeNull();+ } finally {+ document.documentElement.dir = '';+ }+ });++ test('the button that takes focus is described by the command, inside a group named by the request', () => {+ showGate(request({ title: 'Run the tests', rawInput: { command: 'npm test' } }));++ const gate = screen.getByRole('group', { name: 'Run the tests' });+ expect(+ within(gate).getByRole('button', { name: 'Allow', description: 'npm test' }),+ ).toBeTruthy();+ });++ test('hidden characters in the command are spelled out, with a warning', () => {+ showGate(request({ rawInput: { command: 'echo safe\u202e; rm -rf ~' } }));++ const block = screen.getByTestId('agent-thread-permission-command');+ expect(block.textContent).toContain('⟨U+202E⟩');+ expect(block.textContent).not.toContain('\u202e');+ expect(within(block).getByText(/hidden characters/)).toBeTruthy();+ });++ test('a non-execute tool is never rendered as a shell command', () => {+ const renameInput = { command: 'rename; this is not a shell command' };+ showGate(+ call({ kind: 'edit', rawInput: renameInput }),+ request({ kind: 'edit', rawInput: renameInput }),+ );++ expect(screen.queryByTestId('agent-thread-permission-command')).toBeNull();+ });++ test('a permission with no shell command behind it shows no command block', () => {+ showGate(request({ toolCallId: undefined }));++ expect(screen.queryByTestId('agent-thread-permission-command')).toBeNull();+ });+});+function permission(overrides?: Partial<Extract<RenderedItem, { kind: 'permission' }>>) {return {kind: 'permission' as const,requestId: 'r1',title: 'Run npm test?',toolKind: 'execute',+ command: null,options: [{ optionId: 'yes', name: 'Allow', kind: 'allow_once' }],resolved: null,toolCallId: null,diff --git a/packages/app/src/components/acp/ThreadView.tsx b/packages/app/src/components/acp/ThreadView.tsxindex 48493effb..23cc185a2 100644--- a/packages/app/src/components/acp/ThreadView.tsx+++ b/packages/app/src/components/acp/ThreadView.tsx@@ -125,6 +125,7 @@ import {import { computeDiffRows } from '@/lib/acp/inline-diff';import { launchAgentThread } from '@/lib/acp/launch-agent-thread';import { isPermissiveMode } from '@/lib/acp/permissive-mode';+import { formatShellCommand, revealHiddenCharacters } from '@/lib/acp/shell-command-format';import { parseSignInOutput, shortenUrl } from '@/lib/acp/sign-in-output';import { renderTerminalText } from '@/lib/acp/terminal-text';import {@@ -2892,6 +2893,42 @@ function RawInputBlock({ text }: { text: string }): ReactNode {);}+function ShellCommandBlock({ id, command }: { id: string; command: string }): ReactNode {+ const { t } = useLingui();+ const lines = formatShellCommand(command).map((line) => ({+ ...line,+ shown: revealHiddenCharacters(line.text),+ }));+ const concealed = lines.some((line) => line.shown !== line.text);+ return (+ <div className="mb-1.5" data-testid="agent-thread-permission-command">+ <pre+ id={id}+ dir="ltr"+ translate="no"+ // biome-ignore lint/a11y/noNoninteractiveTabindex: keyboard-focusable scroll container — a long command scrolls inside this bounded box, and Safari leaves overflow:auto elements out of the tab order.+ tabIndex={0}+ className="max-h-64 overflow-auto whitespace-pre-wrap break-words rounded bg-muted/50 px-2 py-1 text-start font-mono text-[11px] leading-relaxed"+ >+ <code>+ {lines.map((line, index) => (+ // biome-ignore lint/suspicious/noArrayIndexKey: shell lines are positional+ <Fragment key={index}>+ {index > 0 ? '\n' : null}+ <span className={line.continuation ? 'ps-4' : undefined}>{line.shown}</span>+ </Fragment>+ ))}+ </code>+ </pre>+ {concealed ? (+ <p className="mt-1 text-amber-700 text-xs dark:text-amber-400">+ {t`This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩.`}+ </p>+ ) : null}+ </div>+ );+}+function PermissionPrompt({item,threadId,@@ -2923,6 +2960,10 @@ function PermissionPrompt({? []: [primaryReject, ...rejectOptions.filter((option) => option !== primaryReject)];const focusRefForDeny = primaryAllow === undefined ? primaryRef : undefined;+ const titleId = useId();+ const commandId = useId();+ const describedBy = item.command !== null ? commandId : undefined;+ const denyDescribedBy = primaryAllow === undefined ? describedBy : undefined;useEffect(() => {if (!pending || !actionable) return;@@ -2934,15 +2975,21 @@ function PermissionPrompt({const resolvedLabel = outcomeLabel(outcome);return (+ // biome-ignore lint/a11y/useSemanticElements: a permission card is a title, a command and decision buttons, not a form-control set, so <fieldset> would impose form-field semantics and chrome.<divref={cardRef}className={cn('rounded-md border px-2.5 py-2 text-sm',pending && actionable ? 'border-border bg-muted/30' : 'border-border/60 bg-muted/20',)}+ role="group"+ aria-labelledby={titleId}data-testid="agent-thread-permission">- <div className="mb-1.5 font-medium">{item.title}</div>+ <div id={titleId} className="mb-1.5 font-medium">+ {item.title}+ </div>+ {item.command !== null ? <ShellCommandBlock id={commandId} command={item.command} /> : null}{!pending ? (<divclassName="text-muted-foreground text-xs"@@ -2961,6 +3008,7 @@ function PermissionPrompt({<Buttonkey={option.optionId}ref={isPrimary ? primaryRef : undefined}+ aria-describedby={isPrimary ? describedBy : undefined}type="button"size="sm"variant={isPrimary ? 'default' : 'outline'}@@ -2985,6 +3033,7 @@ function PermissionPrompt({<Buttonkey={option.optionId}ref={index === 0 ? focusRefForDeny : undefined}+ aria-describedby={index === 0 ? denyDescribedBy : undefined}type="button"size="sm"variant={index === 0 ? 'outline' : 'ghost'}@@ -2999,6 +3048,7 @@ function PermissionPrompt({) : (<Buttonref={focusRefForDeny}+ aria-describedby={denyDescribedBy}type="button"size="sm"variant="outline"@@ -3021,6 +3071,7 @@ function PermissionPrompt({return (<Buttonref={focusRefForDeny}+ aria-describedby={denyDescribedBy}type="button"size="sm"variant="outline"@@ -3037,6 +3088,7 @@ function PermissionPrompt({) : (<Buttonref={focusRefForDeny}+ aria-describedby={denyDescribedBy}type="button"size="sm"variant="outline"@@ -3052,6 +3104,7 @@ function PermissionPrompt({{primaryAllow !== undefined ? (<Buttonref={primaryRef}+ aria-describedby={describedBy}type="button"size="sm"className="text-xs normal-case font-sans"diff --git a/packages/app/src/lib/acp/mcp-input.ts b/packages/app/src/lib/acp/mcp-input.tsindex 055549182..1410805c2 100644--- a/packages/app/src/lib/acp/mcp-input.ts+++ b/packages/app/src/lib/acp/mcp-input.ts@@ -1,3 +1,9 @@+export function asRecord(value: unknown): Record<string, unknown> {+ return typeof value === 'object' && value !== null && !Array.isArray(value)+ ? (value as Record<string, unknown>)+ : {};+}+export function stringField(obj: Record<string, unknown>, key: string): string | null {const value = obj[key];return typeof value === 'string' && value !== '' ? value : null;diff --git a/packages/app/src/lib/acp/shell-command-format.test.ts b/packages/app/src/lib/acp/shell-command-format.test.tsnew file mode 100644index 000000000..3757e29d8--- /dev/null+++ b/packages/app/src/lib/acp/shell-command-format.test.ts@@ -0,0 +1,215 @@+import * as fc from 'fast-check';+import { describe, expect, test } from 'vitest';+import {+ formatShellCommand,+ revealHiddenCharacters,+ shellCommandFromRawInput,+} from './shell-command-format';++const texts = (command: string): string[] => formatShellCommand(command).map((line) => line.text);++describe('formatShellCommand', () => {+ test('puts each statement of the reported command on its own line', () => {+ const command =+ 'ps -p 51625 -o pid,command 2>/dev/null | tail -n +1; echo "----curl----"; curl -s -o /dev/null -w "%{http_code}\\n" --max-time 5 http://localhost:5173/ 2>&1 || echo "curl failed"';+ const lines = texts(command);+ expect(lines.length).toBeGreaterThan(2);+ expect(lines[0]).toContain('ps -p 51625');+ expect(lines.some((line) => line.startsWith('echo "----curl----"'))).toBe(true);+ });++ test('never splits on an operator inside quotes', () => {+ expect(texts('echo "a; b && c || d | e"')).toEqual(['echo "a; b && c || d | e"']);+ expect(texts("echo 'a; b && c'")).toEqual(["echo 'a; b && c'"]);+ });++ test('never splits inside a command substitution', () => {+ expect(texts('echo "$(ls; pwd)"')).toEqual(['echo "$(ls; pwd)"']);+ expect(texts('x=$(a && b); echo done')).toEqual(['x=$(a && b);', 'echo done']);+ });++ test('a backtick substitution closes, so the statements after it still split', () => {+ expect(texts('echo `date`; ls && pwd')).toEqual(['echo `date`;', 'ls &&', 'pwd']);+ expect(texts('echo `a; b`; c')).toEqual(['echo `a; b`;', 'c']);+ });++ test('never splits inside a parameter expansion', () => {+ // biome-ignore lint/suspicious/noTemplateCurlyInString: a shell parameter expansion, not a template placeholder+ expect(texts('x=${y:-a;b}; z')).toEqual(['x=${y:-a;b};', 'z']);+ });++ test('a backslash inside single quotes is literal, so the quote still closes', () => {+ expect(texts("echo 'C:\\'; ls")).toEqual(["echo 'C:\\';", 'ls']);+ });++ test('only spaces and tabs are trimmed, never characters bash reads as part of a word', () => {+ expect(texts('a;\u00a0b; c\ufeff')).toEqual(['a;', '\u00a0b;', 'c\ufeff']);+ });++ test('laying a command out never drops or invents a character', () => {+ const shellish = fc.string({+ unit: fc.constantFrom(+ 'a',+ 'b',+ ' ',+ '\t',+ '\n',+ ';',+ '&',+ '|',+ '#',+ '"',+ "'",+ '\\',+ '`',+ '$',+ '(',+ ')',+ '{',+ '}',+ '<',+ '>',+ '\u00a0',+ '\u200b',+ '\ufeff',+ ),+ maxLength: 60,+ });+ const ink = (text: string): string => text.replace(/[ \t\n]/g, '');+ fc.assert(+ fc.property(shellish, (command) => {+ const lines = formatShellCommand(command).map((line) => line.text);+ expect(ink(lines.join('\n'))).toBe(ink(command));+ }),+ );+ });++ test('an escaped operator stays part of its statement', () => {+ expect(texts('echo a\\; b')).toEqual(['echo a\\; b']);+ });++ test('keeps the operator on the line it terminates', () => {+ expect(texts('one && two')).toEqual(['one &&', 'two']);+ expect(texts('one || two')).toEqual(['one ||', 'two']);+ expect(texts('one; two')).toEqual(['one;', 'two']);+ });++ test('preserves newlines the command already carried', () => {+ expect(texts('first\nsecond')).toEqual(['first', 'second']);+ });++ test('a command that already spans lines is shown as written, indentation and all', () => {+ const heredoc = "python3 - <<'EOF'\nfor x in y:\n print(x); done()\nEOF";+ expect(texts(heredoc)).toEqual([+ "python3 - <<'EOF'",+ 'for x in y:',+ ' print(x); done()',+ 'EOF',+ ]);+ expect(texts(heredoc).join('\n')).toBe(heredoc);+ expect(texts('cd repo && make\nmake test')).toEqual(['cd repo && make', 'make test']);+ });++ test('a one-line command with a trailing newline is still laid out statement by statement', () => {+ expect(texts('one && two\n')).toEqual(['one &&', 'two']);+ });++ test('a comment is never split into statements', () => {+ expect(texts("ls # it's fine; rm -rf ~")).toEqual(["ls # it's fine; rm -rf ~"]);+ expect(texts('make; # build it && ship')).toEqual(['make;', '# build it && ship']);+ expect(texts('echo a#b; ls')).toEqual(['echo a#b;', 'ls']);+ });++ test('leaves a short pipeline alone and wraps a long one as a continuation', () => {+ expect(texts('ls | wc -l')).toEqual(['ls | wc -l']);++ const long = `${'echo aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'} | wc -l`;+ const lines = formatShellCommand(long);+ expect(lines.length).toBe(2);+ expect(lines[1]?.continuation).toBe(true);+ });++ test('reassembling the lines gives back the exact command', () => {+ for (const command of [+ 'ps -p 1 -o pid,command 2>/dev/null | tail -n +1; echo "----"; curl -s http://x/ || echo no',+ 'echo "a; b" && ls',+ 'x=$(a && b); echo done',+ ]) {+ expect(texts(command).join(' ')).toBe(command);+ }+ expect(texts('first\n second').join('\n')).toBe('first\n second');+ });++ test('an empty or whitespace command yields no lines', () => {+ expect(formatShellCommand('')).toEqual([]);+ expect(formatShellCommand(' \n ')).toEqual([]);+ });+});++describe('revealHiddenCharacters', () => {+ test('marks every character that would draw as nothing or reorder the line', () => {+ expect(revealHiddenCharacters('echo safe\u202e; rm -rf ~')).toBe('echo safe⟨U+202E⟩; rm -rf ~');+ expect(revealHiddenCharacters('rm\u200b -rf')).toBe('rm⟨U+200B⟩ -rf');+ expect(revealHiddenCharacters('ls\r')).toBe('ls⟨U+000D⟩');+ expect(revealHiddenCharacters('a\u2028b')).toBe('a⟨U+2028⟩b');+ expect(revealHiddenCharacters('tag\u{e0041}')).toBe('tag⟨U+E0041⟩');+ });++ test('leaves ordinary text, tabs and newlines alone', () => {+ const plain = "grep -n 'x'\tfile\nnext — café 日本";+ expect(revealHiddenCharacters(plain)).toBe(plain);+ });+});++describe('shellCommandFromRawInput', () => {+ test('reads the command a bash tool call carries', () => {+ expect(shellCommandFromRawInput({ command: 'ls -la', description: 'list' })).toBe('ls -la');+ });++ test('reads the script out of the shell wrapper a Codex exec approval carries', () => {+ const approval = {+ call_id: 'call_1',+ command: ['bash', '-lc', 'ls; pwd'],+ cwd: '/repo',+ parsed_cmd: [],+ };+ expect(shellCommandFromRawInput(approval)).toBe('ls; pwd');+ expect(shellCommandFromRawInput({ command: ['/bin/zsh', '-lc', 'echo hi'] })).toBe('echo hi');+ expect(shellCommandFromRawInput({ command: ['sh', '-c', 'make test'] })).toBe('make test');+ });++ test('an interpreter outside the system bin dirs is never elided from the gate', () => {+ for (const shell of ['./sh', '/tmp/agent-work/bash', 'C:\\Users\\x\\evil\\bash.exe']) {+ expect(shellCommandFromRawInput({ command: [shell, '-lc', 'ls'] })).toContain(shell);+ }+ expect(shellCommandFromRawInput({ command: ['/usr/local/bin/bash', '-lc', 'ls'] })).toBe('ls');+ });++ test('joins any other argv into the line a shell would read the same way', () => {+ expect(+ shellCommandFromRawInput({ command: ['git', 'commit', '-m', "fix the user's bug"] }),+ ).toBe("git commit -m 'fix the user'\\''s bug'");+ expect(shellCommandFromRawInput({ command: ['bash', '-x', 'script.sh'] })).toBe(+ 'bash -x script.sh',+ );+ expect(shellCommandFromRawInput({ command: ['echo', ''] })).toBe("echo ''");+ });++ test('declines anything that is not a usable command', () => {+ for (const input of [+ null,+ undefined,+ {},+ [],+ 'ls',+ { command: '' },+ { command: ' ' },+ { command: 42 },+ { command: [] },+ { command: ['ls', 1] },+ { command: ['bash', '-lc', ' '] },+ ]) {+ expect({ input, got: shellCommandFromRawInput(input) }).toEqual({ input, got: null });+ }+ });+});diff --git a/packages/app/src/lib/acp/shell-command-format.ts b/packages/app/src/lib/acp/shell-command-format.tsnew file mode 100644index 000000000..340860c2c--- /dev/null+++ b/packages/app/src/lib/acp/shell-command-format.ts@@ -0,0 +1,169 @@+import { asRecord } from '@/lib/acp/mcp-input';++export interface ShellLine {+ readonly text: string;+ readonly continuation: boolean;+}++const PIPELINE_WRAP_THRESHOLD = 72;++const POSIX_SHELL = /^(?:\/bin\/|\/usr\/bin\/|\/usr\/local\/bin\/)?(?:ba|da|z)?sh$/;++const PLAIN_ARGUMENT = /^[\w@%+=:,./-]+$/;++const BLANK_ROW = /^[ \t]*$/;++const HAS_TEXT = /[^ \t\n]/;++const EDGE_BLANKS = /^[ \t]+|[ \t]+$/g;++const HIDDEN_CHARACTER = /(?![\t\n])[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu;++const WORD_BOUNDARY = /[ \t;&|()<>]/;++interface ScanState {+ quote: "'" | '"' | null;+ depth: number;+ braces: number;+ backtick: boolean;+ comment: boolean;+ escaped: boolean;+}++function advance(state: ScanState, char: string, previous: string | undefined): void {+ if (state.comment) return;+ if (state.escaped) {+ state.escaped = false;+ return;+ }+ if (char === '\\' && state.quote !== "'") {+ state.escaped = true;+ return;+ }+ if (state.quote !== null) {+ if (char === state.quote) state.quote = null;+ return;+ }+ if (char === "'" || char === '"') {+ state.quote = char;+ return;+ }+ if (+ splittable(state) &&+ char === '#' &&+ (previous === undefined || WORD_BOUNDARY.test(previous))+ ) {+ state.comment = true;+ return;+ }+ if (char === '`') state.backtick = !state.backtick;+ else if (char === '(') state.depth += 1;+ else if (char === ')') state.depth = Math.max(0, state.depth - 1);+ else if (char === '{' && previous === '$') state.braces += 1;+ else if (char === '}' && state.braces > 0) state.braces -= 1;+}++function splittable(state: ScanState): boolean {+ return (+ state.quote === null &&+ state.depth === 0 &&+ state.braces === 0 &&+ !state.backtick &&+ !state.comment &&+ !state.escaped+ );+}++export function formatShellCommand(command: string): ShellLine[] {+ const rows = command.split('\n');+ while (rows.length > 0 && BLANK_ROW.test(rows[0] ?? '')) rows.shift();+ while (rows.length > 0 && BLANK_ROW.test(rows[rows.length - 1] ?? '')) rows.pop();+ if (rows.length === 1) return reflowStatements(rows[0] ?? '');+ return rows.map((text) => ({ text, continuation: false }));+}++function reflowStatements(command: string): ShellLine[] {+ const lines: ShellLine[] = [];+ const state: ScanState = {+ quote: null,+ depth: 0,+ braces: 0,+ backtick: false,+ comment: false,+ escaped: false,+ };+ let buffer = '';+ let pendingContinuation = false;++ const flush = (continuation: boolean): void => {+ const text = buffer.replace(EDGE_BLANKS, '');+ buffer = '';+ if (text === '') return;+ lines.push({ text, continuation });+ };++ for (let index = 0; index < command.length; index += 1) {+ const char = command[index] as string;+ const next = command[index + 1];++ if (splittable(state) && (char === '&' || char === '|') && next === char) {+ buffer += char + next;+ index += 1;+ flush(pendingContinuation);+ pendingContinuation = false;+ continue;+ }++ if (splittable(state) && char === ';') {+ buffer += char;+ flush(pendingContinuation);+ pendingContinuation = false;+ continue;+ }++ if (+ splittable(state) &&+ char === '|' &&+ next !== '|' &&+ buffer.length >= PIPELINE_WRAP_THRESHOLD+ ) {+ buffer += char;+ flush(pendingContinuation);+ pendingContinuation = true;+ continue;+ }++ buffer += char;+ advance(state, char, command[index - 1]);+ }+ flush(pendingContinuation);+ return lines;+}++export function revealHiddenCharacters(text: string): string {+ return text.replace(+ HIDDEN_CHARACTER,+ (char) => `⟨U+${(char.codePointAt(0) ?? 0).toString(16).toUpperCase().padStart(4, '0')}⟩`,+ );+}++export function shellCommandFromRawInput(rawInput: unknown): string | null {+ const value = asRecord(rawInput).command;+ const command = Array.isArray(value) ? commandFromArgv(value) : value;+ return typeof command === 'string' && HAS_TEXT.test(command) ? command : null;+}++function commandFromArgv(argv: readonly unknown[]): string | null {+ if (argv.length === 0 || !argv.every((part): part is string => typeof part === 'string')) {+ return null;+ }+ const [shell = '', flag, script = ''] = argv;+ if (argv.length === 3 && POSIX_SHELL.test(shell) && (flag === '-c' || flag === '-lc')) {+ return script;+ }+ return argv.map(quoteArgument).join(' ');+}++function quoteArgument(argument: string): string {+ return PLAIN_ARGUMENT.test(argument) ? argument : `'${argument.replaceAll("'", `'\\''`)}'`;+}diff --git a/packages/app/src/lib/acp/thread-event-model.test.ts b/packages/app/src/lib/acp/thread-event-model.test.tsindex b166cfab2..239dcd4e4 100644--- a/packages/app/src/lib/acp/thread-event-model.test.ts+++ b/packages/app/src/lib/acp/thread-event-model.test.ts@@ -191,6 +191,106 @@ describe('buildThreadRenderModel', () => {expect(perm.mergedIntoToolCall).toBe(false);});+ describe('the command a permission asks you to approve', () => {+ const request = (toolCall: Record<string, unknown>): ThreadEvent =>+ ev({+ kind: 'permission_request',+ requestId: 'p1',+ toolCall: {+ toolCallId: 'c1',+ title: 'Run a diagnostic',+ kind: 'execute',+ ...toolCall,+ } as never,+ options: [{ optionId: 'allow', name: 'Allow', kind: 'allow_once' }],+ ts: 1,+ });+ const call = (rawInput: unknown): ThreadEvent =>+ ev({+ kind: 'session_update',+ update: {+ sessionUpdate: 'tool_call',+ toolCallId: 'c1',+ title: 'Run a diagnostic',+ kind: 'execute',+ status: 'pending',+ rawInput,+ } as never,+ ts: 2,+ });+ const update = (rawInput: unknown): ThreadEvent =>+ ev({+ kind: 'session_update',+ update: { sessionUpdate: 'tool_call_update', toolCallId: 'c1', rawInput } as never,+ ts: 3,+ });+ const gate = (events: ThreadEvent[]) => {+ const model = buildThreadRenderModel(events, null);+ const permission = model.items.find((item) => item.kind === 'permission');+ if (permission?.kind !== 'permission') throw new Error('unreachable');+ return { shown: permission.command, linked: model.permissionsByToolCall.c1?.command };+ };++ test('a request that arrives before any call carries the command it asks about', () => {+ expect(gate([request({ rawInput: { command: 'ls -la' } })]).shown).toBe('ls -la');+ });++ test("the request's own command wins over the call it gates, whichever lands first", () => {+ const own = request({ rawInput: { command: 'echo from-request' } });+ const linked = call({ command: 'echo from-call' });+ for (const events of [+ [own, linked],+ [linked, own],+ ]) {+ expect(gate(events)).toEqual({ shown: 'echo from-request', linked: 'echo from-request' });+ }+ });++ test('a request with no input of its own takes the command from the call it gates', () => {+ const bare = request({});+ const linked = call({ command: 'npm test' });+ for (const events of [+ [bare, linked],+ [linked, bare],+ ]) {+ expect(gate(events)).toEqual({ shown: 'npm test', linked: 'npm test' });+ }+ });++ test('a later update fills in a missing command but never rewrites one the gate shows', () => {+ expect(gate([call(undefined), request({}), update({ command: 'npm test' })])).toEqual({+ shown: 'npm test',+ linked: 'npm test',+ });+ expect(+ gate([call({ command: 'npm test' }), request({}), update({ command: 'rm -rf ~' })]),+ ).toEqual({ shown: 'npm test', linked: 'npm test' });+ });++ test('an explicit non-execute kind on the request keeps it off the gate', () => {+ expect(+ gate([request({ kind: 'edit', rawInput: { command: 'rename; x' } })]).shown,+ ).toBeNull();+ });++ test("a request that omits its kind inherits the linked call's", () => {+ expect(gate([call({ command: 'npm test' }), request({ kind: undefined })]).shown).toBe(+ 'npm test',+ );+ expect(gate([request({ kind: undefined }), call({ command: 'npm test' })]).shown).toBe(+ 'npm test',+ );+ });++ test('the command stays on the gate once it is answered', () => {+ const answered = gate([+ request({ rawInput: { command: 'npm test' } }),+ ev({ kind: 'permission_resolved', requestId: 'p1', optionId: 'allow', auto: false, ts: 4 }),+ ]);+ expect(answered).toEqual({ shown: 'npm test', linked: 'npm test' });+ });+ });+test('keeps the latest plan as a checklist', () => {const events: ThreadEvent[] = [ev({diff --git a/packages/app/src/lib/acp/thread-event-model.ts b/packages/app/src/lib/acp/thread-event-model.tsindex b539a5dac..18be27c3c 100644--- a/packages/app/src/lib/acp/thread-event-model.ts+++ b/packages/app/src/lib/acp/thread-event-model.ts@@ -10,6 +10,7 @@ import type {ThreadFailureDetail,} from '@inkeep/open-knowledge-core/acp/thread-protocol';import { t } from '@lingui/core/macro';+import { shellCommandFromRawInput } from '@/lib/acp/shell-command-format';type RenderedMessage =| {@@ -45,6 +46,7 @@ export interface RenderedPermission {requestId: string;title: string;toolKind: string;+ command: string | null;options: PermissionOption[];resolved: { optionId: string | null; auto: boolean } | null;toolCallId: string | null;@@ -151,6 +153,10 @@ function textFromContent(content: unknown): string | null {return c.type === 'text' && typeof c.text === 'string' ? c.text : null;}+function shellCommandOf(toolKind: string, rawInput: unknown): string | null {+ return toolKind === 'execute' ? shellCommandFromRawInput(rawInput) : null;+}+function isSupersededByReady(failure: ThreadFailureDetail | null): boolean {return (failure !== null &&@@ -305,15 +311,22 @@ export class ThreadRenderModelBuilder {break;case 'permission_request': {const toolCallId = event.toolCall.toolCallId ?? null;+ const callIndex = toolCallId === null ? undefined : this.toolCallIndex.get(toolCallId);+ const call = callIndex === undefined ? undefined : this.items[callIndex];+ const linkedKind = call?.kind === 'tool_call' ? call.toolKind : undefined;+ const toolKind = event.toolCall.kind ?? linkedKind ?? 'other';const permission: RenderedPermission = {kind: 'permission',requestId: event.requestId,title: event.toolCall.title ?? t`Permission required`,- toolKind: event.toolCall.kind ?? 'other',+ toolKind,+ command:+ shellCommandOf(toolKind, event.toolCall.rawInput) ??+ shellCommandOf(toolKind, call?.kind === 'tool_call' ? call.rawInput : undefined),options: event.options,resolved: null,toolCallId,- mergedIntoToolCall: toolCallId !== null && this.toolCallIndex.has(toolCallId),+ mergedIntoToolCall: callIndex !== undefined,};this.permissionIndex.set(event.requestId, this.items.length);if (toolCallId !== null) {@@ -474,6 +487,18 @@ export class ThreadRenderModelBuilder {this.permissionsByToolCall[toolCallId] = merged;}+ private fillPermissionCommand(toolCallId: string, kind: string, rawInput: unknown): void {+ const index = this.permissionByToolCall.get(toolCallId);+ if (index === undefined) return;+ const target = this.items[index];+ if (target?.kind !== 'permission' || target.command !== null) return;+ const command = shellCommandOf(target.toolKind === 'other' ? kind : target.toolKind, rawInput);+ if (command === null) return;+ const filled: RenderedPermission = { ...target, command };+ this.items[index] = filled;+ this.permissionsByToolCall[toolCallId] = filled;+ }+private pushMessageChunk(role: RenderedMessage['role'], messageId: string, text: string): void {const key = `${role}:${messageId}`;const index = this.messageIndex.get(key);@@ -531,6 +556,7 @@ export class ThreadRenderModelBuilder {this.toolCallIndex.set(update.toolCallId, this.items.length);this.items.push(call);this.mergePermissionInto(update.toolCallId);+ this.fillPermissionCommand(update.toolCallId, call.toolKind, call.rawInput);break;}case 'tool_call_update': {@@ -548,7 +574,10 @@ export class ThreadRenderModelBuilder {if (update.title) call.title = update.title;if (update.locations) call.locations = normalizeLocations(update.locations);const rawInput = (update as { rawInput?: unknown }).rawInput;- if (rawInput !== undefined) call.rawInput = rawInput;+ if (rawInput !== undefined) {+ call.rawInput = rawInput;+ this.fillPermissionCommand(update.toolCallId, call.toolKind, rawInput);+ }mergeToolContent(call, update.content);this.items[index] = call;break;diff --git a/packages/app/src/lib/acp/tool-call-display.ts b/packages/app/src/lib/acp/tool-call-display.tsindex a175aa314..793fe1671 100644--- a/packages/app/src/lib/acp/tool-call-display.ts+++ b/packages/app/src/lib/acp/tool-call-display.ts@@ -1,6 +1,6 @@import { OPEN_KNOWLEDGE_MCP_TOOLS } from '@inkeep/open-knowledge-core';import { plural, t } from '@lingui/core/macro';-import { stringField, unwrapMcpInput } from '@/lib/acp/mcp-input';+import { asRecord, stringField, unwrapMcpInput } from '@/lib/acp/mcp-input';export type ToolCallGlyph =| 'read'@@ -37,12 +37,6 @@ interface OpenKnowledgeCall {args: Record<string, unknown>;}-function asRecord(value: unknown): Record<string, unknown> {- return typeof value === 'object' && value !== null && !Array.isArray(value)- ? (value as Record<string, unknown>)- : {};-}-function toolFromTitle(title: string): string | null {return OPEN_KNOWLEDGE_TITLE.exec(title.trim().toLowerCase())?.[1] ?? null;}diff --git a/packages/app/src/locales/ar/messages.json b/packages/app/src/locales/ar/messages.jsonindex f828414e0..feeea42f9 100644--- a/packages/app/src/locales/ar/messages.json+++ b/packages/app/src/locales/ar/messages.json@@ -507,6 +507,9 @@"4niEzY": ["تضمين HTML معزول — اكتب HTML وشاهد المعاينة المعروضة مباشرةً."],"4nj6n8": ["أعاد /api/config الرمز ", ["code"]],"4pDZ2N": ["أُزيلت «", ["0"], "» من كل موقع آخر — ولا يزال مجلدها المصدر يُحمَّل"],+ "4r6p_B": [+ "يحتوي هذا الأمر على أحرف مخفية قد تجعله يبدو مختلفًا عمّا يُنفَّذ فعلًا. تظهر هنا بصيغة ⟨U+…⟩."+ ],"4sE6E9": ["تعذّر تحديد الأدوات المتّصلة."],"4sKwf6": ["الملف موجود بالفعل"],"4sUdTJ": ["معاينة بالسمة"],diff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.poindex 076ffc72b..d7c9f89db 100644--- a/packages/app/src/locales/ar/messages.po+++ b/packages/app/src/locales/ar/messages.po@@ -14375,6 +14375,10 @@ msgstr "هذا الفرع مسحوب في:"msgid "This can be configured in Settings > AI tools & CLI"msgstr "يمكن ضبط هذا في الإعدادات > أدوات الذكاء الاصطناعي وواجهة سطر الأوامر"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "يحتوي هذا الأمر على أحرف مخفية قد تجعله يبدو مختلفًا عمّا يُنفَّذ فعلًا. تظهر هنا بصيغة ⟨U+…⟩."+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "هذا التعليق على الخاصية بأكملها"diff --git a/packages/app/src/locales/bn/messages.json b/packages/app/src/locales/bn/messages.jsonindex c194c4b67..ba9ae8bdb 100644--- a/packages/app/src/locales/bn/messages.json+++ b/packages/app/src/locales/bn/messages.json@@ -419,6 +419,9 @@"4niEzY": ["স্যান্ডবক্স করা HTML এমবেড — HTML লিখুন, রেন্ডার করা প্রাকদর্শন সঙ্গে সঙ্গে দেখুন।"],"4nj6n8": ["/api/config HTTP ", ["code"], " ফিরিয়েছে"],"4pDZ2N": ["\"", ["0"], "\"-কে অন্য প্রতিটি জায়গা থেকে সরানো হয়েছে — এর উৎস ফোল্ডার এখনও লোড হয়"],+ "4r6p_B": [+ "এই কমান্ডে লুকানো অক্ষর আছে, যার ফলে এটি আসলে যা চলে তার থেকে আলাদা দেখাতে পারে। এগুলো এখানে ⟨U+…⟩ হিসেবে দেখানো হয়েছে।"+ ],"4sE6E9": ["কোন টুল যুক্ত আছে তা যাচাই করা যায়নি।"],"4sKwf6": ["ফাইলটি আগে থেকেই আছে"],"4sUdTJ": ["থিমযুক্ত প্রাকদর্শন"],diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.poindex e2c3c770f..056efb99e 100644--- a/packages/app/src/locales/bn/messages.po+++ b/packages/app/src/locales/bn/messages.po@@ -14371,6 +14371,10 @@ msgstr "এই ব্রাঞ্চটি এখানে চেক আউটmsgid "This can be configured in Settings > AI tools & CLI"msgstr "এটি Settings > AI tools & CLI-তে কনফিগার করা যায়"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "এই কমান্ডে লুকানো অক্ষর আছে, যার ফলে এটি আসলে যা চলে তার থেকে আলাদা দেখাতে পারে। এগুলো এখানে ⟨U+…⟩ হিসেবে দেখানো হয়েছে।"+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "এই মন্তব্যটি পুরো প্রপার্টির উপর"diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.jsonindex 884c58957..d52309c28 100644--- a/packages/app/src/locales/en/messages.json+++ b/packages/app/src/locales/en/messages.json@@ -427,6 +427,9 @@"4niEzY": ["Sandboxed HTML embed — write HTML, see the rendered preview live."],"4nj6n8": ["/api/config returned HTTP ", ["code"]],"4pDZ2N": ["Removed \"", ["0"], "\" from every other location — its source folder still loads"],+ "4r6p_B": [+ "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+ ],"4sE6E9": ["Couldn't check which tools are connected."],"4sKwf6": ["File already exists"],"4sUdTJ": ["themed preview"],diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.poindex 756bd25ac..669ca163c 100644--- a/packages/app/src/locales/en/messages.po+++ b/packages/app/src/locales/en/messages.po@@ -14375,6 +14375,10 @@ msgstr "This branch is checked out in:"msgid "This can be configured in Settings > AI tools & CLI"msgstr "This can be configured in Settings > AI tools & CLI"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "This comment is on the whole property"diff --git a/packages/app/src/locales/es/messages.json b/packages/app/src/locales/es/messages.jsonindex ebbb76ca0..0c1e1326e 100644--- a/packages/app/src/locales/es/messages.json+++ b/packages/app/src/locales/es/messages.json@@ -506,6 +506,9 @@["0"],"\" de todas las demás ubicaciones; su carpeta de origen se sigue cargando"],+ "4r6p_B": [+ "Este comando contiene caracteres ocultos que pueden hacer que se vea distinto de lo que se ejecuta. Aquí se muestran como ⟨U+…⟩."+ ],"4sE6E9": ["No se pudo comprobar qué herramientas están conectadas."],"4sKwf6": ["El archivo ya existe"],"4sUdTJ": ["vista previa con tema"],diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.poindex 2201ec104..2a53007c1 100644--- a/packages/app/src/locales/es/messages.po+++ b/packages/app/src/locales/es/messages.po@@ -14375,6 +14375,10 @@ msgstr "Esta rama está extraída en:"msgid "This can be configured in Settings > AI tools & CLI"msgstr "Esto se puede configurar en Ajustes > Herramientas de IA y CLI"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "Este comando contiene caracteres ocultos que pueden hacer que se vea distinto de lo que se ejecuta. Aquí se muestran como ⟨U+…⟩."+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "Este comentario es sobre toda la propiedad"diff --git a/packages/app/src/locales/fr/messages.json b/packages/app/src/locales/fr/messages.jsonindex 1a9004337..c01182b84 100644--- a/packages/app/src/locales/fr/messages.json+++ b/packages/app/src/locales/fr/messages.json@@ -520,6 +520,9 @@["0"]," » retiré de tous les autres emplacements — son dossier source se charge toujours"],+ "4r6p_B": [+ "Cette commande contient des caractères masqués qui peuvent la faire paraître différente de ce qui s’exécute. Ils sont affichés ici sous la forme ⟨U+…⟩."+ ],"4sE6E9": ["Impossible de vérifier quels outils sont connectés."],"4sKwf6": ["Le fichier existe déjà"],"4sUdTJ": ["aperçu thématisé"],diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.poindex db529afe7..2a1a9d050 100644--- a/packages/app/src/locales/fr/messages.po+++ b/packages/app/src/locales/fr/messages.po@@ -14375,6 +14375,10 @@ msgstr "Cette branche est extraite dans :"msgid "This can be configured in Settings > AI tools & CLI"msgstr "Cela se configure dans Paramètres > Outils IA et CLI"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "Cette commande contient des caractères masqués qui peuvent la faire paraître différente de ce qui s’exécute. Ils sont affichés ici sous la forme ⟨U+…⟩."+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "Ce commentaire porte sur toute la propriété"diff --git a/packages/app/src/locales/hi/messages.json b/packages/app/src/locales/hi/messages.jsonindex f0e1feba4..4a26ad580 100644--- a/packages/app/src/locales/hi/messages.json+++ b/packages/app/src/locales/hi/messages.json@@ -421,6 +421,9 @@"4niEzY": ["सैंडबॉक्स किया गया HTML एम्बेड — HTML लिखें, रेंडर किया गया पूर्वावलोकन तुरंत देखें।"],"4nj6n8": ["/api/config ने HTTP ", ["code"], " लौटाया"],"4pDZ2N": ["\"", ["0"], "\" को बाकी हर स्थान से हटा दिया गया — इसका स्रोत फ़ोल्डर अब भी लोड होता है"],+ "4r6p_B": [+ "इस कमांड में छिपे हुए वर्ण हैं, जिनके कारण यह जो असल में चलता है उससे अलग दिख सकता है। इन्हें यहाँ ⟨U+…⟩ के रूप में दिखाया गया है।"+ ],"4sE6E9": ["जाँच नहीं हो सकी कि कौन-से टूल जुड़े हैं।"],"4sKwf6": ["फ़ाइल पहले से मौजूद है"],"4sUdTJ": ["थीम वाला पूर्वावलोकन"],diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.poindex cf4a3e6ef..71dbc43e6 100644--- a/packages/app/src/locales/hi/messages.po+++ b/packages/app/src/locales/hi/messages.po@@ -14371,6 +14371,10 @@ msgstr "यह ब्रांच यहाँ चेक आउट है:"msgid "This can be configured in Settings > AI tools & CLI"msgstr "इसे Settings > AI tools & CLI में कॉन्फ़िगर किया जा सकता है"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "इस कमांड में छिपे हुए वर्ण हैं, जिनके कारण यह जो असल में चलता है उससे अलग दिख सकता है। इन्हें यहाँ ⟨U+…⟩ के रूप में दिखाया गया है।"+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "यह टिप्पणी पूरी प्रॉपर्टी पर है"diff --git a/packages/app/src/locales/id/messages.json b/packages/app/src/locales/id/messages.jsonindex 194b5d2f9..059d57eb1 100644--- a/packages/app/src/locales/id/messages.json+++ b/packages/app/src/locales/id/messages.json@@ -430,6 +430,9 @@"4niEzY": ["Sematan HTML tersekat — tulis HTML, lihat pratinjau terendernya secara langsung."],"4nj6n8": ["/api/config mengembalikan HTTP ", ["code"]],"4pDZ2N": ["\"", ["0"], "\" dihapus dari semua lokasi lain — folder sumbernya tetap dimuat"],+ "4r6p_B": [+ "Perintah ini berisi karakter tersembunyi yang dapat membuatnya terlihat berbeda dari yang dijalankan. Karakter tersebut ditampilkan di sini sebagai ⟨U+…⟩."+ ],"4sE6E9": ["Tidak bisa memeriksa alat mana yang terhubung."],"4sKwf6": ["Berkas sudah ada"],"4sUdTJ": ["pratinjau bertema"],diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.poindex 903378c07..a3279f8be 100644--- a/packages/app/src/locales/id/messages.po+++ b/packages/app/src/locales/id/messages.po@@ -14371,6 +14371,10 @@ msgstr "Cabang ini sedang dipakai di:"msgid "This can be configured in Settings > AI tools & CLI"msgstr "Ini bisa diatur di Pengaturan > Alat AI & CLI"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "Perintah ini berisi karakter tersembunyi yang dapat membuatnya terlihat berbeda dari yang dijalankan. Karakter tersebut ditampilkan di sini sebagai ⟨U+…⟩."+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "Komentar ini berlaku untuk seluruh properti"diff --git a/packages/app/src/locales/ko/messages.json b/packages/app/src/locales/ko/messages.jsonindex abab6fe7e..154d7da98 100644--- a/packages/app/src/locales/ko/messages.json+++ b/packages/app/src/locales/ko/messages.json@@ -413,6 +413,9 @@],"4nj6n8": ["/api/config HTTP ", ["code"], " 반환"],"4pDZ2N": ["다른 모든 위치에서 \"", ["0"], "\"을 제거했습니다. 소스 폴더는 계속 불러옵니다"],+ "4r6p_B": [+ "이 명령에는 실제로 실행되는 내용과 다르게 보이게 할 수 있는 숨겨진 문자가 있습니다. 여기서는 ⟨U+…⟩ 형식으로 표시됩니다."+ ],"4sE6E9": ["어떤 도구가 연결되었는지 확인하지 못했습니다."],"4sKwf6": ["파일이 이미 있습니다"],"4sUdTJ": ["테마 적용 미리보기"],diff --git a/packages/app/src/locales/ko/messages.po b/packages/app/src/locales/ko/messages.poindex 7db36a3b3..8a02e9c68 100644--- a/packages/app/src/locales/ko/messages.po+++ b/packages/app/src/locales/ko/messages.po@@ -14375,6 +14375,10 @@ msgstr "이 브랜치의 체크아웃 위치:"msgid "This can be configured in Settings > AI tools & CLI"msgstr "Settings > AI tools & CLI에서 설정 가능"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "이 명령에는 실제로 실행되는 내용과 다르게 보이게 할 수 있는 숨겨진 문자가 있습니다. 여기서는 ⟨U+…⟩ 형식으로 표시됩니다."+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "이 댓글, 속성 전체에 적용됨"diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.jsonindex 6ced6ed6f..888c87553 100644--- a/packages/app/src/locales/pseudo/messages.json+++ b/packages/app/src/locales/pseudo/messages.json@@ -427,6 +427,9 @@"4niEzY": ["Śàńďƀōxēď ĤŢḾĹ ēḿƀēď — ŵŕĩţē ĤŢḾĹ, śēē ţĥē ŕēńďēŕēď ƥŕēvĩēŵ ĺĩvē."],"4nj6n8": ["/àƥĩ/ćōńƒĩĝ ŕēţũŕńēď ĤŢŢƤ ", ["code"]],"4pDZ2N": ["Ŕēḿōvēď \"", ["0"], "\" ƒŕōḿ ēvēŕŷ ōţĥēŕ ĺōćàţĩōń — ĩţś śōũŕćē ƒōĺďēŕ śţĩĺĺ ĺōàďś"],+ "4r6p_B": [+ "Ţĥĩś ćōḿḿàńď ćōńţàĩńś ĥĩďďēń ćĥàŕàćţēŕś ţĥàţ ćàń ḿàķē ĩţ ĺōōķ ďĩƒƒēŕēńţ ƒŕōḿ ŵĥàţ ŕũńś. Ţĥēŷ àŕē śĥōŵń ĥēŕē àś ⟨Ũ+…⟩."+ ],"4sE6E9": ["Ćōũĺďń'ţ ćĥēćķ ŵĥĩćĥ ţōōĺś àŕē ćōńńēćţēď."],"4sKwf6": ["Ƒĩĺē àĺŕēàďŷ ēxĩśţś"],"4sUdTJ": ["ţĥēḿēď ƥŕēvĩēŵ"],diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.poindex 50c659115..b6511f0dd 100644--- a/packages/app/src/locales/pseudo/messages.po+++ b/packages/app/src/locales/pseudo/messages.po@@ -14371,6 +14371,10 @@ msgstr ""msgid "This can be configured in Settings > AI tools & CLI"msgstr ""+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr ""+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr ""diff --git a/packages/app/src/locales/pt-BR/messages.json b/packages/app/src/locales/pt-BR/messages.jsonindex 4ae02b392..9789a5ae4 100644--- a/packages/app/src/locales/pt-BR/messages.json+++ b/packages/app/src/locales/pt-BR/messages.json@@ -506,6 +506,9 @@["0"],"\" foi removido de todos os outros locais — a pasta de origem dele continua carregando"],+ "4r6p_B": [+ "Este comando contém caracteres ocultos que podem fazer com que ele pareça diferente do que é executado. Eles aparecem aqui como ⟨U+…⟩."+ ],"4sE6E9": ["Não deu para verificar quais ferramentas estão conectadas."],"4sKwf6": ["O arquivo já existe"],"4sUdTJ": ["pré-visualização com tema"],diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.poindex 2700c68dd..099a45903 100644--- a/packages/app/src/locales/pt-BR/messages.po+++ b/packages/app/src/locales/pt-BR/messages.po@@ -14371,6 +14371,10 @@ msgstr "Este ramo está extraído em:"msgid "This can be configured in Settings > AI tools & CLI"msgstr "Isto pode ser configurado em Configurações > Ferramentas de IA e CLI"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "Este comando contém caracteres ocultos que podem fazer com que ele pareça diferente do que é executado. Eles aparecem aqui como ⟨U+…⟩."+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "Este comentário é sobre a propriedade inteira"diff --git a/packages/app/src/locales/ur/messages.json b/packages/app/src/locales/ur/messages.jsonindex d0828cddc..4647ef30b 100644--- a/packages/app/src/locales/ur/messages.json+++ b/packages/app/src/locales/ur/messages.json@@ -433,6 +433,9 @@["0"],"» کو ہر دوسرے مقام سے ہٹا دیا گیا — اس کا ماخذ فولڈر اب بھی لوڈ ہوتا ہے"],+ "4r6p_B": [+ "اس کمانڈ میں پوشیدہ حروف ہیں جن کی وجہ سے یہ اصل میں چلنے والی چیز سے مختلف دکھائی دے سکتی ہے۔ انہیں یہاں ⟨U+…⟩ کی صورت میں دکھایا گیا ہے۔"+ ],"4sE6E9": ["معلوم نہیں ہو سکا کہ کون سے ٹولز منسلک ہیں۔"],"4sKwf6": ["فائل پہلے سے موجود ہے"],"4sUdTJ": ["تھیم والا پیش منظر"],diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.poindex ceb111aad..13afda2e9 100644--- a/packages/app/src/locales/ur/messages.po+++ b/packages/app/src/locales/ur/messages.po@@ -14375,6 +14375,10 @@ msgstr "یہ برانچ یہاں چیک آؤٹ ہے:"msgid "This can be configured in Settings > AI tools & CLI"msgstr "یہ ترتیبات > AI ٹولز اور CLI میں مقرر کیا جا سکتا ہے"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "اس کمانڈ میں پوشیدہ حروف ہیں جن کی وجہ سے یہ اصل میں چلنے والی چیز سے مختلف دکھائی دے سکتی ہے۔ انہیں یہاں ⟨U+…⟩ کی صورت میں دکھایا گیا ہے۔"+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "یہ تبصرہ پوری خصوصیت پر ہے"diff --git a/packages/app/src/locales/zh-Hans/messages.json b/packages/app/src/locales/zh-Hans/messages.jsonindex e8a2a0a37..96e80e1db 100644--- a/packages/app/src/locales/zh-Hans/messages.json+++ b/packages/app/src/locales/zh-Hans/messages.json@@ -381,6 +381,9 @@"4niEzY": ["沙箱化的 HTML 嵌入——写下 HTML,实时查看渲染效果。"],"4nj6n8": ["/api/config 返回了 HTTP ", ["code"]],"4pDZ2N": ["已把“", ["0"], "”从其他所有位置移除——它的来源文件夹仍会加载"],+ "4r6p_B": [+ "此命令包含隐藏字符,可能使其看起来与实际运行的内容不同。这些字符在此显示为 ⟨U+…⟩。"+ ],"4sE6E9": ["无法检查哪些工具已连接。"],"4sKwf6": ["文件已存在"],"4sUdTJ": ["带主题的预览"],diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.poindex ab40562fb..5ccce8164 100644--- a/packages/app/src/locales/zh-Hans/messages.po+++ b/packages/app/src/locales/zh-Hans/messages.po@@ -14375,6 +14375,10 @@ msgstr "这个分支已在以下位置检出:"msgid "This can be configured in Settings > AI tools & CLI"msgstr "这可以在「设置 > AI 工具与 CLI」中配置"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "此命令包含隐藏字符,可能使其看起来与实际运行的内容不同。这些字符在此显示为 ⟨U+…⟩。"+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "这条评论针对的是整个属性"diff --git a/packages/app/src/locales/zh-Hant/messages.json b/packages/app/src/locales/zh-Hant/messages.jsonindex a1c68511c..52bf49766 100644--- a/packages/app/src/locales/zh-Hant/messages.json+++ b/packages/app/src/locales/zh-Hant/messages.json@@ -383,6 +383,9 @@"4niEzY": ["沙箱化的 HTML 嵌入——寫下 HTML,即時看到顯示結果。"],"4nj6n8": ["/api/config 傳回了 HTTP ", ["code"]],"4pDZ2N": ["已把「", ["0"], "」從其他所有位置移除——它的來源資料夾仍然會載入"],+ "4r6p_B": [+ "此指令包含隱藏字元,可能使其看起來與實際執行的內容不同。這些字元在此顯示為 ⟨U+…⟩。"+ ],"4sE6E9": ["無法檢查哪些工具已連接。"],"4sKwf6": ["檔案已存在"],"4sUdTJ": ["帶主題的預覽"],diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.poindex 2f89ea4f7..b678444d1 100644--- a/packages/app/src/locales/zh-Hant/messages.po+++ b/packages/app/src/locales/zh-Hant/messages.po@@ -14375,6 +14375,10 @@ msgstr "這個分支已在以下位置簽出:"msgid "This can be configured in Settings > AI tools & CLI"msgstr "這可以在「設定 > AI 工具與 CLI」中設定"+#: src/components/acp/ThreadView.tsx+msgid "This command contains hidden characters that can make it look different from what runs. They are shown here as ⟨U+…⟩."+msgstr "此指令包含隱藏字元,可能使其看起來與實際執行的內容不同。這些字元在此顯示為 ⟨U+…⟩。"+#: src/comments/ThreadCard.tsxmsgid "This comment is on the whole property"msgstr "這則註解是針對整個屬性的"