From a53967fc055ea96346a14413bce36c52a22a8c19 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Thu, 8 Oct 2026 00:48:05 -0700 Subject: [PATCH] Native chat: add an inline visuals switch and simplify the skill (#26358) * Native chat: let users turn off inline visuals for new chats * Native chat: keep inline visuals guidance light * Move inline visuals setting to Chat settings --- .../skills/orca-chat-visuals/SKILL.md | 61 ++----- .../claude/claude-structured-launch-flags.ts | 21 ++- ...native-chat-inline-visuals-setting.test.ts | 154 ++++++++++++++++++ .../native-chat-visuals-delivery.test.ts | 36 +++- .../native-chat-visuals-delivery.ts | 4 + .../runtime/orca-runtime-get-worktree-ps.ts | 1 + src/main/runtime/runtime-store-contract.ts | 1 + .../structured-agent-runtime-registrations.ts | 3 +- .../structured-agent-session-runtime.ts | 2 + .../NativeChatMarkdown.visual.test.tsx | 18 ++ ...hatSettingsSection.inline-visuals.test.tsx | 96 +++++++++++ .../ChatSettingsSection.navigation.test.tsx | 24 ++- .../settings/ChatSettingsSection.test.tsx | 17 +- .../settings/ChatSettingsSection.tsx | 13 +- .../NativeChatExperimentalSetting.test.tsx | 12 ++ .../NativeChatInlineVisualsSetting.tsx | 44 +++++ .../settings/chat-inline-visuals-search.ts | 12 ++ ...ive-chat-experimental-search-entry.test.ts | 7 + .../settings-navigation-interface-sections.ts | 7 +- src/renderer/src/i18n/locales/en.json | 5 +- src/shared/default-global-settings.ts | 1 + src/shared/global-settings-types.ts | 2 + 22 files changed, 471 insertions(+), 70 deletions(-) create mode 100644 src/main/native-chat/native-chat-inline-visuals-setting.test.ts create mode 100644 src/renderer/src/components/settings/ChatSettingsSection.inline-visuals.test.tsx create mode 100644 src/renderer/src/components/settings/NativeChatInlineVisualsSetting.tsx create mode 100644 src/renderer/src/components/settings/chat-inline-visuals-search.ts diff --git a/resources/native-chat-visuals/skills/orca-chat-visuals/SKILL.md b/resources/native-chat-visuals/skills/orca-chat-visuals/SKILL.md index 2276e92d4e3..dc63d3c8d20 100644 --- a/resources/native-chat-visuals/skills/orca-chat-visuals/SKILL.md +++ b/resources/native-chat-visuals/skills/orca-chat-visuals/SKILL.md @@ -1,58 +1,33 @@ --- name: orca-chat-visuals -description: Show a chart, diagram, timeline, comparison or UI mockup inline in this Orca chat by writing one self-contained HTML file and adding a visual line to your reply. Use when seeing something would explain the answer faster than prose or a small Markdown table, and only when the ORCA_CHAT_VISUALS_DIR environment variable is set. +description: Show a chart, diagram, table, report or mockup inline in this Orca chat as an HTML + page. Use when a visual would help the user understand your answer. Only available when the + ORCA_CHAT_VISUALS_DIR environment variable is set. user-invocable: false --- # Inline visuals in an Orca chat -Orca can render an HTML page inside your reply. Reach for it when the reader gains from seeing the -answer: trends, many values side by side, flows, architecture, layouts. Answers that read fine as -text, a short list or a small table don't need one. +Orca can show an HTML page inside your reply. Use one whenever a visual would make the answer +clearer. -## When you can't make one +## Writing the page -- This chat's folder is the absolute path in the `ORCA_CHAT_VISUALS_DIR` environment variable. Read - it from your shell (`printenv ORCA_CHAT_VISUALS_DIR`; in PowerShell `$env:ORCA_CHAT_VISUALS_DIR`). -- If the variable is unset or empty, or writing there fails, don't make a visual. -- Stay inside what the user allowed. In plan or read-only mode don't make a visual. If a write - there is refused, don't retry it; never switch modes or ask for wider access for a visual. -- Never put visuals in the user's project and never edit `.gitignore` or other files for them. - -Without a visual, use a Markdown table, a Mermaid code block or plain prose instead. - -## Writing the file - -- One visual is one complete HTML document saved directly in that folder (no subfolders). -- Every visual gets a file name not used before in this chat: a few lowercase words and a short - random suffix, like `latency-by-region-7c1e.html`. Never overwrite or edit an earlier visual; - write a new file. Allowed: letters, digits, `.`, `_` and `-`; starts with a letter or digit; - ends in `.html`; at most 128 characters; no `..`; not a Windows device name like `con` or `nul`. -- Put everything in the file: inline `