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 c13b436514f..1c9bb9f1f64 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -342,11 +342,10 @@ export function Prompt(props: PromptProps) { dialog.replace(() => ( { - input.setText(`/${skill} `) - setStore("prompt", { - input: `/${skill} `, - parts: [], - }) + input.gotoBufferEnd() + const text = `/${skill} ` + input.insertText(text) + setStore("prompt", "input", (value) => value + text) input.gotoBufferEnd() }} />