Skip to content
Merged
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
48 changes: 47 additions & 1 deletion apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ import { GatewayMenuPanel } from '@/app/shell/gateway-menu-panel'
import { Codicon } from '@/components/ui/codicon'
import { GlyphSpinner } from '@/components/ui/glyph-spinner'
import { useI18n } from '@/i18n'
import { Activity, AlertCircle, Clock, Command, Hash, Loader2, Terminal, Zap, ZapFilled } from '@/lib/icons'
import { Activity, AlertCircle, Clock, Command, FolderOpen, Hash, Loader2, Terminal, Zap, ZapFilled } from '@/lib/icons'
import type { RuntimeReadinessResult } from '@/lib/runtime-readiness'
import { contextBarLabel, LiveDuration, usageContextLabel } from '@/lib/statusbar'
import { cn } from '@/lib/utils'
import { setGlobalYolo, setSessionYolo } from '@/lib/yolo-session'
import { copyFilePath, revealFile } from '@/store/file-actions'
import { revealFileInTree } from '@/store/layout'
import {
$activeSessionId,
$busy,
$connection,
$currentCwd,
$currentUsage,
$sessionStartedAt,
$turnStartedAt,
Expand All @@ -38,6 +41,13 @@ import type { StatusResponse } from '@/types/hermes'
import { CRON_ROUTE } from '../../routes'
import type { StatusbarItem, StatusbarSelectModifiers } from '../statusbar-controls'

function workspaceLabel(cwd: string): string {
const normalized = cwd.replace(/[\\/]+$/, '')
const leaf = normalized.split(/[\\/]/).filter(Boolean).pop()

return leaf || cwd
}

interface StatusbarItemsOptions {
agentsOpen: boolean
chatOpen: boolean
Expand Down Expand Up @@ -71,10 +81,12 @@ export function useStatusbarItems({
}: StatusbarItemsOptions) {
const { t } = useI18n()
const copy = t.shell.statusbar
const fileMenu = t.fileMenu
const activeSessionId = useStore($activeSessionId)
const terminalTakeover = useStore($terminalTakeover)
const yoloActive = useStore($yoloActive)
const busy = useStore($busy)
const currentCwd = useStore($currentCwd)
const currentUsage = useStore($currentUsage)
const gatewayRestarting = useStore($gatewayRestarting)
const sessionStartedAt = useStore($sessionStartedAt)
Expand Down Expand Up @@ -299,6 +311,36 @@ export function useStatusbarItems({
title: inferenceStatus?.reason || copy.gatewayTitle,
variant: 'menu'
},
{
hidden: !currentCwd,
icon: <FolderOpen className="size-3" />,
id: 'workspace-cwd',
label: currentCwd ? workspaceLabel(currentCwd) : undefined,
menuItems: currentCwd
? [
{
id: 'copy-workspace-path',
label: fileMenu.copyPath,
onSelect: () => void copyFilePath(currentCwd),
title: currentCwd
},
{
id: 'reveal-workspace-finder',
label: fileMenu.revealFileManager,
onSelect: () => void revealFile(currentCwd),
title: currentCwd
},
{
id: 'reveal-workspace-sidebar',
label: fileMenu.revealInSidebar,
onSelect: () => revealFileInTree(currentCwd),
title: currentCwd
}
]
: undefined,
title: currentCwd || undefined,
variant: 'menu'
},
{
className: cn(
agentsOpen && 'bg-accent/55 text-foreground',
Expand Down Expand Up @@ -337,6 +379,10 @@ export function useStatusbarItems({
agentsOpen,
commandCenterOpen,
copy,
currentCwd,
fileMenu.copyPath,
fileMenu.revealFileManager,
fileMenu.revealInSidebar,
gatewayMenuContent,
gatewayClassName,
gatewayDetail,
Expand Down
1 change: 1 addition & 0 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

# Auto-extracted from noreply emails + manual overrides
AUTHOR_MAP = {
"true@supersynergy.de": "Supersynergy", # PR #59241 salvage (desktop: workspace path status-bar action)
"esthon@gmail.com": "esthonjr", # PR #61950 salvage (desktop: legacy non-git workspace grouping + Windows path identity)
"iganapolsky@gmail.com": "IgorGanapolsky", # PR #62125 salvage (compaction anti-thrash threshold verification)
"tturney1@gmail.com": "TheTom", # PR #62696 salvage (gateway: expand @ context references under runtime/session model resolution)
Expand Down
Loading