Skip to content
Open
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
8 changes: 5 additions & 3 deletions extensions/vscode/src/activation/InlineTipManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export class InlineTipManager {

private createSvgTooltipDecoration() {
var backgroundColour = "#333333";
if (this.theme) {
if (this.theme?.colors?.["editor.background"]) {
backgroundColour = this.theme.colors["editor.background"];
}
return vscode.window.createTextEditorDecorationType({
Expand Down Expand Up @@ -274,7 +274,8 @@ export class InlineTipManager {
{
...baseTextConfig,
x: SVG_CONFIG.chatLabelX,
fill: this.theme?.colors["editor.foreground"] ?? SVG_CONFIG.stroke,
fill:
this.theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke,
},
SVG_CONFIG.chatLabel,
)
Expand All @@ -291,7 +292,8 @@ export class InlineTipManager {
{
...baseTextConfig,
x: SVG_CONFIG.editLabelX,
fill: this.theme?.colors["editor.foreground"] ?? SVG_CONFIG.stroke,
fill:
this.theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke,
},
SVG_CONFIG.editLabel,
)
Expand Down
5 changes: 3 additions & 2 deletions extensions/vscode/src/activation/JumpManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import { NextEditOutcome } from "core/nextEdit/types";
// @ts-ignore
import svgBuilder from "svg-builder";
import * as vscode from "vscode";

Check warning on line 5 in extensions/vscode/src/activation/JumpManager.ts

View workflow job for this annotation

GitHub Actions / vscode-checks

There should be at least one empty line between import groups
import { getTheme } from "../util/getTheme";

Check warning on line 6 in extensions/vscode/src/activation/JumpManager.ts

View workflow job for this annotation

GitHub Actions / vscode-checks

There should be at least one empty line between import groups
import {
HandlerPriority,
SelectionChangeManager,
Expand Down Expand Up @@ -119,7 +119,7 @@
public dispose() {
// Dispose current decoration.
this._disposables.forEach((d) => {
if (d) d.dispose();

Check warning on line 122 in extensions/vscode/src/activation/JumpManager.ts

View workflow job for this annotation

GitHub Actions / vscode-checks

Expected { after 'if' condition
});
this._disposables = [];
}
Expand All @@ -145,7 +145,8 @@
{
...baseTextConfig,
x: 4,
fill: this._theme?.colors["editor.foreground"] ?? SVG_CONFIG.stroke,
fill:
this._theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke,
},
SVG_CONFIG.label,
)
Expand All @@ -168,7 +169,7 @@

private _createSvgJumpDecoration(): vscode.TextEditorDecorationType {
const backgroundColour =
this._theme?.colors["editor.background"] ?? "#333333";
this._theme?.colors?.["editor.background"] ?? "#333333";

return vscode.window.createTextEditorDecorationType({
after: {
Expand Down Expand Up @@ -366,7 +367,7 @@
await this.clearJumpDecoration();

this._jumpAccepted = false;
vscode.commands.executeCommand("editor.action.inlineSuggest.trigger");

Check warning on line 370 in extensions/vscode/src/activation/JumpManager.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
}
},
);
Expand All @@ -378,7 +379,7 @@
console.debug(
"deleteChain from JumpManager.ts: rejectJump and decoration visible",
);
NextEditProvider.getInstance().deleteChain();

Check warning on line 382 in extensions/vscode/src/activation/JumpManager.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
await this.clearJumpDecoration();
}
},
Expand Down
Loading