diff --git a/src/contributes/commands.ts b/src/contributes/commands.ts index 48d6bc2..082181e 100644 --- a/src/contributes/commands.ts +++ b/src/contributes/commands.ts @@ -20,12 +20,12 @@ async function ensureChatPanel(context: vscode.ExtensionContext): Promise { + const callback = async (uri: { fsPath: any; }) => { if (!await ensureChatPanel(context)) { return; } - await sendFileSelectMessage(ExtensionContextHolder.provider?.view()!, uri.path); + await sendFileSelectMessage(ExtensionContextHolder.provider?.view()!, uri.fsPath); }; context.subscriptions.push(vscode.commands.registerCommand('devchat.addConext', callback)); context.subscriptions.push(vscode.commands.registerCommand('devchat.addConext_chinese', callback));