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

Commitc5f6dcb

Browse files
committed
janky working demo for meeting
1 parent92c3bfd commitc5f6dcb

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 AITasks",
214+
"command":"coder.openAITask",
215+
"title":"Coder:Open AITask",
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
awaitvscode.window.showTextDocument(doc)
297297
}
298298

299-
/**
300-
* Open a view to show AI tasks across all workspaces
301-
*/
302-
publicasyncviewAITasks():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+
publicasyncopenAISession():Promise<void>{
412+
413+
// Then launch an integrated terminal with screen session
414+
constterminal=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
returnPromise.resolve(agentTreeItems)
240240
}
241-
// Create a separator item
242-
constseparator=newvscode.TreeItem("AI Tasks",vscode.TreeItemCollapsibleState.None)
243-
separator.contextValue="coderAITaskHeader"
244241

245242
// Return AI task items first, then a separator, then agent items
246-
returnPromise.resolve([...aiTaskItems,separator,...agentTreeItems])
243+
returnPromise.resolve([...aiTaskItems, ...agentTreeItems])
247244
}elseif(elementinstanceofAgentTreeItem){
248245
constwatcher=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=newvscode.ThemeIcon("sparkle")
329+
330330
// Add command to handle clicking on the task
331331
this.command={
332332
command:"coder.openAITask",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp