mirror of
https://github.com/andrepimenta/claude-code-chat.git
synced 2025-12-10 14:59:52 +00:00
File name better
This commit is contained in:
@@ -231,6 +231,9 @@ class ClaudeChatProvider {
|
||||
case 'dismissWSLAlert':
|
||||
this._dismissWSLAlert();
|
||||
return;
|
||||
case 'openFile':
|
||||
this._openFileInEditor(message.filePath);
|
||||
return;
|
||||
}
|
||||
},
|
||||
null,
|
||||
@@ -1371,6 +1374,17 @@ class ClaudeChatProvider {
|
||||
this._context.globalState.update('wslAlertDismissed', true);
|
||||
}
|
||||
|
||||
private async _openFileInEditor(filePath: string) {
|
||||
try {
|
||||
const uri = vscode.Uri.file(filePath);
|
||||
const document = await vscode.workspace.openTextDocument(uri);
|
||||
await vscode.window.showTextDocument(document, vscode.ViewColumn.One);
|
||||
} catch (error) {
|
||||
vscode.window.showErrorMessage(`Failed to open file: ${filePath}`);
|
||||
console.error('Error opening file:', error);
|
||||
}
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
if (this._panel) {
|
||||
this._panel.dispose();
|
||||
|
||||
Reference in New Issue
Block a user