2
0
Эх сурвалжийг харах

tweak: make message border match color of agent it was sent to

Aiden Cline 2 сар өмнө
parent
commit
a4e3451d5c

+ 2 - 1
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

@@ -957,13 +957,14 @@ function UserMessage(props: {
   pending?: string
   pending?: string
 }) {
 }) {
   const ctx = use()
   const ctx = use()
+  const local = useLocal()
   const text = createMemo(() => props.parts.flatMap((x) => (x.type === "text" && !x.synthetic ? [x] : []))[0])
   const text = createMemo(() => props.parts.flatMap((x) => (x.type === "text" && !x.synthetic ? [x] : []))[0])
   const files = createMemo(() => props.parts.flatMap((x) => (x.type === "file" ? [x] : [])))
   const files = createMemo(() => props.parts.flatMap((x) => (x.type === "file" ? [x] : [])))
   const sync = useSync()
   const sync = useSync()
   const { theme } = useTheme()
   const { theme } = useTheme()
   const [hover, setHover] = createSignal(false)
   const [hover, setHover] = createSignal(false)
   const queued = createMemo(() => props.pending && props.message.id > props.pending)
   const queued = createMemo(() => props.pending && props.message.id > props.pending)
-  const color = createMemo(() => (queued() ? theme.accent : theme.secondary))
+  const color = createMemo(() => (queued() ? theme.accent : local.agent.color(props.message.agent)))
 
 
   const compaction = createMemo(() => props.parts.find((x) => x.type === "compaction"))
   const compaction = createMemo(() => props.parts.find((x) => x.type === "compaction"))