@@ -56,7 +56,7 @@ const TerminalPage: FC<
56
56
> = ( { renderer } ) => {
57
57
const navigate = useNavigate ( )
58
58
const styles = useStyles ( )
59
- const { username, workspace } = useParams ( )
59
+ const { username, workspace : workspaceName } = useParams ( )
60
60
const xtermRef = useRef < HTMLDivElement > ( null )
61
61
const [ terminal , setTerminal ] = useState < XTerm . Terminal | null > ( null )
62
62
const [ fitAddon , setFitAddon ] = useState < FitAddon | null > ( null )
@@ -68,7 +68,7 @@ const TerminalPage: FC<
68
68
const command = searchParams . get ( "command" ) || undefined
69
69
// The workspace name is in the format:
70
70
// <workspace name>[.<agent name>]
71
- const workspaceNameParts = workspace ?. split ( "." )
71
+ const workspaceNameParts = workspaceName ?. split ( "." )
72
72
const [ terminalState , sendEvent ] = useMachine ( terminalMachine , {
73
73
context : {
74
74
agentName : workspaceNameParts ?. [ 1 ] ,
@@ -93,6 +93,7 @@ const TerminalPage: FC<
93
93
const isDisconnected = terminalState . matches ( "disconnected" )
94
94
const {
95
95
workspaceError,
96
+ workspace,
96
97
workspaceAgentError,
97
98
workspaceAgent,
98
99
websocketError,
@@ -134,9 +135,9 @@ const TerminalPage: FC<
134
135
applicationsHost ,
135
136
parseInt ( url . port ) ,
136
137
workspaceAgent . name ,
137
- workspace ,
138
+ workspace . name ,
138
139
username ,
139
- ) ,
140
+ ) + url . pathname ,
140
141
)
141
142
} catch ( ex ) {
142
143
open ( uri )
0 commit comments