Skip to content

feat: allow configuring display apps from template #9100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix frontend
  • Loading branch information
sreya committed Aug 28, 2023
commit 1ba035c07eaabf27379e46bd4678fffd0d240873
2 changes: 1 addition & 1 deletion site/src/components/Resources/AgentRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export const AgentRow: FC<AgentRowProps> = ({
workspaceName={workspace.name}
agentName={agent.name}
folderPath={agent.expanded_directory}
defaultApps={agent.display_apps}
displayApps={agent.display_apps}
/>
)}
{agent.apps.map((app) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,11 @@ Default.args = {
userName: MockWorkspace.owner_name,
workspaceName: MockWorkspace.name,
agentName: MockWorkspaceAgent.name,
displayApps: [
"vscode",
"port_forwarding_helper",
"ssh_helper",
"vscode_insiders",
"web_terminal",
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface VSCodeDesktopButtonProps {
workspaceName: string
agentName?: string
folderPath?: string
defaultApps: DisplayApp[]
displayApps: DisplayApp[]
}

type VSCodeVariant = "vscode" | "vscode-insiders"
Expand All @@ -42,8 +42,8 @@ export const VSCodeDesktopButton: FC<
setIsVariantMenuOpen(false)
}

const includesVSCodeDesktop = props.defaultApps.includes("vscode")
const includesVSCodeInsiders = props.defaultApps.includes("vscode_insiders")
const includesVSCodeDesktop = props.displayApps.includes("vscode")
const includesVSCodeInsiders = props.displayApps.includes("vscode_insiders")

return includesVSCodeDesktop && includesVSCodeInsiders ? (
<div>
Expand Down