Adds two new features for running project containers: 1. Bash Shell Tab: A "Shell" button on running projects opens a plain bash -l session instead of Claude Code, useful for direct container inspection, package installation, and debugging. Tab labels show "(bash)" suffix to distinguish from Claude sessions. 2. File Manager: A "Files" button opens a modal file browser for navigating container directories, downloading files to the host, and uploading files from the host. Supports breadcrumb navigation and works with any path including those outside mounted projects. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44 lines
1.4 KiB
TypeScript
44 lines
1.4 KiB
TypeScript
import { useTerminal } from "../../hooks/useTerminal";
|
||
|
||
export default function TerminalTabs() {
|
||
const { sessions, activeSessionId, setActiveSession, close } = useTerminal();
|
||
|
||
if (sessions.length === 0) {
|
||
return (
|
||
<div className="px-3 text-xs text-[var(--text-secondary)] leading-10">
|
||
No active terminals
|
||
</div>
|
||
);
|
||
}
|
||
|
||
return (
|
||
<div className="flex items-center h-full">
|
||
{sessions.map((session) => (
|
||
<div
|
||
key={session.id}
|
||
onClick={() => setActiveSession(session.id)}
|
||
className={`flex items-center gap-2 px-3 h-full text-xs cursor-pointer border-r border-[var(--border-color)] transition-colors ${
|
||
activeSessionId === session.id
|
||
? "bg-[var(--bg-primary)] text-[var(--text-primary)]"
|
||
: "text-[var(--text-secondary)] hover:text-[var(--text-primary)]"
|
||
}`}
|
||
>
|
||
<span className="truncate max-w-[120px]">
|
||
{session.projectName}{session.sessionType === "bash" ? " (bash)" : ""}
|
||
</span>
|
||
<button
|
||
onClick={(e) => {
|
||
e.stopPropagation();
|
||
close(session.id);
|
||
}}
|
||
className="text-[var(--text-secondary)] hover:text-[var(--error)] transition-colors"
|
||
title="Close terminal"
|
||
>
|
||
×
|
||
</button>
|
||
</div>
|
||
))}
|
||
</div>
|
||
);
|
||
}
|