forked from microsoft/vscode-data-analysis-for-copilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcsvCommand.ts
More file actions
15 lines (12 loc) · 759 Bytes
/
csvCommand.ts
File metadata and controls
15 lines (12 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation and GitHub. All rights reserved.
*--------------------------------------------------------------------------------------------*/
import { commands, Uri, workspace } from "vscode";
export function registerCsvCommand() {
return commands.registerCommand('dachat.analyzeCsv', async (file: Uri) => {
await commands.executeCommand('workbench.action.chat.open');
await commands.executeCommand('workbench.action.chat.focusInput');
const relativePath = workspace.asRelativePath(file);
await commands.executeCommand('workbench.action.chat.sendToNewChat', { inputValue: `@data Analyze the file ${relativePath}` });
})
}