Merge pull request #63086 from NousResearch/bb/salvage-59241-workspace-status

feat(desktop): add workspace path status action (supersedes #59241)
This commit is contained in:
brooklyn! 2026-07-12 04:01:39 -05:00 committed by GitHub
commit 7c14d2a046
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 48 additions and 1 deletions

View file

@ -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,
@ -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
@ -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)
@ -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',
@ -337,6 +379,10 @@ export function useStatusbarItems({
agentsOpen,
commandCenterOpen,
copy,
currentCwd,
fileMenu.copyPath,
fileMenu.revealFileManager,
fileMenu.revealInSidebar,
gatewayMenuContent,
gatewayClassName,
gatewayDetail,

View file

@ -45,6 +45,7 @@ ACP_REGISTRY_MANIFEST = REPO_ROOT / "acp_registry" / "agent.json"
# 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)