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

Use primary agent for the remote authority when opening a workspace#552

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
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
4 changes: 4 additions & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,10 @@
update notifications.
- Coder output panel enhancements: All log entries now include timestamps, and you
can filter messages by log level in the panel.
- Consistently use the same session for each agent. Previously,
depending on how you connected, it could be possible to get two
different sessions for an agent. Existing connections may still
have this problem, only new connections are fixed.

## [v1.9.2](https://github.com/coder/vscode-coder/releases/tag/v1.9.2) 2025-06-25

Expand Down
38 changes: 27 additions & 11 deletionssrc/commands.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -437,12 +437,15 @@ export class Commands {
if (!baseUrl) {
throw new Error("You are not logged in");
}
if (treeItem.primaryAgentName === undefined) {
return;
}
await openWorkspace(
baseUrl,
treeItem.workspaceOwner,
treeItem.workspaceName,
treeItem.workspaceAgent,
treeItem.workspaceFolderPath,
treeItem.primaryAgentName,
treeItem.primaryAgentFolderPath,
true,
);
} else {
Expand DownExpand Up@@ -525,6 +528,8 @@ export class Commands {
let folderPath: string | undefined;
let openRecent: boolean | undefined;

let workspace: Workspace | undefined;

const baseUrl = this.restClient.getAxiosInstance().defaults.baseURL;
if (!baseUrl) {
throw new Error("You are not logged in");
Expand DownExpand Up@@ -571,7 +576,7 @@ export class Commands {
});
});
quickPick.show();
constworkspace = await new Promise<Workspace | undefined>((resolve) => {
workspace = await new Promise<Workspace | undefined>((resolve) => {
quickPick.onDidHide(() => {
resolve(undefined);
});
Expand All@@ -590,20 +595,31 @@ export class Commands {
}
workspaceOwner = workspace.owner_name;
workspaceName = workspace.name;
} else {
workspaceOwner = args[0] as string;
workspaceName = args[1] as string;
workspaceAgent = args[2] as string | undefined;
folderPath = args[3] as string | undefined;
openRecent = args[4] as boolean | undefined;
}

if (!workspaceAgent) {
if (workspace === undefined) {
workspace = await this.restClient.getWorkspaceByOwnerAndName(
workspaceOwner,
workspaceName,
);
}

const agent = await this.maybeAskAgent(workspace);
if (!agent) {
// User declined to pick an agent.
return;
}
folderPath = agent.expanded_directory;
if (!folderPath) {
folderPath = agent.expanded_directory;
}
workspaceAgent = agent.name;
} else {
workspaceOwner = args[0] as string;
workspaceName = args[1] as string;
workspaceAgent = args[2] as string | undefined;
folderPath = args[3] as string | undefined;
openRecent = args[4] as boolean | undefined;
}

await openWorkspace(
Expand DownExpand Up@@ -679,7 +695,7 @@ async function openWorkspace(
baseUrl: string,
workspaceOwner: string,
workspaceName: string,
workspaceAgent: string | undefined,
workspaceAgent: string,
folderPath: string | undefined,
openRecent: boolean | undefined,
) {
Expand Down
8 changes: 4 additions & 4 deletionssrc/workspacesProvider.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -436,8 +436,8 @@ export class OpenableTreeItem extends vscode.TreeItem {

public readonly workspaceOwner: string,
public readonly workspaceName: string,
public readonlyworkspaceAgent: string | undefined,
public readonlyworkspaceFolderPath: string | undefined,
public readonlyprimaryAgentName: string | undefined,
public readonlyprimaryAgentFolderPath: string | undefined,

contextValue: CoderOpenableTreeItemType,
) {
Expand DownExpand Up@@ -476,7 +476,7 @@ class AgentTreeItem extends OpenableTreeItem {
}
}

exportclass WorkspaceTreeItem extends OpenableTreeItem {
class WorkspaceTreeItem extends OpenableTreeItem {
public appStatus: {
name: string;
url?: string;
Expand DownExpand Up@@ -509,7 +509,7 @@ export class WorkspaceTreeItem extends OpenableTreeItem {
: vscode.TreeItemCollapsibleState.Expanded,
workspace.owner_name,
workspace.name,
undefined,
agents[0]?.name,
agents[0]?.expanded_directory,
agents.length > 1
? "coderWorkspaceMultipleAgents"
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp