Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions extensions/vscode/src/ContinueConsoleWebviewViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class ContinueConsoleWebviewViewProvider
this._webview.onDidReceiveMessage((message: FromConsoleView) => {
if (message.type === "start") {
this._currentUuid = message.uuid;
this._webview?.postMessage({
void this._webview?.postMessage({
type: "init",
uuid: this._currentUuid,
items: this.getAllItems(),
Expand Down Expand Up @@ -70,7 +70,7 @@ export class ContinueConsoleWebviewViewProvider
if (e.affectsConfiguration(`${EXTENSION_NAME}.enableConsole`)) {
const config = vscode.workspace.getConfiguration(EXTENSION_NAME);
this._saveLog = config.get<boolean>("enableConsole");
if (!this._saveLog) {
if (this._saveLog === false) {
this.clearLog();
}
}
Expand Down Expand Up @@ -103,7 +103,7 @@ export class ContinueConsoleWebviewViewProvider
}

if (this._currentUuid) {
this._webview?.postMessage({
void this._webview?.postMessage({
type: "item",
uuid: this._currentUuid,
item,
Expand All @@ -116,7 +116,7 @@ export class ContinueConsoleWebviewViewProvider
MAX_INTERACTIONS
) {
let toRemove = this._completedInteractions.shift();
this._webview?.postMessage({
void this._webview?.postMessage({
type: "remove",
uuid: this._currentUuid,
interactionId: toRemove![0].interactionId,
Expand All @@ -139,7 +139,7 @@ export class ContinueConsoleWebviewViewProvider
this._currentInteractions = new Map();

if (this._currentUuid) {
this._webview?.postMessage({
void this._webview?.postMessage({
type: "clear",
uuid: this._currentUuid,
});
Expand All @@ -157,7 +157,10 @@ export class ContinueConsoleWebviewViewProvider

const inDevelopmentMode =
context?.extensionMode === vscode.ExtensionMode.Development;
if (!inDevelopmentMode) {
if (inDevelopmentMode) {
scriptUri = "http://localhost:5173/src/console.tsx";
styleMainUri = "http://localhost:5173/src/indexConsole.css";
} else {
scriptUri = panel.webview
.asWebviewUri(
vscode.Uri.joinPath(extensionUri, "gui/assets/indexConsole.js"),
Expand All @@ -168,9 +171,6 @@ export class ContinueConsoleWebviewViewProvider
vscode.Uri.joinPath(extensionUri, "gui/assets/indexConsole.css"),
)
.toString();
} else {
scriptUri = "http://localhost:5173/src/console.tsx";
styleMainUri = "http://localhost:5173/src/indexConsole.css";
}

panel.webview.options = {
Expand Down
16 changes: 8 additions & 8 deletions extensions/vscode/src/ContinueGUIWebviewViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
}

public resetWebviewProtocolWebview(): void {
if (this._webview) {
this.webviewProtocol.webview = this._webview;
} else {
if (!this._webview) {
console.warn("no webview found during reset");
return;
}
this.webviewProtocol.webview = this._webview;
}

sendMainUserInput(input: string) {
this.webview?.postMessage({

Check warning on line 54 in extensions/vscode/src/ContinueGUIWebviewViewProvider.ts

View workflow job for this annotation

GitHub Actions / vscode-checks

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
type: "userInput",
input,
});
Expand Down Expand Up @@ -80,16 +80,16 @@

const inDevelopmentMode =
context?.extensionMode === vscode.ExtensionMode.Development;
if (!inDevelopmentMode) {
if (inDevelopmentMode) {
scriptUri = "http://localhost:5173/src/main.tsx";
styleMainUri = "http://localhost:5173/src/index.css";
} else {
scriptUri = panel.webview
.asWebviewUri(vscode.Uri.joinPath(extensionUri, "gui/assets/index.js"))
.toString();
styleMainUri = panel.webview
.asWebviewUri(vscode.Uri.joinPath(extensionUri, "gui/assets/index.css"))
.toString();
} else {
scriptUri = "http://localhost:5173/src/main.tsx";
styleMainUri = "http://localhost:5173/src/index.css";
}

panel.webview.options = {
Expand Down Expand Up @@ -121,7 +121,7 @@
e.affectsConfiguration("workbench.preferredHighContrastLightColorTheme")
) {
// Send new theme to GUI to update embedded Monaco themes
this.webviewProtocol?.request("setTheme", { theme: getTheme() });
void this.webviewProtocol?.request("setTheme", { theme: getTheme() });
}
});

Expand Down
2 changes: 1 addition & 1 deletion extensions/vscode/src/VsCodeIde.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import { Repository } from "./otherExtensions/git";
import { SecretStorage } from "./stubs/SecretStorage";
import { VsCodeIdeUtils } from "./util/ideUtils";
import { getExtensionVersion, isExtensionPrerelease } from "./util/util";
import { getExtensionUri, openEditorAndRevealRange } from "./util/vscode";
import { VsCodeWebviewProtocol } from "./webviewProtocol";

Expand All @@ -33,7 +34,6 @@
TerminalOptions,
Thread,
} from "core";
import { getExtensionVersion, isExtensionPrerelease } from "./util/util";

class VsCodeIde implements IDE {
ideUtils: VsCodeIdeUtils;
Expand Down Expand Up @@ -154,7 +154,7 @@
case "error":
return showErrorMessage(message, "Show logs").then((selection) => {
if (selection === "Show logs") {
vscode.commands.executeCommand("workbench.action.toggleDevTools");

Check warning on line 157 in extensions/vscode/src/VsCodeIde.ts

View workflow job for this annotation

GitHub Actions / vscode-checks

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
}
});
case "info":
Expand Down Expand Up @@ -318,7 +318,7 @@
new vscode.Position(startLine, 0),
new vscode.Position(endLine, 0),
);
openEditorAndRevealRange(vscode.Uri.parse(fileUri), range).then(

Check warning on line 321 in extensions/vscode/src/VsCodeIde.ts

View workflow job for this annotation

GitHub Actions / vscode-checks

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
(editor) => {
// Select the lines
editor.selection = new vscode.Selection(
Expand Down
9 changes: 5 additions & 4 deletions gui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@tiptap/extension-document": "^2.27.0",
"@tiptap/extension-dropcursor": "^2.27.0",
"@tiptap/extension-history": "^2.27.1",
"@tiptap/extension-image": "^2.1.16",
"@tiptap/extension-image": "^2.27.1",
"@tiptap/extension-mention": "^2.1.13",
"@tiptap/extension-paragraph": "^2.3.2",
"@tiptap/extension-placeholder": "^2.1.13",
Expand Down
Loading