Skip to content

Commit

Permalink
fix(vscode): add logger to explain code command
Browse files Browse the repository at this point in the history
  • Loading branch information
wwayne committed May 31, 2024
1 parent 436c4be commit 5c1c346
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clients/vscode/src/Commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ import os from "os";
import path from "path";
import { strict as assert } from "assert";
import { Client } from "./lsp/Client";
import { getLogger } from "./logger";
import { Config } from "./Config";
import { ContextVariables } from "./ContextVariables";
import { InlineCompletionProvider } from "./InlineCompletionProvider";
import { ChatViewProvider } from "./chat/ChatViewProvider";
import { GitProvider, Repository } from "./git/GitProvider";

const logger = getLogger();

export class Commands {
private chatEditCancellationTokenSource: CancellationTokenSource | null = null;

Expand Down Expand Up @@ -244,6 +247,10 @@ export class Commands {

commands.executeCommand("tabby.chatView.focus");

if (!remoteUrl) {
logger.warn("Failed to get git_url for explainCodeBlock, uri: $uri, repo: $repo");
}

this.chatViewProvider.sendMessage({
message: "Explain the selected code:",
selectContext: {
Expand Down

0 comments on commit 5c1c346

Please sign in to comment.