|
@@ -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"))
|
|
|
|
|
|