From 11efda3f5caae86848478cebe479cab5f5fde002 Mon Sep 17 00:00:00 2001
From: Rhys Sullivan <39114868+RhysSullivan@users.noreply.github.com>
Date: Thu, 11 Dec 2025 18:57:03 -0800
Subject: [PATCH] [feat]: show indicator for in progress chats in the sessions
list (#5417)
---
.../src/cli/cmd/tui/component/dialog-session-list.tsx | 6 ++++++
packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx | 10 +++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx
index 9610ca6d3..f5e0efa49 100644
--- a/packages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx
+++ b/packages/opencode/src/cli/cmd/tui/component/dialog-session-list.tsx
@@ -8,6 +8,7 @@ import { Keybind } from "@/util/keybind"
import { useTheme } from "../context/theme"
import { useSDK } from "../context/sdk"
import { DialogSessionRename } from "./dialog-session-rename"
+import "opentui-spinner/solid"
export function DialogSessionList() {
const dialog = useDialog()
@@ -22,6 +23,8 @@ export function DialogSessionList() {
const currentSessionID = createMemo(() => (route.data.type === "session" ? route.data.sessionID : undefined))
+ const spinnerFrames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
+
const options = createMemo(() => {
const today = new Date().toDateString()
return sync.data.session
@@ -34,12 +37,15 @@ export function DialogSessionList() {
category = "Today"
}
const isDeleting = toDelete() === x.id
+ const status = sync.data.session_status[x.id]
+ const isWorking = status?.type === "busy"
return {
title: isDeleting ? `Press ${deleteKeybind} again to confirm` : x.title,
bg: isDeleting ? theme.error : undefined,
value: x.id,
category,
footer: Locale.time(x.time.updated),
+ gutter: isWorking ? : undefined,
}
})
.slice(0, 150)
diff --git a/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx b/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx
index b6c5b5f8b..3f49a7c32 100644
--- a/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx
+++ b/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx
@@ -36,6 +36,7 @@ export interface DialogSelectOption {
category?: string
disabled?: boolean
bg?: RGBA
+ gutter?: JSX.Element
onSelect?: (ctx: DialogContext, trigger?: "prompt") => void
}
@@ -239,7 +240,7 @@ export function DialogSelect(props: DialogSelectProps) {
moveTo(index)
}}
backgroundColor={active() ? (option.bg ?? theme.primary) : RGBA.fromInts(0, 0, 0, 0)}
- paddingLeft={current() ? 1 : 3}
+ paddingLeft={current() || option.gutter ? 1 : 3}
paddingRight={3}
gap={1}
>
@@ -249,6 +250,7 @@ export function DialogSelect(props: DialogSelectProps) {
description={option.description !== category ? option.description : undefined}
active={active()}
current={current()}
+ gutter={option.gutter}
/>
)
@@ -282,6 +284,7 @@ function Option(props: {
active?: boolean
current?: boolean
footer?: JSX.Element | string
+ gutter?: JSX.Element
onMouseOver?: () => void
}) {
const { theme } = useTheme()
@@ -294,6 +297,11 @@ function Option(props: {
●
+
+
+ {props.gutter}
+
+