From f3db96631704f5d7cf2ee6c2a31812d161305356 Mon Sep 17 00:00:00 2001 From: Marcel de Vries Date: Wed, 31 Dec 2025 18:35:09 +0100 Subject: [PATCH 01/25] Add support for LSP workspace/didChangeWatchedFiles (#6524) Co-authored-by: Aiden Cline --- packages/opencode/src/lsp/client.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/opencode/src/lsp/client.ts b/packages/opencode/src/lsp/client.ts index b66bb9933d4..8704b65acb5 100644 --- a/packages/opencode/src/lsp/client.ts +++ b/packages/opencode/src/lsp/client.ts @@ -98,6 +98,9 @@ export namespace LSPClient { }, workspace: { configuration: true, + didChangeWatchedFiles: { + dynamicRegistration: true, + }, }, textDocument: { synchronization: { @@ -151,6 +154,16 @@ export namespace LSPClient { const version = files[input.path] if (version !== undefined) { + log.info("workspace/didChangeWatchedFiles", input) + await connection.sendNotification("workspace/didChangeWatchedFiles", { + changes: [ + { + uri: pathToFileURL(input.path).href, + type: 2, // Changed + }, + ], + }) + const next = version + 1 files[input.path] = next log.info("textDocument/didChange", { @@ -167,6 +180,16 @@ export namespace LSPClient { return } + log.info("workspace/didChangeWatchedFiles", input) + await connection.sendNotification("workspace/didChangeWatchedFiles", { + changes: [ + { + uri: pathToFileURL(input.path).href, + type: 1, // Created + }, + ], + }) + log.info("textDocument/didOpen", input) diagnostics.delete(input.path) await connection.sendNotification("textDocument/didOpen", { From de50e7f9b95c471332f145921c289e39980da479 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 31 Dec 2025 17:35:47 +0000 Subject: [PATCH 02/25] chore: generate --- packages/plugin/package.json | 2 +- packages/sdk/js/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin/package.json b/packages/plugin/package.json index b0b41dbca17..19f97602b8b 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -24,4 +24,4 @@ "typescript": "catalog:", "@typescript/native-preview": "catalog:" } -} \ No newline at end of file +} diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json index 0a1bca0f7e7..ba8bf0c874b 100644 --- a/packages/sdk/js/package.json +++ b/packages/sdk/js/package.json @@ -29,4 +29,4 @@ "publishConfig": { "directory": "dist" } -} \ No newline at end of file +} From dc3e731afe8685290834ce1227c54cd224820b43 Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Wed, 31 Dec 2025 12:05:35 -0600 Subject: [PATCH 03/25] ci: tweak changelog ensure all cmd/ things fall under tui section --- script/changelog.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/changelog.ts b/script/changelog.ts index 9e3b3c692e2..18fc609932f 100755 --- a/script/changelog.ts +++ b/script/changelog.ts @@ -64,7 +64,7 @@ export async function getCommits(from: string, to: string): Promise { const areas = new Set() for (const file of files.split("\n").filter(Boolean)) { - if (file.startsWith("packages/opencode/src/cli/cmd/tui/")) areas.add("tui") + if (file.startsWith("packages/opencode/src/cli/cmd/")) areas.add("tui") else if (file.startsWith("packages/opencode/")) areas.add("core") else if (file.startsWith("packages/desktop/src-tauri/")) areas.add("tauri") else if (file.startsWith("packages/desktop/")) areas.add("app") From e7422ee782264993394f5551275eccc8cc52e1de Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Wed, 31 Dec 2025 12:11:42 -0600 Subject: [PATCH 04/25] chore: rm unused import --- packages/opencode/src/command/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/opencode/src/command/index.ts b/packages/opencode/src/command/index.ts index c97bcfadd13..976f1cd51e9 100644 --- a/packages/opencode/src/command/index.ts +++ b/packages/opencode/src/command/index.ts @@ -1,4 +1,3 @@ -import { Bus } from "@/bus" import { BusEvent } from "@/bus/bus-event" import z from "zod" import { Config } from "../config/config" From 87f9ebd17c3836edb400ca4f0917213a8d6e46e9 Mon Sep 17 00:00:00 2001 From: Vlad Temian Date: Wed, 31 Dec 2025 21:04:23 +0200 Subject: [PATCH 05/25] fix(tui): don't show 'Agent not found' toast for subagents (#6528) --- .../opencode/src/cli/cmd/tui/component/prompt/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index 2a0ac846165..ab9487e1dd4 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -202,7 +202,11 @@ export function Prompt(props: PromptProps) { syncedSessionID = sessionID - if (msg.agent) local.agent.set(msg.agent) + // Only set agent if it's a primary agent (not a subagent) + const isPrimaryAgent = local.agent.list().some((x) => x.name === msg.agent) + if (msg.agent && isPrimaryAgent) { + local.agent.set(msg.agent) + } if (msg.model) local.model.set(msg.model) if (msg.variant) local.model.variant.set(msg.variant) } From 97a0fd1d54414e5563d0b47a02666d1d044c2cac Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Wed, 31 Dec 2025 13:11:12 -0600 Subject: [PATCH 06/25] Revert "fix(tui): don't show 'Agent not found' toast for subagents (#6528)" This reverts commit 87f9ebd17c3836edb400ca4f0917213a8d6e46e9. --- .../opencode/src/cli/cmd/tui/component/prompt/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index ab9487e1dd4..2a0ac846165 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -202,11 +202,7 @@ export function Prompt(props: PromptProps) { syncedSessionID = sessionID - // Only set agent if it's a primary agent (not a subagent) - const isPrimaryAgent = local.agent.list().some((x) => x.name === msg.agent) - if (msg.agent && isPrimaryAgent) { - local.agent.set(msg.agent) - } + if (msg.agent) local.agent.set(msg.agent) if (msg.model) local.model.set(msg.model) if (msg.variant) local.model.variant.set(msg.variant) } From a2857bba8305976761c55fda269d7fb79c951b8c Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Wed, 31 Dec 2025 10:58:49 -0600 Subject: [PATCH 07/25] fix(desktop): prompt input cleanup --- packages/app/src/components/prompt-input.tsx | 28 ++++++++----------- .../src/components/session-context-usage.tsx | 23 +++++++++------ packages/ui/src/components/tooltip.css | 7 +++-- packages/ui/src/styles/tailwind/colors.css | 4 +++ 4 files changed, 34 insertions(+), 28 deletions(-) diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index 5128fc0e6f5..9cc1579fb9e 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -1343,9 +1343,6 @@ export const PromptInput: Component = (props) => { : `Ask anything... "${PLACEHOLDERS[store.placeholder]}"`} -
- -
@@ -1421,7 +1418,7 @@ export const PromptInput: Component = (props) => {
-
+
= (props) => { e.currentTarget.value = "" }} /> - - - fileInputRef.click()} - /> - - +
+ + + + + + +
= (props) => { disabled={!prompt.dirty() && store.imageAttachments.length === 0 && !working()} icon={working() ? "stop" : "arrow-up"} variant="primary" - class="h-10 w-8" + class="h-6 w-4.5" />
diff --git a/packages/app/src/components/session-context-usage.tsx b/packages/app/src/components/session-context-usage.tsx index 0fa6bc99c98..92dcd20d239 100644 --- a/packages/app/src/components/session-context-usage.tsx +++ b/packages/app/src/components/session-context-usage.tsx @@ -35,20 +35,25 @@ export function SessionContextUsage() { {(ctx) => ( - Tokens - {ctx().tokens} - Usage - {ctx().percentage ?? 0}% - Cost - {cost()} +
+
+ {ctx().tokens} + Tokens +
+
+ {ctx().percentage ?? 0}% + Usage +
+
+ {cost()} + Cost +
} placement="top" > -
+
- {/* {`${ctx().percentage ?? 0}%`} */}
)} diff --git a/packages/ui/src/components/tooltip.css b/packages/ui/src/components/tooltip.css index 63798624926..f7afe16aa97 100644 --- a/packages/ui/src/components/tooltip.css +++ b/packages/ui/src/components/tooltip.css @@ -8,9 +8,10 @@ border-radius: var(--radius-md); background-color: var(--surface-float-base); color: var(--text-inverted-base); - color: rgba(253, 252, 252, 0.94); - padding: 2px 8px; - border: 0.5px solid rgba(253, 252, 252, 0.2); + background: var(--surface-float-base); + padding: 6px 12px; + border: 1px solid var(--border-weak-base, rgba(0, 0, 0, 0.07)); + box-shadow: var(--shadow-md); pointer-events: none !important; /* transition: all 150ms ease-out; */ diff --git a/packages/ui/src/styles/tailwind/colors.css b/packages/ui/src/styles/tailwind/colors.css index 59c61952aba..376cd35d322 100644 --- a/packages/ui/src/styles/tailwind/colors.css +++ b/packages/ui/src/styles/tailwind/colors.css @@ -77,6 +77,10 @@ --color-text-weaker: var(--text-weaker); --color-text-strong: var(--text-strong); --color-text-interactive-base: var(--text-interactive-base); + --color-text-invert-base: var(--text-invert-base); + --color-text-invert-weak: var(--text-invert-weak); + --color-text-invert-weaker: var(--text-invert-weaker); + --color-text-invert-strong: var(--text-invert-strong); --color-text-on-brand-base: var(--text-on-brand-base); --color-text-on-interactive-base: var(--text-on-interactive-base); --color-text-on-interactive-weak: var(--text-on-interactive-weak); From 3a1cfa6c731bc4c33348034cb918b7a4dbe2af8b Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Wed, 31 Dec 2025 11:24:45 -0600 Subject: [PATCH 08/25] chore(app): keybind tooltip component --- packages/app/src/components/prompt-input.tsx | 14 +---- packages/app/src/pages/layout.tsx | 38 ++++-------- packages/app/src/pages/session.tsx | 62 ++++++-------------- packages/ui/src/components/tooltip.css | 13 ++++ packages/ui/src/components/tooltip.tsx | 20 +++++++ 5 files changed, 66 insertions(+), 81 deletions(-) diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index 9cc1579fb9e..42a8e107a3f 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -11,7 +11,7 @@ import { useSync } from "@/context/sync" import { FileIcon } from "@opencode-ai/ui/file-icon" import { Button } from "@opencode-ai/ui/button" import { Icon } from "@opencode-ai/ui/icon" -import { Tooltip } from "@opencode-ai/ui/tooltip" +import { Tooltip, TooltipKeybind } from "@opencode-ai/ui/tooltip" import { IconButton } from "@opencode-ai/ui/icon-button" import { Select } from "@opencode-ai/ui/select" import { getDirectory, getFilename } from "@opencode-ai/util/path" @@ -1355,15 +1355,7 @@ export const PromptInput: Component = (props) => {
- - Cycle agent - {command.keybind("agent.cycle")} -
- } - > +