Skip to content

Commit

Permalink
refactor(vscode): rename chatOutline to chatOutlineEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Sma1lboy committed Sep 17, 2024
1 parent 8441371 commit 2e0c0d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions clients/vscode/src/ContextVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
4 changes: 2 additions & 2 deletions clients/vscode/src/outline/NLOutlinesProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -313,7 +313,7 @@ export class NLOutlinesProvider extends EventEmitter<void> 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);
Expand Down

0 comments on commit 2e0c0d7

Please sign in to comment.