feat: sync thinking state to session list view (#32)

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2026-01-04 20:48:21 +08:00
committed by GitHub
parent 37c6bc83d7
commit d1c532301e
3 changed files with 7 additions and 1 deletions
+2
View File
@@ -25,6 +25,7 @@ type SessionSummaryMetadata = {
type SessionSummary = {
id: string
active: boolean
thinking: boolean
activeAt: number
updatedAt: number
metadata: SessionSummaryMetadata | null
@@ -53,6 +54,7 @@ function toSessionSummary(session: Session): SessionSummary {
return {
id: session.id,
active: session.active,
thinking: session.thinking,
activeAt: session.activeAt,
updatedAt: session.updatedAt,
metadata,
+4 -1
View File
@@ -193,6 +193,9 @@ function SessionItem(props: {
})
const sessionName = getSessionTitle(s)
const statusDotClass = s.active
? (s.thinking ? 'bg-[#007AFF]' : 'bg-[var(--app-badge-success-text)]')
: 'bg-[var(--app-hint)]'
return (
<>
@@ -206,7 +209,7 @@ function SessionItem(props: {
<div className="flex items-center gap-2 min-w-0">
<span className="flex h-4 w-4 items-center justify-center" aria-hidden="true">
<span
className={`h-2 w-2 rounded-full ${s.active ? 'bg-[var(--app-badge-success-text)]' : 'bg-[var(--app-hint)]'}`}
className={`h-2 w-2 rounded-full ${statusDotClass}`}
/>
</span>
<div className="truncate text-sm font-medium">
+1
View File
@@ -33,6 +33,7 @@ export type SessionSummaryMetadata = {
export type SessionSummary = {
id: string
active: boolean
thinking: boolean
activeAt: number
updatedAt: number
metadata: SessionSummaryMetadata | null