fix: add relevant context only chat view is visible (#3388)

This commit is contained in:
Jackson Chen 2024-11-08 03:14:30 -06:00 committed by GitHub
parent 8d2439d830
commit 4338a98b8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,8 +87,11 @@ export class Commands {
this.chatViewProvider.addRelevantContext(fileContext);
}
};
commands.executeCommand("tabby.chatView.focus");
commands.executeCommand("tabby.chatView.focus").then(addContext);
if (this.chatViewProvider.webview?.visible) {
addContext();
}
}
commands: Record<string, (...args: never[]) => void> = {