Skip to content

Commit f5c8b9f

Browse files
committed
Show the statusbar even when fetching metadata fails
1 parent 9d0d610 commit f5c8b9f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/remote.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -994,8 +994,15 @@ export class Remote {
994994

995995
const onChangeDisposable = agentWatcher.onChange(() => {
996996
if (agentWatcher.error) {
997-
this.storage.output.warn(formatMetadataError(agentWatcher.error));
998-
statusBarItem.hide();
997+
const errMessage = formatMetadataError(agentWatcher.error);
998+
this.storage.output.warn(errMessage);
999+
1000+
statusBarItem.text = "$(warning) Agent Status Unavailable";
1001+
statusBarItem.tooltip = errMessage;
1002+
statusBarItem.backgroundColor = new vscode.ThemeColor(
1003+
"statusBarItem.warningBackground",
1004+
);
1005+
statusBarItem.show();
9991006
return;
10001007
}
10011008

@@ -1004,6 +1011,7 @@ export class Remote {
10041011
statusBarItem.tooltip = agentWatcher.metadata
10051012
.map((metadata) => formatEventLabel(metadata))
10061013
.join("\n");
1014+
statusBarItem.backgroundColor = undefined;
10071015
statusBarItem.show();
10081016
} else {
10091017
statusBarItem.hide();

0 commit comments

Comments
 (0)