summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/internal/components/chat/editor.go
diff options
context:
space:
mode:
authorAdi Yeroslav <[email protected]>2025-07-10 13:57:52 +0300
committerGitHub <[email protected]>2025-07-10 05:57:52 -0500
commita1701678cdde92117c085dcdf6bf5629b576e689 (patch)
tree345bc5533d11aaa964a2baf5633331724ffd50d0 /packages/tui/internal/components/chat/editor.go
parentc411a26d6fbc4bd785ca001c529bc67c97a0a1bc (diff)
downloadopencode-a1701678cdde92117c085dcdf6bf5629b576e689.tar.gz
opencode-a1701678cdde92117c085dcdf6bf5629b576e689.zip
feat(tui): /editor - change the auto-send behavior to put content in input box instead (#827)
Diffstat (limited to 'packages/tui/internal/components/chat/editor.go')
-rw-r--r--packages/tui/internal/components/chat/editor.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/tui/internal/components/chat/editor.go b/packages/tui/internal/components/chat/editor.go
index 444f5bef1..6503d91e1 100644
--- a/packages/tui/internal/components/chat/editor.go
+++ b/packages/tui/internal/components/chat/editor.go
@@ -38,6 +38,7 @@ type EditorComponent interface {
Clear() (tea.Model, tea.Cmd)
Paste() (tea.Model, tea.Cmd)
Newline() (tea.Model, tea.Cmd)
+ SetValue(value string)
SetInterruptKeyInDebounce(inDebounce bool)
SetExitKeyInDebounce(inDebounce bool)
}
@@ -401,6 +402,10 @@ func (m *editorComponent) SetInterruptKeyInDebounce(inDebounce bool) {
m.interruptKeyInDebounce = inDebounce
}
+func (m *editorComponent) SetValue(value string) {
+ m.textarea.SetValue(value)
+}
+
func (m *editorComponent) SetExitKeyInDebounce(inDebounce bool) {
m.exitKeyInDebounce = inDebounce
}