diff options
| author | christine betts <[email protected]> | 2025-07-25 14:50:34 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-25 14:50:34 +0000 |
| commit | 1d3ad9d0758a94e42fa88d20618d164fe1140f11 (patch) | |
| tree | f79f668858cb32e62a7ff96e3d1993ab341a3b3c /packages/vscode-ide-companion/src/ide-server.ts | |
| parent | 5d4b02ca85e2e6427b68f27a01659a9f0db66d74 (diff) | |
Add drawer for active files in IDE mode (#4682)
Co-authored-by: Shreya <[email protected]>
Diffstat (limited to 'packages/vscode-ide-companion/src/ide-server.ts')
| -rw-r--r-- | packages/vscode-ide-companion/src/ide-server.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/vscode-ide-companion/src/ide-server.ts b/packages/vscode-ide-companion/src/ide-server.ts index aad86a08..3072029b 100644 --- a/packages/vscode-ide-companion/src/ide-server.ts +++ b/packages/vscode-ide-companion/src/ide-server.ts @@ -252,8 +252,11 @@ const createMcpServer = () => { inputSchema: {}, }, async () => { - const activeEditor = vscode.window.activeTextEditor; - const filePath = activeEditor ? activeEditor.document.uri.fsPath : ''; + const editor = vscode.window.activeTextEditor; + const filePath = + editor && editor.document.uri.scheme === 'file' + ? editor.document.uri.fsPath + : ''; if (filePath) { return { content: [{ type: 'text', text: `Active file: ${filePath}` }], |
