wip: tui api

This commit is contained in:
Dax Raad
2025-07-22 12:14:14 -04:00
parent 01f8d3b05d
commit 5aafab118f
13 changed files with 127 additions and 414 deletions

View File

@@ -509,13 +509,13 @@ func (a Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case "/tui/open-help":
helpDialog := dialog.NewHelpDialog(a.app)
a.modal = helpDialog
case "/tui/prompt":
case "/tui/append-prompt":
var body struct {
Text string `json:"text"`
Parts []opencode.Part `json:"parts"`
}
json.Unmarshal((msg.Body), &body)
a.editor.SetValue(body.Text)
a.editor.SetValueWithAttachments(strings.TrimRight(a.editor.Value(), " ") + " " + body.Text + " ")
default:
break
}