diff --git a/.changeset/lean-workspace-context.md b/.changeset/lean-workspace-context.md
new file mode 100644
index 0000000..4542b43
--- /dev/null
+++ b/.changeset/lean-workspace-context.md
@@ -0,0 +1,5 @@
+---
+"@jmfederico/pi-web": patch
+---
+
+Reduce repeated workspace details in the chat status bar and workspace tool header so workspace context stays in the workspace chip.
diff --git a/src/client/src/components/PiWebApp.ts b/src/client/src/components/PiWebApp.ts
index 4bc238c..d8c0efc 100644
--- a/src/client/src/components/PiWebApp.ts
+++ b/src/client/src/components/PiWebApp.ts
@@ -726,7 +726,6 @@ export class PiWebApp extends LitElement {
private renderWorkspacePanel() {
const workspace = this.state.selectedWorkspace;
const panelContext = workspace === undefined ? undefined : this.createWorkspacePanelContext(workspace);
- const workspaceLabelItems = workspace === undefined ? [] : this.workspaceLabelItems(workspace);
const emptyState = workspace === undefined ? this.workspacePanelEmptyState() : undefined;
return html`
{ this.openWorkspaceTool(tool); }}
>
`;
@@ -1384,7 +1382,7 @@ export class PiWebApp extends LitElement {
${state.selectedSession ? html`
0} .loadingMore=${state.isLoadingEarlierMessages} .isReceivingPartialStream=${state.isReceivingPartialStream} .isCompacting=${state.status?.isCompacting === true} .pendingMessageCount=${state.status?.pendingMessageCount ?? 0} .status=${state.status} .activity=${state.activity} .onLoadMore=${() => this.withChatPrependTransition(() => this.sessions.loadEarlierMessages())}>
0} .status=${state.status} .onSend=${(text: string, streamingBehavior?: "steer" | "followUp") => { this.sendPrompt(text, streamingBehavior); }} .onStop=${() => this.sessions.stopActiveWork()} .onSelectModel=${() => { void this.openModelDialog(); }} .onSelectThinking=${() => { void this.openThinkingDialog(); }}>
-
+
${state.commandDialog !== undefined ? html` this.sessions.respondToCommand(state.commandDialog?.requestId ?? "", value)} .onCancel=${() => { this.sessions.cancelCommand(); }}>` : null}
${state.modelDialog !== undefined ? html` { void this.pickModel(value); }} .onCancel=${() => { this.setState({ modelDialog: undefined }); }}>` : null}
${state.thinkingDialog !== undefined ? html` { void this.pickThinking(value); }} .onCancel=${() => { this.setState({ thinkingDialog: undefined }); }}>` : null}
diff --git a/src/client/src/components/StatusBar.ts b/src/client/src/components/StatusBar.ts
index 72666e1..3fa605b 100644
--- a/src/client/src/components/StatusBar.ts
+++ b/src/client/src/components/StatusBar.ts
@@ -1,17 +1,13 @@
import { LitElement, html } from "lit";
import { customElement, property } from "lit/decorators.js";
-import type { Machine, SessionStatus, Workspace } from "../api";
-import type { WorkspaceLabelItem } from "../plugins/types";
+import type { Machine, SessionStatus } from "../api";
import { formatCost, formatTokenCount } from "../utils/format";
import { statusBarStyles } from "./shared";
-import { renderWorkspaceLabel } from "./workspaceLabel";
@customElement("status-bar")
export class StatusBar extends LitElement {
@property({ attribute: false }) status?: SessionStatus;
@property({ attribute: false }) machine?: Machine;
- @property({ attribute: false }) workspace?: Workspace;
- @property({ attribute: false }) workspaceLabelItems: WorkspaceLabelItem[] = [];
override render() {
const status = this.status;
@@ -26,7 +22,6 @@ export class StatusBar extends LitElement {
return html`
${this.machine?.name ?? "Local"}
- ${renderWorkspaceLabel(this.workspace?.label ?? "workspace", this.workspaceLabelItems, this.workspace?.path)}
↑${formatTokenCount(tokens.input)}
↓${formatTokenCount(tokens.output)}
${contextText}
diff --git a/src/client/src/components/WorkspacePanel.ts b/src/client/src/components/WorkspacePanel.ts
index ced47fb..43f3029 100644
--- a/src/client/src/components/WorkspacePanel.ts
+++ b/src/client/src/components/WorkspacePanel.ts
@@ -1,9 +1,8 @@
import { LitElement, html, type TemplateResult } from "lit";
import { customElement, property, query, state } from "lit/decorators.js";
import type { Workspace } from "../api";
-import type { QualifiedContributionId, QualifiedWorkspacePanelContribution, WorkspaceLabelItem, WorkspacePanelContext } from "../plugins/types";
+import type { QualifiedContributionId, QualifiedWorkspacePanelContribution, WorkspacePanelContext } from "../plugins/types";
import { workspacePanelStyles } from "./shared";
-import { renderWorkspaceLabel } from "./workspaceLabel";
export interface WorkspacePanelEmptyState {
title: string;
@@ -19,7 +18,6 @@ export class WorkspacePanel extends LitElement {
@property({ attribute: false }) emptyState: WorkspacePanelEmptyState | undefined;
@property() tool: QualifiedContributionId = "core:workspace.files";
@property({ attribute: false }) panels: QualifiedWorkspacePanelContribution[] = [];
- @property({ attribute: false }) workspaceLabelItems: WorkspaceLabelItem[] = [];
@property({ type: Boolean }) hideToolTabs = false;
@property({ attribute: false }) onSelectTool: (tool: QualifiedContributionId) => void = () => undefined;
@query(".workspace-header-strip") private workspaceHeaderStrip?: HTMLElement | null;
@@ -63,10 +61,10 @@ export class WorkspacePanel extends LitElement {
const visiblePanels = this.panels;
const selectedPanel = visiblePanels.find((panel) => panel.id === this.tool) ?? visiblePanels[0];
return html`
-