Skip to content

Commit 4410703

Browse files
committed
🤖 Add runtime badge to workspace title header
Display SSH runtime badge in the AIView workspace header alongside the status indicator and git status. Badge appears between git status and the project/branch name. Changes: - Add runtimeConfig prop to AIViewProps - Pass runtimeConfig from App.tsx using workspaceMetadata - Render RuntimeBadge in workspace title header Generated with `cmux`
1 parent dd5b346 commit 4410703

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/App.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,9 @@ function AppInner() {
641641
selectedWorkspace.workspaceId
642642
}
643643
namedWorkspacePath={selectedWorkspace.namedWorkspacePath ?? ""}
644+
runtimeConfig={
645+
workspaceMetadata.get(selectedWorkspace.workspaceId)?.runtimeConfig
646+
}
644647
/>
645648
</ErrorBoundary>
646649
) : (

src/components/AIView.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,20 @@ import { useWorkspaceState, useWorkspaceAggregator } from "@/stores/WorkspaceSto
2424
import { StatusIndicator } from "./StatusIndicator";
2525
import { getModelName } from "@/utils/ai/models";
2626
import { GitStatusIndicator } from "./GitStatusIndicator";
27+
import { RuntimeBadge } from "./RuntimeBadge";
2728

2829
import { useGitStatus } from "@/stores/GitStatusStore";
2930
import { TooltipWrapper, Tooltip } from "./Tooltip";
3031
import type { DisplayedMessage } from "@/types/message";
32+
import type { RuntimeConfig } from "@/types/runtime";
3133
import { useAIViewKeybinds } from "@/hooks/useAIViewKeybinds";
3234

3335
interface AIViewProps {
3436
workspaceId: string;
3537
projectName: string;
3638
branch: string;
3739
namedWorkspacePath: string; // User-friendly path for display and terminal
40+
runtimeConfig?: RuntimeConfig;
3841
className?: string;
3942
}
4043

@@ -43,6 +46,7 @@ const AIViewInner: React.FC<AIViewProps> = ({
4346
projectName,
4447
branch,
4548
namedWorkspacePath,
49+
runtimeConfig,
4650
className,
4751
}) => {
4852
const chatAreaRef = useRef<HTMLDivElement>(null);
@@ -348,6 +352,7 @@ const AIViewInner: React.FC<AIViewProps> = ({
348352
workspaceId={workspaceId}
349353
tooltipPosition="bottom"
350354
/>
355+
<RuntimeBadge runtimeConfig={runtimeConfig} />
351356
<span className="min-w-0 truncate font-mono text-xs">
352357
{projectName} / {branch}
353358
</span>

0 commit comments

Comments
 (0)