Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite7ebcb5

Browse files
authored
fix: use workspace name when opening links via the terminal (#6077)
This was using the `<workspace>.<agent>` syntax before, which was invalid.
1 parentc82e38e commite7ebcb5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎site/src/pages/TerminalPage/TerminalPage.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const TerminalPage: FC<
5656
>=({ renderer})=>{
5757
constnavigate=useNavigate()
5858
conststyles=useStyles()
59-
const{ username, workspace}=useParams()
59+
const{ username,workspace:workspaceName}=useParams()
6060
constxtermRef=useRef<HTMLDivElement>(null)
6161
const[terminal,setTerminal]=useState<XTerm.Terminal|null>(null)
6262
const[fitAddon,setFitAddon]=useState<FitAddon|null>(null)
@@ -68,7 +68,7 @@ const TerminalPage: FC<
6868
constcommand=searchParams.get("command")||undefined
6969
// The workspace name is in the format:
7070
// <workspace name>[.<agent name>]
71-
constworkspaceNameParts=workspace?.split(".")
71+
constworkspaceNameParts=workspaceName?.split(".")
7272
const[terminalState,sendEvent]=useMachine(terminalMachine,{
7373
context:{
7474
agentName:workspaceNameParts?.[1],
@@ -93,6 +93,7 @@ const TerminalPage: FC<
9393
constisDisconnected=terminalState.matches("disconnected")
9494
const{
9595
workspaceError,
96+
workspace,
9697
workspaceAgentError,
9798
workspaceAgent,
9899
websocketError,
@@ -134,9 +135,9 @@ const TerminalPage: FC<
134135
applicationsHost,
135136
parseInt(url.port),
136137
workspaceAgent.name,
137-
workspace,
138+
workspace.name,
138139
username,
139-
),
140+
)+url.pathname,
140141
)
141142
}catch(ex){
142143
open(uri)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp