@dean0x/showme
Advanced tools
@@ -161,9 +161,13 @@ /** | ||
| let vsCodeResult; | ||
| // For specific files, open each as a separate diff tab | ||
| if (data.files && data.files.length > 0) { | ||
| // Get the list of files to diff - either from user input or from diff result | ||
| const filesToDiff = data.files && data.files.length > 0 | ||
| ? data.files | ||
| : data.diffResult.files.map(f => f.path); | ||
| // For specific files or files from diff result, open each as a separate diff tab | ||
| if (filesToDiff.length > 0) { | ||
| // Open each file as a separate diff tab | ||
| let lastCommand = ''; | ||
| let allSuccess = true; | ||
| for (let i = 0; i < data.files.length; i++) { | ||
| const filepath = data.files[i]; | ||
| for (let i = 0; i < filesToDiff.length; i++) { | ||
| const filepath = filesToDiff[i]; | ||
| const isFirstOperation = i === 0; | ||
@@ -228,3 +232,3 @@ if (data.staged) { | ||
| ok: false, | ||
| error: new ShowDiffError('Failed to open any diff tabs', 'NO_DIFFS_OPENED', { files: data.files }) | ||
| error: new ShowDiffError('Failed to open any diff tabs', 'NO_DIFFS_OPENED', { files: filesToDiff }) | ||
| }; | ||
@@ -231,0 +235,0 @@ } |
+1
-1
| { | ||
| "name": "@dean0x/showme", | ||
| "version": "0.1.4", | ||
| "version": "0.1.5", | ||
| "description": "MCP server providing ShowFile and ShowDiff tools for VS Code integration with syntax highlighting", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
124377
0.21%3171
0.13%