瀏覽代碼

fix(tui): input latency optimization

adamdottv 1 年之前
父節點
當前提交
b1a3599017
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      packages/tui/internal/components/chat/editor.go

+ 3 - 0
packages/tui/internal/components/chat/editor.go

@@ -54,6 +54,9 @@ func (m *editorComponent) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 	var cmd tea.Cmd
 	var cmd tea.Cmd
 
 
 	switch msg := msg.(type) {
 	switch msg := msg.(type) {
+	case spinner.TickMsg:
+		m.spinner, cmd = m.spinner.Update(msg)
+		return m, cmd
 	case tea.KeyPressMsg:
 	case tea.KeyPressMsg:
 		// Maximize editor responsiveness for printable characters
 		// Maximize editor responsiveness for printable characters
 		if msg.Text != "" {
 		if msg.Text != "" {