mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
feat: replay session statuses on upstream reconnect and add compact type (#268)
This commit is contained in:
1 parent
95ae584f6a
commit
ec7a47dc10
4 files changed
+128
-4
No files matched your search
@@ -36,8 +36,8 @@ const isMessageStreaming = (msg: Message): boolean => {
|
||||
return !('completed' in msg.time && msg.time.completed)
|
||||
}
|
||||
|
||||
function isSessionInRetry(sessionStatus: { type?: string }): boolean {
|
||||
return sessionStatus?.type === 'retry'
|
||||
function isSessionStatusActive(sessionStatus: { type?: string }): boolean {
|
||||
return sessionStatus?.type !== undefined && sessionStatus.type !== 'idle'
|
||||
}
|
||||
|
||||
const compareMessageIds = (id1: string, id2: string): number => {
|
||||
@@ -363,7 +363,7 @@ export const MessageThread = memo(function MessageThread({
|
||||
return map
|
||||
}, [messages])
|
||||
|
||||
const isSessionBusy = !!pendingAssistantId || isSessionInRetry(sessionStatus)
|
||||
const isSessionBusy = !!pendingAssistantId || isSessionStatusActive(sessionStatus)
|
||||
const setSessionTodos = useSessionTodos((state) => state.setTodos)
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user