diff --git a/CHANGELOG.md b/CHANGELOG.md index fe235a6..68c8df2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 1.0.0 — Unreleased +- Show Codex, Claude, or Custom directly on every local and cross-window agent + row while preserving status icons for activity and attention. - Clear stale attention indicators as soon as updates are read, prefer unread activity during navigation, synchronize the newest Claude usage observation across windows, and discard quota windows after their reset time. diff --git a/src/sessionTree.ts b/src/sessionTree.ts index 263fa64..c27bc24 100644 --- a/src/sessionTree.ts +++ b/src/sessionTree.ts @@ -8,6 +8,7 @@ import type { CoordinationService } from './coordinationService'; import { dedupeCoordinatedSessions } from './historyQuery'; import type { SessionEvent } from './sessionEvents'; import type { SessionManager } from './sessionManager'; +import { providerDisplayName } from './sessionNaming'; import { normalizeSessionOrder, reorderSessionIds @@ -80,7 +81,7 @@ export class SessionTreeItem extends vscode.TreeItem { this.description = sessionDescription(session); this.tooltip = [ session.label, - `Agent: ${session.kind}`, + `Provider: ${providerDisplayName(session.kind)}`, `Status: ${session.status}`, `Directory: ${session.cwd}`, ...(session.baseline ? [`Branch: ${session.baseline.branch}`] : []), @@ -109,7 +110,9 @@ export class SessionTreeItem extends vscode.TreeItem { arguments: [this] }; this.accessibilityInformation = { - label: `${session.label}, ${session.status}${session.unread ? ', unread' : ''}` + label: `${session.label}, ${providerDisplayName(session.kind)}, ${session.status}${ + session.unread ? ', unread' : '' + }` }; } } @@ -122,7 +125,11 @@ export class LiveSessionTreeItem extends vscode.TreeItem { super(coordinatedSession.label, vscode.TreeItemCollapsibleState.None); this.id = `live-${coordinatedWindow.windowId}-${coordinatedSession.sessionId}`; this.contextValue = 'lookout.liveSession'; - this.description = `${coordinatedWindow.workspaceLabel} · ${coordinatedSession.status}${coordinatedSession.unread ? ' · unread' : ''}`; + this.description = `${providerDisplayName(coordinatedSession.kind)} · ${ + coordinatedWindow.workspaceLabel + } · ${coordinatedSession.status}${ + coordinatedSession.unread ? ' · unread' : '' + }`; this.iconPath = coordinatedSession.status === 'attention' && coordinatedSession.unread ? new vscode.ThemeIcon( @@ -133,7 +140,7 @@ export class LiveSessionTreeItem extends vscode.TreeItem { this.tooltip = [ coordinatedSession.label, `Owning project: ${coordinatedWindow.workspaceLabel}`, - `Provider: ${coordinatedSession.kind}`, + `Provider: ${providerDisplayName(coordinatedSession.kind)}`, `Live status: ${coordinatedSession.status}`, `Execution host: ${hostLabel(coordinatedWindow.hostKind)}`, `Lease expires: ${new Date(coordinatedWindow.leaseExpiresAt).toLocaleTimeString()}`, @@ -145,7 +152,9 @@ export class LiveSessionTreeItem extends vscode.TreeItem { arguments: [this] }; this.accessibilityInformation = { - label: `${coordinatedSession.label}, ${coordinatedWindow.workspaceLabel}, live ${coordinatedSession.status}` + label: `${coordinatedSession.label}, ${providerDisplayName( + coordinatedSession.kind + )}, ${coordinatedWindow.workspaceLabel}, live ${coordinatedSession.status}` }; } } @@ -366,10 +375,11 @@ export class SessionStatusBar implements vscode.Disposable { function sessionDescription(session: AgentSession): string { const directory = path.basename(session.cwd); const unread = session.unread ? '● ' : ''; + const provider = providerDisplayName(session.kind); const detail = statusLabel(session.status); const branch = session.baseline?.branch ? ` · ${session.baseline.branch}` : ''; const tokens = sessionTokenSummary(session); - return `${unread}${directory}${branch} · ${detail}${ + return `${unread}${provider} · ${directory}${branch} · ${detail}${ tokens ? ` · ${tokens}` : '' }`; } diff --git a/test/integration/lookout.integration.ts b/test/integration/lookout.integration.ts index 69bfbac..beefff7 100644 --- a/test/integration/lookout.integration.ts +++ b/test/integration/lookout.integration.ts @@ -148,6 +148,25 @@ suite('Lookout extension-host integration', () => { ); }); + test('shows each agent provider directly on Agents rows', () => { + const descriptions = (['codex', 'claude', 'custom'] as const).map( + (kind) => new SessionTreeItem({ ...session, kind }).description + ); + assert.deepEqual( + descriptions.map((description) => String(description).split(' · ')[0]), + ['Codex', 'Claude', 'Custom'] + ); + + const remoteWindow = coordinatedWindow([ + { ...coordinatedSession('remote-claude', 'running', false, 1), kind: 'claude' } + ]); + const remoteRow = new LiveSessionTreeItem( + remoteWindow, + remoteWindow.sessions[0] + ); + assert.match(String(remoteRow.description), /^Claude · Remote Workspace · /); + }); + test('projects current metadata into host-local global history', async () => { const record = await waitForValue( () => api.globalHistory