fix(vscode): Hotfix 1.1.3. Do not show disconnected notification when initializing (#868)

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

* chore(vscode): vscode hotfix 1.1.3.
wsxiaoys-patch-3
Zhiming Ma 2023-11-23 11:42:53 +08:00 committed by GitHub
parent 3bddd9fa64
commit a067366b5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

View File

@ -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 ## 1.1.2
### Fixes: ### 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 ## 1.1.0

View File

@ -7,7 +7,7 @@
"repository": "https://github.com/TabbyML/tabby", "repository": "https://github.com/TabbyML/tabby",
"bugs": "https://github.com/TabbyML/tabby/issues", "bugs": "https://github.com/TabbyML/tabby/issues",
"license": "Apache-2.0", "license": "Apache-2.0",
"version": "1.1.2", "version": "1.1.3",
"keywords": [ "keywords": [
"ai", "ai",
"autocomplete", "autocomplete",

View File

@ -172,14 +172,19 @@ export class TabbyStatusBarItem {
agent().on("issuesUpdated", (event: IssuesUpdatedEvent) => { agent().on("issuesUpdated", (event: IssuesUpdatedEvent) => {
console.debug("Tabby agent issuesUpdated", { event }); console.debug("Tabby agent issuesUpdated", { event });
this.fsmService.send(agent().getStatus()); const status = agent().getStatus();
this.fsmService.send(status);
const showCompletionResponseWarnings = const showCompletionResponseWarnings =
!this.completionResponseWarningShown && !this.completionResponseWarningShown &&
!this.extensionContext.globalState !this.extensionContext.globalState
.get<string[]>("notifications.muted", []) .get<string[]>("notifications.muted", [])
.includes("completionResponseTimeIssues"); .includes("completionResponseTimeIssues");
if (event.issues.includes("connectionFailed")) { 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")) { } else if (showCompletionResponseWarnings && event.issues.includes("highCompletionTimeoutRate")) {
this.completionResponseWarningShown = true; this.completionResponseWarningShown = true;
notifications.showInformationWhenHighCompletionTimeoutRate(); notifications.showInformationWhenHighCompletionTimeoutRate();