ソースを参照

Fix working indicator to only show when message is incomplete

🤖 Generated with opencode
Co-Authored-By: opencode <[email protected]>
Dax Raad 9 ヶ月 前
コミット
4fa4246c10
1 ファイル変更6 行追加1 行削除
  1. 6 1
      internal/tui/components/chat/messages.go

+ 6 - 1
internal/tui/components/chat/messages.go

@@ -238,7 +238,12 @@ func (m *messagesCmp) working() string {
 		t := theme.CurrentTheme()
 		t := theme.CurrentTheme()
 		baseStyle := styles.BaseStyle()
 		baseStyle := styles.BaseStyle()
 
 
-		task := "Working..."
+		task := ""
+
+		lastMessage := m.app.Messages[len(m.app.Messages)-1]
+		if lastMessage.Metadata.Time.Completed == nil {
+			task = "Working..."
+		}
 		// lastMessage := m.app.Messages[len(m.app.Messages)-1]
 		// lastMessage := m.app.Messages[len(m.app.Messages)-1]
 		// if hasToolsWithoutResponse(m.app.Messages) {
 		// if hasToolsWithoutResponse(m.app.Messages) {
 		// 	task = "Waiting for tool response..."
 		// 	task = "Waiting for tool response..."