8000 janky working demo for meeting · coder/vscode-coder@c5f6dcb · GitHub
[go: up one dir, main page]

Skip to content

Commit c5f6dcb

Browse files
committed
janky working demo for meeting
1 parent 92c3bfd commit c5f6dcb

File tree

4 files changed

+31
-25
lines changed

4 files changed

+31
-25
lines changed

package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@
170170
"title": "Coder: Open Workspace",
171171
"icon": "$(play)"
172172
},
173+
{
174+
"command": "coder.openFromSidebarAndOpenSession",
175+
"title": "Coder: Open Workspace with Claude Code Session",
176+
"icon": "$(terminal)"
177+
},
173178
{
174179
"command": "coder.createWorkspace",
175180
"title": "Create Workspace",
@@ -206,8 +211,8 @@
206211
"when": "coder.authenticated"
207212
},
208213
{
209-
"command": "coder.viewAITasks",
210-
"title": "Coder: View AI Tasks",
214+
"command": "coder.openAITask",
215+
"title": "Coder: Open AI Task",
211216
"icon": "$(robot)",
212217
"when": "coder.authenticated"
213218
}
@@ -239,7 +244,7 @@
239244
"group": "navigation"
240245
},
241246
{
242-
"command": "coder.viewAITasks",
247+
"command": "coder.openAITask",
243248
"when": "coder.authenticated && view == myWorkspaces",
244249
"group": "navigation"
245250
}
@@ -250,6 +255,11 @@
250255
"when": "coder.authenticated && viewItem == coderWorkspaceSingleAgent || coder.authenticated && viewItem == coderAgent",
251256
"group": "inline"
252257
},
258+
{
259+
"command": "coder.openFromSidebarAndOpenSession",
260+
"when": "coder.authenticated && viewItem == coderWorkspaceSingleAgent || coder.authenticated && viewItem == coderAgent",
261+
"group": "inline"
262+
},
253263
{
254264
"command": "coder.navigateToWorkspace",
255265
"when": "coder.authenticated && viewItem == coderWorkspaceSingleAgent || coder.authenticated && viewItem == coderWorkspaceMultipleAgents",
@@ -272,7 +282,7 @@
272282
"when": "coder.authenticated"
273283
},
274284
{
275-
"command": "coder.viewAITasks",
285+
"command": "coder.openAITask",
276286
"group": "remote_11_ssh_coder@3",
277287
"when": "coder.authenticated"
278288
}

src/commands.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,6 @@ export class Commands {
296296
await vscode.window.showTextDocument(doc)
297297
}
298298

299-
/**
300-
* Open a view to show AI tasks across all workspaces
301-
*/
302-
public async viewAITasks(): Promise<void> {
303-
vscode.window.showInformationMessage("Viewing AI tasks across workspaces")
304-
// Refresh workspaces to ensure we have the latest tasks
305-
vscode.commands.executeCommand("coder.refreshWorkspaces")
306-
}
307299

308300
/**
309301
* Log out from the currently logged-in deployment.
@@ -416,6 +408,18 @@ export class Commands {
416408
}
417409
}
418410

411+
public async openAISession(): Promise<void> {
412+
413+
// Then launch an integrated terminal with screen session
414+
const terminal = vscode.window.createTerminal({
415+
name: "Claude Code Session",
416+
})
417+
418+
// Show the terminal and run the screen command
419+
terminal.show(true)
420+
terminal.sendText("screen -xRR claude-code")
421+
}
422+
419423
/**
420424
* Open a workspace belonging to the currently logged-in deployment.
421425
*

src/extension.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
124124
vscode.commands.registerCommand("coder.logout", commands.logout.bind(commands))
125125
vscode.commands.registerCommand("coder.open", commands.open.bind(commands))
126126
vscode.commands.registerCommand("coder.openFromSidebar", commands.openFromSidebar.bind(commands))
127+
vscode.commands.registerCommand("coder.openAITask", commands.openAISession.bind(commands))
127128
vscode.commands.registerCommand("coder.workspace.update", commands.updateWorkspace.bind(commands))
128129
vscode.commands.registerCommand("coder.createWorkspace", commands.createWorkspace.bind(commands))
129130
vscode.commands.registerCommand("coder.navigateToWorkspace", commands.navigateToWorkspace.bind(commands))
@@ -136,15 +137,6 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
136137
allWorkspacesProvider.fetchAndRefresh()
137138
})
138139
vscode.commands.registerCommand("coder.viewLogs", commands.viewLogs.bind(commands))
139-
vscode.commands.registerCommand("coder.viewAITasks", commands.viewAITasks.bind(commands))
140-
vscode.commands.registerCommand("coder.openAITask", (task) => {
141-
// Open the task URL if available
142-
if (task && task.url) {
143-
vscode.env.openExternal(vscode.Uri.parse(task.url))
144-
} else {
145-
vscode.window.showInformationMessage("This AI task has no associated URL")
146-
}
147-
})
148140

149141
// Since the "onResolveRemoteAuthority:ssh-remote" activation event exists
150142
// in package.json we're able to perform actions before the authority is

src/workspacesProvider.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,9 @@ export class WorkspaceProvider implements vscode.TreeDataProvider<vscode.TreeIte
238238
if (aiTaskItems.length == 0) {
239239
return Promise.resolve(agentTreeItems)
240240
}
241-
// Create a separator item
242-
const separator = new vscode.TreeItem("AI Tasks", vscode.TreeItemCollapsibleState.None)
243-
separator.contextValue = "coderAITaskHeader"
244241

245242
// Return AI task items first, then a separator, then agent items
246-
return Promise.resolve([...aiTaskItems, separator, ...agentTreeItems])
243+
return Promise.resolve([...aiTaskItems, ...agentTreeItems])
247244
} else if (element instanceof AgentTreeItem) {
248245
const watcher = this.agentWatchers[element.agent.id]
249246
if (watcher?.error) {
@@ -327,6 +324,9 @@ class AITaskTreeItem extends vscode.TreeItem {
327324
this.description = task.summary
328325
this.contextValue = "coderAITask"
329326

327+
// Add an icon using VSCode's built-in Codicons
328+
this.iconPath = new vscode.ThemeIcon("sparkle")
329+
330330
// Add command to handle clicking on the task
331331
this.command = {
332332
command: "coder.openAITask",

0 commit comments

Comments
 (0)
0