Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion apps/desktop/src/app/chat/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ import {
setCurrentCwd
} from '@/store/session'

import { type AppView, ARTIFACTS_ROUTE, MESSAGING_ROUTE, SKILLS_ROUTE } from '../../routes'
import { type AppView, ARTIFACTS_ROUTE, MESSAGING_ROUTE, SKILLS_ROUTE, TASKS_ROUTE } from '../../routes'
import type { SidebarNavItem } from '../../types'

import { countLabel } from './chrome'
Expand Down Expand Up @@ -143,6 +143,12 @@ const SIDEBAR_NAV: SidebarNavItem[] = [
icon: props => <Codicon name="symbol-misc" {...props} />,
route: SKILLS_ROUTE
},
{
id: 'tasks',
label: '',
icon: props => <Codicon name="checklist" {...props} />,
route: TASKS_ROUTE
},
{ id: 'messaging', label: '', icon: props => <Codicon name="comment" {...props} />, route: MESSAGING_ROUTE },
{ id: 'artifacts', label: '', icon: props => <Codicon name="files" {...props} />, route: ARTIFACTS_ROUTE }
]
Expand Down Expand Up @@ -1052,6 +1058,7 @@ export function ChatSidebar({

const active =
(item.id === 'skills' && currentView === 'skills') ||
(item.id === 'tasks' && currentView === 'tasks') ||
(item.id === 'messaging' && currentView === 'messaging') ||
(item.id === 'artifacts' && currentView === 'artifacts')

Expand Down
9 changes: 9 additions & 0 deletions apps/desktop/src/app/desktop-controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ const MessagingView = lazy(async () => ({ default: (await import('./messaging'))
const ProfilesView = lazy(async () => ({ default: (await import('./profiles')).ProfilesView }))
const SettingsView = lazy(async () => ({ default: (await import('./settings')).SettingsView }))
const SkillsView = lazy(async () => ({ default: (await import('./skills')).SkillsView }))
const TasksView = lazy(async () => ({ default: (await import('./tasks')).TasksView }))

// Latest cron-job sessions surfaced in the collapsed "Cron jobs" section. The
// Cron sessions are written by a background scheduler tick (the desktop
Expand Down Expand Up @@ -1194,6 +1195,14 @@ export function DesktopController() {
}
path="skills"
/>
<Route
element={
<Suspense fallback={null}>
<TasksView setStatusbarItemGroup={setStatusbarItemGroup} />
</Suspense>
}
path="tasks"
/>
<Route
element={
<Suspense fallback={null}>
Expand Down
4 changes: 4 additions & 0 deletions apps/desktop/src/app/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const NEW_CHAT_ROUTE = '/'
export const SETTINGS_ROUTE = '/settings'
export const COMMAND_CENTER_ROUTE = '/command-center'
export const SKILLS_ROUTE = '/skills'
export const TASKS_ROUTE = '/tasks'
export const MESSAGING_ROUTE = '/messaging'
export const ARTIFACTS_ROUTE = '/artifacts'
export const CRON_ROUTE = '/cron'
Expand All @@ -20,6 +21,7 @@ export type AppView =
| 'profiles'
| 'settings'
| 'skills'
| 'tasks'
| 'starmap'

export type AppRouteId =
Expand All @@ -32,6 +34,7 @@ export type AppRouteId =
| 'profiles'
| 'settings'
| 'skills'
| 'tasks'
| 'starmap'

export interface AppRoute {
Expand All @@ -45,6 +48,7 @@ export const APP_ROUTES = [
{ id: 'settings', path: SETTINGS_ROUTE, view: 'settings' },
{ id: 'command-center', path: COMMAND_CENTER_ROUTE, view: 'command-center' },
{ id: 'skills', path: SKILLS_ROUTE, view: 'skills' },
{ id: 'tasks', path: TASKS_ROUTE, view: 'tasks' },
{ id: 'messaging', path: MESSAGING_ROUTE, view: 'messaging' },
{ id: 'artifacts', path: ARTIFACTS_ROUTE, view: 'artifacts' },
{ id: 'cron', path: CRON_ROUTE, view: 'cron' },
Expand Down
6 changes: 6 additions & 0 deletions apps/desktop/src/app/session/hooks/use-session-state-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { setMutableRef } from '@/lib/mutable-ref'
import {
$busy,
$messages,
clearRuntimeSessionMapping,
noteSessionActivity,
onSessionWatchdogClear,
setCurrentFastMode,
Expand All @@ -16,6 +17,7 @@ import {
setCurrentProvider,
setCurrentReasoningEffort,
setCurrentServiceTier,
setRuntimeSessionMapping,
setSessionAttention,
setSessionWorking,
setTurnStartedAt,
Expand Down Expand Up @@ -106,13 +108,16 @@ export function useSessionStateCache({

if (storedSessionId) {
runtimeIdByStoredSessionIdRef.current.set(storedSessionId, sessionId)
setRuntimeSessionMapping(storedSessionId, sessionId)

if (existing.busy) {
setSessionWorking(storedSessionId, true)
}
}

if (previousStoredSessionId && previousStoredSessionId !== storedSessionId) {
runtimeIdByStoredSessionIdRef.current.delete(previousStoredSessionId)
clearRuntimeSessionMapping(previousStoredSessionId, sessionId)
setSessionWorking(previousStoredSessionId, false)
}
}
Expand All @@ -125,6 +130,7 @@ export function useSessionStateCache({

if (storedSessionId) {
runtimeIdByStoredSessionIdRef.current.set(storedSessionId, sessionId)
setRuntimeSessionMapping(storedSessionId, sessionId)
}

return created
Expand Down
Loading
Loading