Replace 'path' with 'fsPath' in registerAddContextCommand
- Update callback function to use 'fsPath' instead of 'path'. - Modify sendFileSelectMessage call to pass 'uri.fsPath'.
This commit is contained in:
parent
3fc21b920e
commit
ae15158fe5
@ -20,12 +20,12 @@ async function ensureChatPanel(context: vscode.ExtensionContext): Promise<boolea
|
||||
}
|
||||
|
||||
function registerAddContextCommand(context: vscode.ExtensionContext) {
|
||||
const callback = async (uri: { path: any; }) => {
|
||||
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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user