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

Commit5ae5b5a

Browse files
committed
Add changelog + smol refactoring
..
1 parent6739540 commit5ae5b5a

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@
55
###Changed
66

77
- Always enable verbose (`-v`) flag when a log directory is configured (`coder.proxyLogDir`).
8+
- Replaced SSE paths with a one-way WebSocket and centralized creation on`OneWayWebSocket`, and unified socket handling.
89

910
###Added
1011

1112
- Add support for CLI global flag configurations through the`coder.globalFlags` setting.
13+
- Add logging for all REST and some WebSocket traffic, with REST verbosity configurable via`coder.httpClientLogLevel` (`none`,`basic`,`headers`,`body`).
14+
- An Axios interceptor that tags each request with a UUID to correlate with its response and measure duration.
15+
- Lifecycle logs for WebSocket creation, errors, and closures.
1216

1317
##[1.10.1](https://github.com/coder/vscode-coder/releases/tag/v1.10.1) 2025-08-13
1418

‎src/commands.ts‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
}from"coder/site/src/api/typesGenerated";
88
importpathfrom"node:path";
99
import*asvscodefrom"vscode";
10-
import{extractAgents}from"./api/api-helper";
10+
import{createWorkspaceIdentifier,extractAgents}from"./api/api-helper";
1111
import{needToken}from"./api/auth";
1212
import{CodeApi}from"./api/codeApi";
1313
import{CertificateError}from"./error";
@@ -401,14 +401,13 @@ export class Commands {
401401
*/
402402
publicasyncnavigateToWorkspace(item:OpenableTreeItem){
403403
if(item){
404-
consturi=
405-
this.storage.getUrl()+
406-
`/@${item.workspace.owner_name}/${item.workspace.name}`;
404+
constworkspaceId=createWorkspaceIdentifier(item.workspace);
405+
consturi=this.storage.getUrl()+`/@${workspaceId}`;
407406
awaitvscode.commands.executeCommand("vscode.open",uri);
408407
}elseif(this.workspace&&this.workspaceRestClient){
409408
constbaseUrl=
410409
this.workspaceRestClient.getAxiosInstance().defaults.baseURL;
411-
consturi=`${baseUrl}/@${this.workspace.owner_name}/${this.workspace.name}`;
410+
consturi=`${baseUrl}/@${createWorkspaceIdentifier(this.workspace)}`;
412411
awaitvscode.commands.executeCommand("vscode.open",uri);
413412
}else{
414413
vscode.window.showInformationMessage("No workspace found.");
@@ -425,14 +424,13 @@ export class Commands {
425424
*/
426425
publicasyncnavigateToWorkspaceSettings(item:OpenableTreeItem){
427426
if(item){
428-
consturi=
429-
this.storage.getUrl()+
430-
`/@${item.workspace.owner_name}/${item.workspace.name}/settings`;
427+
constworkspaceId=createWorkspaceIdentifier(item.workspace);
428+
consturi=this.storage.getUrl()+`/@${workspaceId}/settings`;
431429
awaitvscode.commands.executeCommand("vscode.open",uri);
432430
}elseif(this.workspace&&this.workspaceRestClient){
433431
constbaseUrl=
434432
this.workspaceRestClient.getAxiosInstance().defaults.baseURL;
435-
consturi=`${baseUrl}/@${this.workspace.owner_name}/${this.workspace.name}/settings`;
433+
consturi=`${baseUrl}/@${createWorkspaceIdentifier(this.workspace)}/settings`;
436434
awaitvscode.commands.executeCommand("vscode.open",uri);
437435
}else{
438436
vscode.window.showInformationMessage("No workspace found.");
@@ -633,7 +631,7 @@ export class Commands {
633631
{
634632
useCustom:true,
635633
modal:true,
636-
detail:`Update${this.workspace.owner_name}/${this.workspace.name} to the latest version?\n\nUpdating will restart your workspace which stops any running processes and may result in the loss of unsaved work.`,
634+
detail:`Update${createWorkspaceIdentifier(this.workspace)} to the latest version?\n\nUpdating will restart your workspace which stops any running processes and may result in the loss of unsaved work.`,
637635
},
638636
"Update",
639637
"Cancel",

‎src/remote.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
formatEventLabel,
1616
formatMetadataError,
1717
}from"./agentMetadataHelper";
18-
import{extractAgents}from"./api/api-helper";
18+
import{createWorkspaceIdentifier,extractAgents}from"./api/api-helper";
1919
import{needToken}from"./api/auth";
2020
import{CodeApi}from"./api/codeApi";
2121
import{startWorkspaceIfStoppedOrFailed,waitForBuild}from"./api/workspace";
@@ -72,7 +72,7 @@ export class Remote {
7272
binPath:string,
7373
featureSet:FeatureSet,
7474
):Promise<Workspace|undefined>{
75-
constworkspaceName=`${workspace.owner_name}/${workspace.name}`;
75+
constworkspaceName=createWorkspaceIdentifier(workspace);
7676

7777
// A terminal will be used to stream the build, if one is necessary.
7878
letwriteEmitter:undefined|vscode.EventEmitter<string>;
@@ -118,12 +118,11 @@ export class Remote {
118118
switch(workspace.latest_build.status){
119119
case"pending":
120120
case"starting":
121-
case"stopping":{
121+
case"stopping":
122122
writeEmitter=initWriteEmitterAndTerminal();
123123
this.storage.output.info(`Waiting for${workspaceName}...`);
124124
workspace=awaitwaitForBuild(client,writeEmitter,workspace);
125125
break;
126-
}
127126
case"stopped":
128127
if(!(awaitthis.confirmStart(workspaceName))){
129128
returnundefined;

‎src/workspaceMonitor.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import{ServerSentEvent,Workspace}from"coder/site/src/api/typesGenerated";
22
import{formatDistanceToNowStrict}from"date-fns";
33
import*asvscodefrom"vscode";
4-
import{errToStr}from"./api/api-helper";
4+
import{createWorkspaceIdentifier,errToStr}from"./api/api-helper";
55
import{CodeApi}from"./api/codeApi";
66
import{Storage}from"./storage";
77
import{OneWayWebSocket}from"./websocket/oneWayWebSocket";
@@ -38,7 +38,7 @@ export class WorkspaceMonitor implements vscode.Disposable {
3838
// We use the proposed API to get access to useCustom in dialogs.
3939
privatereadonlyvscodeProposed:typeofvscode,
4040
){
41-
this.name=`${workspace.owner_name}/${workspace.name}`;
41+
this.name=createWorkspaceIdentifier(workspace);
4242
constsocket=this.client.watchWorkspace(workspace);
4343

4444
socket.addEventListener("open",()=>{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp