From 0eaa6b5fc8267866b18298457e0f381d1a3ff61c Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Sun, 8 Feb 2026 18:44:07 -0500 Subject: [PATCH] tui: add handoff autocomplete suggestion with text command --- .../cli/cmd/tui/component/prompt/autocomplete.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx index 42cf82b421..05fd6d143d 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/autocomplete.tsx @@ -355,6 +355,18 @@ export function Autocomplete(props: { const commands = createMemo((): AutocompleteOption[] => { const results: AutocompleteOption[] = [...command.slashes()] + results.push({ + display: "/handoff", + description: "Handoff to another context with a goal", + onSelect: () => { + const newText = "/handoff " + const cursor = props.input().logicalCursor + props.input().deleteRange(0, 0, cursor.row, cursor.col) + props.input().insertText(newText) + props.input().cursorOffset = Bun.stringWidth(newText) + }, + }) + for (const serverCommand of sync.data.command) { if (serverCommand.source === "skill") continue const label = serverCommand.source === "mcp" ? ":mcp" : ""