fix: quote Windows absolute paths to avoid MCP mention collision
Paths containing ':' (e.g. Windows drive letters) are now emitted in quoted @"..." form so they don't match the MCP resource mention regex. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1213,7 +1213,7 @@ function PromptInput({
|
|||||||
const draggedPaths = extractDraggedFilePaths(text);
|
const draggedPaths = extractDraggedFilePaths(text);
|
||||||
if (draggedPaths.length > 0) {
|
if (draggedPaths.length > 0) {
|
||||||
const mentions = draggedPaths
|
const mentions = draggedPaths
|
||||||
.map(p => (p.includes(' ') ? `@"${p}"` : `@${p}`))
|
.map(p => (p.includes(' ') || p.includes(':') ? `@"${p}"` : `@${p}`))
|
||||||
.join(' ');
|
.join(' ');
|
||||||
// Ensure spacing around the mention(s) relative to existing input
|
// Ensure spacing around the mention(s) relative to existing input
|
||||||
const charBefore = input[cursorOffset - 1];
|
const charBefore = input[cursorOffset - 1];
|
||||||
|
|||||||
Reference in New Issue
Block a user