Skip to content

Commit

Permalink
fix(vscode): Hotfix 1.1.3. Do not show disconnected notification when…
Browse files Browse the repository at this point in the history
… initializing (#868)

* fix(vscode): Do not show disconnected notification when initializing.

* chore(vscode): vscode hotfix 1.1.3.
  • Loading branch information
icycodes authored Nov 23, 2023
1 parent 3bddd9f commit a067366
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
8 changes: 7 additions & 1 deletion clients/vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
## 1.1.3

### Fixes:

- Fixed a bug that caused the disconnected notification to show up every time when VSCode is started. Now, the notification will only appear after the user modifies the server endpoint settings and the connection fails.

## 1.1.2

### Fixes:

- Fix a bug cause the completion does not show up if the completion cache is missing.
- Fixed a bug that caused the completion to not show up when the completion cache is missing.

## 1.1.0

Expand Down
2 changes: 1 addition & 1 deletion clients/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"repository": "https://github.com/TabbyML/tabby",
"bugs": "https://github.com/TabbyML/tabby/issues",
"license": "Apache-2.0",
"version": "1.1.2",
"version": "1.1.3",
"keywords": [
"ai",
"autocomplete",
Expand Down
9 changes: 7 additions & 2 deletions clients/vscode/src/TabbyStatusBarItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,19 @@ export class TabbyStatusBarItem {

agent().on("issuesUpdated", (event: IssuesUpdatedEvent) => {
console.debug("Tabby agent issuesUpdated", { event });
this.fsmService.send(agent().getStatus());
const status = agent().getStatus();
this.fsmService.send(status);
const showCompletionResponseWarnings =
!this.completionResponseWarningShown &&
!this.extensionContext.globalState
.get<string[]>("notifications.muted", [])
.includes("completionResponseTimeIssues");
if (event.issues.includes("connectionFailed")) {
notifications.showInformationWhenDisconnected();
// Only show this notification when user modifies the settings, do not show it when initializing
// FIXME: refactor this use a flag marks the event is trigger by modifying settings or initializing
if (status !== "notInitialized") {
notifications.showInformationWhenDisconnected();
}
} else if (showCompletionResponseWarnings && event.issues.includes("highCompletionTimeoutRate")) {
this.completionResponseWarningShown = true;
notifications.showInformationWhenHighCompletionTimeoutRate();
Expand Down

0 comments on commit a067366

Please sign in to comment.