fix(tui): Enter 提交文本,不再换行

OpenTUI textarea 多行模式下 Enter 默认换行,改为拦截 Enter 调用
submitPrompt() 提交。这是一个命令提示符输入框,不需要多行。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
AirCoding
2026-06-10 09:24:17 +08:00
parent 3cb598d77b
commit 2a20a7652f

View File

@@ -349,6 +349,12 @@ function AirCodingView(props: {
}
}
if (event.name === 'return') {
event.preventDefault()
submitPrompt()
return
}
if (event.ctrl && event.name === 'c') {
event.preventDefault()
if (textarea && !textarea.isDestroyed && textarea.plainText.length > 0) {