Skip to content

Commit 4db2045

Browse files
chore: update query params sent to vscode extension
1 parent 1fe82e8 commit 4db2045

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

site/src/modules/resources/AgentDevcontainerCard.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export const AgentDevcontainerCard: FC<AgentDevcontainerCardProps> = ({
2727
wildcardHostname,
2828
}) => {
2929
const folderPath = container.labels["devcontainer.local_folder"];
30-
const configFile = container.labels["devcontainer.config_file"];
3130
const containerFolder = container.volumes[folderPath];
3231

3332
return (
@@ -52,8 +51,7 @@ export const AgentDevcontainerCard: FC<AgentDevcontainerCardProps> = ({
5251
<VSCodeDevContainerButton
5352
userName={workspace.owner_name}
5453
workspaceName={workspace.name}
55-
folderPath={folderPath}
56-
devContainerPath={configFile}
54+
devContainerName={container.name}
5755
devContainerFolder={containerFolder}
5856
displayApps={agent.display_apps}
5957
/>

site/src/modules/resources/VSCodeDevContainerButton/VSCodeDevContainerButton.tsx

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ export interface VSCodeDevContainerButtonProps {
1414
userName: string;
1515
workspaceName: string;
1616
agentName?: string;
17-
folderPath: string;
18-
devContainerPath: string;
17+
devContainerName: string;
1918
devContainerFolder: string;
2019
displayApps: readonly DisplayApp[];
2120
}
@@ -113,8 +112,7 @@ const VSCodeButton: FC<VSCodeDevContainerButtonProps> = ({
113112
userName,
114113
workspaceName,
115114
agentName,
116-
folderPath,
117-
devContainerPath,
115+
devContainerName,
118116
devContainerFolder,
119117
}) => {
120118
const [loading, setLoading] = useState(false);
@@ -132,15 +130,12 @@ const VSCodeButton: FC<VSCodeDevContainerButtonProps> = ({
132130
workspace: workspaceName,
133131
url: location.origin,
134132
token: key,
135-
devContainerPath,
133+
devContainerName,
136134
devContainerFolder,
137135
});
138136
if (agentName) {
139137
query.set("agent", agentName);
140138
}
141-
if (folderPath) {
142-
query.set("folder", folderPath);
143-
}
144139

145140
location.href = `vscode://coder.coder-remote/openDevContainer?${query.toString()}`;
146141
})
@@ -161,8 +156,7 @@ const VSCodeInsidersButton: FC<VSCodeDevContainerButtonProps> = ({
161156
userName,
162157
workspaceName,
163158
agentName,
164-
folderPath,
165-
devContainerPath,
159+
devContainerName,
166160
devContainerFolder,
167161
}) => {
168162
const [loading, setLoading] = useState(false);
@@ -180,15 +174,12 @@ const VSCodeInsidersButton: FC<VSCodeDevContainerButtonProps> = ({
180174
workspace: workspaceName,
181175
url: location.origin,
182176
token: key,
183-
devContainerPath,
177+
devContainerName,
184178
devContainerFolder,
185179
});
186180
if (agentName) {
187181
query.set("agent", agentName);
188182
}
189-
if (folderPath) {
190-
query.set("folder", folderPath);
191-
}
192183

193184
location.href = `vscode-insiders://coder.coder-remote/openDevContainer?${query.toString()}`;
194185
})

0 commit comments

Comments
 (0)