fix: Scroll chat to bottom immediately on user message send
This commit is contained in:
@@ -579,10 +579,9 @@ function handleSessionChange(sessionId: string) {
|
||||
|
||||
function handleSubmit(text: string) {
|
||||
messages.push({ id: ++idCounter, role: 'user', content: text, status: 'sent' })
|
||||
scrollToBottom()
|
||||
emit('submit', text)
|
||||
// Send text as input to the agent's terminal PTY
|
||||
agentTerminal.sendPrompt(text)
|
||||
// Real response will arrive via transcript-update WebSocket
|
||||
}
|
||||
|
||||
function handleMic() {
|
||||
@@ -599,9 +598,9 @@ function handleTranscriptDone(text: string) {
|
||||
if (!text.trim()) return
|
||||
|
||||
messages.push({ id: ++idCounter, role: 'user', content: text, status: 'sent' })
|
||||
scrollToBottom()
|
||||
emit('submit', text)
|
||||
agentTerminal.sendPrompt(text)
|
||||
// Real response will arrive via transcript-update WebSocket
|
||||
}
|
||||
|
||||
function toggleSettings() {
|
||||
|
||||
Reference in New Issue
Block a user