Quellcode durchsuchen

fix(opencode): update spinner color logic (#28032)

Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
OpeOginni vor 3 Monaten
Ursprung
Commit
4b496066bf
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen
  1. 4 1
      packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx

+ 4 - 1
packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx

@@ -1438,7 +1438,10 @@ export function Prompt(props: PromptProps) {
   })
 
   const spinnerDef = createMemo(() => {
-    const agent = local.agent.current()
+    const agent =
+      status().type !== "idle"
+        ? (local.agent.list().find((a) => a.name === lastUserMessage()?.agent) ?? local.agent.current())
+        : local.agent.current()
     const color = agent ? local.agent.color(agent.name) : theme.border
     return {
       frames: createFrames({