From 2e0c0d796539d6b629509aac26e5410683c40f64 Mon Sep 17 00:00:00 2001 From: Jackson Chen <541898146chen@gmail.com> Date: Tue, 17 Sep 2024 01:03:39 -0500 Subject: [PATCH] refactor(vscode): rename chatOutline to chatOutlineEnabled --- clients/vscode/src/ContextVariables.ts | 6 +++--- clients/vscode/src/outline/NLOutlinesProvider.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/clients/vscode/src/ContextVariables.ts b/clients/vscode/src/ContextVariables.ts index d6e5723903ba..7e07ba34e976 100644 --- a/clients/vscode/src/ContextVariables.ts +++ b/clients/vscode/src/ContextVariables.ts @@ -98,12 +98,12 @@ export class ContextVariables { this.inlineCompletionTriggerModeValue = value; } - get chatOutline(): boolean { + get chatOutlineEnabled(): boolean { return this.chatOutlineValue; } - set chatOutline(value: boolean) { - commands.executeCommand("setContext", "tabby.chat.outline", value); + set chatOutlineEnabled(value: boolean) { + commands.executeCommand("setContext", "tabby.chatOutlineEnabled", value); this.chatOutlineValue = value; } } diff --git a/clients/vscode/src/outline/NLOutlinesProvider.ts b/clients/vscode/src/outline/NLOutlinesProvider.ts index 37fa74254d61..7185ab075322 100644 --- a/clients/vscode/src/outline/NLOutlinesProvider.ts +++ b/clients/vscode/src/outline/NLOutlinesProvider.ts @@ -19,7 +19,7 @@ import { Config } from "../Config"; import OpenAI from "openai"; import generateNLOutlinesPrompt from "../../assets/prompts/generateNLOutlines.txt"; import editNLOutline from "../../assets/prompts/editNLOutline.txt"; -import * as Diff from "diff"; +import { diffLines } from "diff"; interface ChatNLOutlinesParams { location: Location; @@ -313,7 +313,7 @@ export class NLOutlinesProvider extends EventEmitter implements CodeLensPr const removed: string[] = []; const unchanged: string[] = []; - Diff.diffLines(oldCode, newCode).forEach((diff) => { + diffLines(oldCode, newCode).forEach((diff) => { const lines = diff.value.split("\n").filter((line) => line !== ""); if (diff.added) { added.push(...lines);