feat(workspaces): implement ssh tunneling and workspace connect command

This commit is contained in:
mkorwel
2026-03-19 08:50:42 -07:00
parent bd523c8d48
commit 22ff923100
7 changed files with 209 additions and 3 deletions
@@ -150,12 +150,36 @@ const deleteCommand: SlashCommand = {
},
};
const connectCommand: SlashCommand = {
name: 'connect',
description: 'Connect to a remote workspace',
kind: CommandKind.BUILT_IN,
autoExecute: true,
action: async (
_context: CommandContext,
args: string,
): Promise<MessageActionReturn> => {
const id = args.trim();
if (!id) {
return {
type: 'message',
messageType: 'error',
content: 'Workspace ID is required. Usage: /workspace connect <id>',
};
}
return {
type: 'submit_prompt',
content: `I want to connect to remote workspace "${id}". Please run the connect command.`,
};
},
};
export const workspaceSlashCommand: SlashCommand = {
name: 'workspace',
altNames: ['wsr'],
description: 'Manage remote workspaces',
kind: CommandKind.BUILT_IN,
autoExecute: false,
subCommands: [listCommand, createCommand, deleteCommand],
subCommands: [listCommand, createCommand, deleteCommand, connectCommand],
action: async (context: CommandContext) => listAction(context),
};