File tree Expand file tree Collapse file tree
app/dashboard/[teamSlug]/sandboxes/[sandboxId]/terminal
features/dashboard/sandbox Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import SandboxTerminalView from '@/features/dashboard/sandbox/terminal/view'
2+
3+ export default async function SandboxTerminalPage ( {
4+ params,
5+ } : {
6+ params : Promise < { teamSlug : string ; sandboxId : string } >
7+ } ) {
8+ const { sandboxId } = await params
9+
10+ return < SandboxTerminalView sandboxId = { sandboxId } />
11+ }
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ export const PROTECTED_URLS = {
3535 `/dashboard/${ teamSlug } /sandboxes/${ sandboxId } /events` ,
3636 SANDBOX_LOGS : ( teamSlug : string , sandboxId : string ) =>
3737 `/dashboard/${ teamSlug } /sandboxes/${ sandboxId } /logs` ,
38+ SANDBOX_TERMINAL : ( teamSlug : string , sandboxId : string ) =>
39+ `/dashboard/${ teamSlug } /sandboxes/${ sandboxId } /terminal` ,
3840 SANDBOX_FILESYSTEM : ( teamSlug : string , sandboxId : string ) =>
3941 `/dashboard/${ teamSlug } /sandboxes/${ sandboxId } /filesystem` ,
4042
Original file line number Diff line number Diff line change 88 HistoryIcon ,
99 ListIcon ,
1010 StorageIcon ,
11+ TerminalCustomIcon ,
1112 TrendIcon ,
1213} from '@/ui/primitives/icons'
1314import { useSandboxContext } from './context'
@@ -68,6 +69,12 @@ export default function SandboxLayout({
6869 href : PROTECTED_URLS . SANDBOX_LOGS ( teamSlug , sandboxId ) ,
6970 icon : < ListIcon className = "size-4" /> ,
7071 } ,
72+ {
73+ id : 'terminal' ,
74+ label : 'Terminal' ,
75+ href : PROTECTED_URLS . SANDBOX_TERMINAL ( teamSlug , sandboxId ) ,
76+ icon : < TerminalCustomIcon className = "size-4" /> ,
77+ } ,
7178 {
7279 id : 'filesystem' ,
7380 label : 'Filesystem' ,
Original file line number Diff line number Diff line change 1+ 'use client'
2+
3+ import { useDashboard } from '@/features/dashboard/context'
4+ import DashboardTerminal from '@/features/dashboard/terminal/dashboard-terminal'
5+
6+ interface SandboxTerminalViewProps {
7+ sandboxId : string
8+ }
9+
10+ export default function SandboxTerminalView ( {
11+ sandboxId,
12+ } : SandboxTerminalViewProps ) {
13+ const { team } = useDashboard ( )
14+
15+ return (
16+ < div className = "flex min-h-0 flex-1 overflow-hidden p-3 md:p-6" >
17+ < DashboardTerminal
18+ autoStart
19+ initialSandboxId = { sandboxId }
20+ sandboxScoped
21+ teamId = { team . id }
22+ />
23+ </ div >
24+ )
25+ }
You can’t perform that action at this time.
0 commit comments