Skip to content

Commit ff5d166

Browse files
authored
Merge pull request #9080 from continuedev/snyk-upgrade-df9d51333968970981e8f6c9cf4d7377
[Snyk] Upgrade @tiptap/extension-image from 2.26.1 to 2.27.1
2 parents 291f8f5 + 887410e commit ff5d166

File tree

5 files changed

+24
-23
lines changed

5 files changed

+24
-23
lines changed

extensions/vscode/src/ContinueConsoleWebviewViewProvider.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class ContinueConsoleWebviewViewProvider
3737
this._webview.onDidReceiveMessage((message: FromConsoleView) => {
3838
if (message.type === "start") {
3939
this._currentUuid = message.uuid;
40-
this._webview?.postMessage({
40+
void this._webview?.postMessage({
4141
type: "init",
4242
uuid: this._currentUuid,
4343
items: this.getAllItems(),
@@ -70,7 +70,7 @@ export class ContinueConsoleWebviewViewProvider
7070
if (e.affectsConfiguration(`${EXTENSION_NAME}.enableConsole`)) {
7171
const config = vscode.workspace.getConfiguration(EXTENSION_NAME);
7272
this._saveLog = config.get<boolean>("enableConsole");
73-
if (!this._saveLog) {
73+
if (this._saveLog === false) {
7474
this.clearLog();
7575
}
7676
}
@@ -103,7 +103,7 @@ export class ContinueConsoleWebviewViewProvider
103103
}
104104

105105
if (this._currentUuid) {
106-
this._webview?.postMessage({
106+
void this._webview?.postMessage({
107107
type: "item",
108108
uuid: this._currentUuid,
109109
item,
@@ -116,7 +116,7 @@ export class ContinueConsoleWebviewViewProvider
116116
MAX_INTERACTIONS
117117
) {
118118
let toRemove = this._completedInteractions.shift();
119-
this._webview?.postMessage({
119+
void this._webview?.postMessage({
120120
type: "remove",
121121
uuid: this._currentUuid,
122122
interactionId: toRemove![0].interactionId,
@@ -139,7 +139,7 @@ export class ContinueConsoleWebviewViewProvider
139139
this._currentInteractions = new Map();
140140

141141
if (this._currentUuid) {
142-
this._webview?.postMessage({
142+
void this._webview?.postMessage({
143143
type: "clear",
144144
uuid: this._currentUuid,
145145
});
@@ -157,7 +157,10 @@ export class ContinueConsoleWebviewViewProvider
157157

158158
const inDevelopmentMode =
159159
context?.extensionMode === vscode.ExtensionMode.Development;
160-
if (!inDevelopmentMode) {
160+
if (inDevelopmentMode) {
161+
scriptUri = "http://localhost:5173/src/console.tsx";
162+
styleMainUri = "http://localhost:5173/src/indexConsole.css";
163+
} else {
161164
scriptUri = panel.webview
162165
.asWebviewUri(
163166
vscode.Uri.joinPath(extensionUri, "gui/assets/indexConsole.js"),
@@ -168,9 +171,6 @@ export class ContinueConsoleWebviewViewProvider
168171
vscode.Uri.joinPath(extensionUri, "gui/assets/indexConsole.css"),
169172
)
170173
.toString();
171-
} else {
172-
scriptUri = "http://localhost:5173/src/console.tsx";
173-
styleMainUri = "http://localhost:5173/src/indexConsole.css";
174174
}
175175

176176
panel.webview.options = {

extensions/vscode/src/ContinueGUIWebviewViewProvider.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ export class ContinueGUIWebviewViewProvider
4343
}
4444

4545
public resetWebviewProtocolWebview(): void {
46-
if (this._webview) {
47-
this.webviewProtocol.webview = this._webview;
48-
} else {
46+
if (!this._webview) {
4947
console.warn("no webview found during reset");
48+
return;
5049
}
50+
this.webviewProtocol.webview = this._webview;
5151
}
5252

5353
sendMainUserInput(input: string) {
@@ -80,16 +80,16 @@ export class ContinueGUIWebviewViewProvider
8080

8181
const inDevelopmentMode =
8282
context?.extensionMode === vscode.ExtensionMode.Development;
83-
if (!inDevelopmentMode) {
83+
if (inDevelopmentMode) {
84+
scriptUri = "http://localhost:5173/src/main.tsx";
85+
styleMainUri = "http://localhost:5173/src/index.css";
86+
} else {
8487
scriptUri = panel.webview
8588
.asWebviewUri(vscode.Uri.joinPath(extensionUri, "gui/assets/index.js"))
8689
.toString();
8790
styleMainUri = panel.webview
8891
.asWebviewUri(vscode.Uri.joinPath(extensionUri, "gui/assets/index.css"))
8992
.toString();
90-
} else {
91-
scriptUri = "http://localhost:5173/src/main.tsx";
92-
styleMainUri = "http://localhost:5173/src/index.css";
9393
}
9494

9595
panel.webview.options = {
@@ -121,7 +121,7 @@ export class ContinueGUIWebviewViewProvider
121121
e.affectsConfiguration("workbench.preferredHighContrastLightColorTheme")
122122
) {
123123
// Send new theme to GUI to update embedded Monaco themes
124-
this.webviewProtocol?.request("setTheme", { theme: getTheme() });
124+
void this.webviewProtocol?.request("setTheme", { theme: getTheme() });
125125
}
126126
});
127127

extensions/vscode/src/VsCodeIde.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
import { Repository } from "./otherExtensions/git";
1616
import { SecretStorage } from "./stubs/SecretStorage";
1717
import { VsCodeIdeUtils } from "./util/ideUtils";
18+
import { getExtensionVersion, isExtensionPrerelease } from "./util/util";
1819
import { getExtensionUri, openEditorAndRevealRange } from "./util/vscode";
1920
import { VsCodeWebviewProtocol } from "./webviewProtocol";
2021

@@ -33,7 +34,6 @@ import type {
3334
TerminalOptions,
3435
Thread,
3536
} from "core";
36-
import { getExtensionVersion, isExtensionPrerelease } from "./util/util";
3737

3838
class VsCodeIde implements IDE {
3939
ideUtils: VsCodeIdeUtils;

gui/package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@tiptap/extension-document": "^2.27.0",
2929
"@tiptap/extension-dropcursor": "^2.27.0",
3030
"@tiptap/extension-history": "^2.27.1",
31-
"@tiptap/extension-image": "^2.1.16",
31+
"@tiptap/extension-image": "^2.27.1",
3232
"@tiptap/extension-mention": "^2.1.13",
3333
"@tiptap/extension-paragraph": "^2.3.2",
3434
"@tiptap/extension-placeholder": "^2.1.13",

0 commit comments

Comments
 (0)