forked from cline/cline
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Incorrect escaping of spaces in file paths causes mention highlighting and file access failures #2564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Hi, this should be fixed in the latest release - can you try again? |
SmartManoj
pushed a commit
to SmartManoj/Roo-Code
that referenced
this issue
May 6, 2025
…ename Cline to Task (RooVetGit#2564) * refactor: Replace ClineProvider with Controller for improved architecture - Replaced instances of ClineProvider with Controller in extension.ts and related files to enhance code organization and maintainability. - Introduced a new Controller class to manage interactions previously handled by ClineProvider, streamlining the extension's functionality. - Updated command registrations and message handling to utilize the new Controller structure, ensuring consistent behavior across the extension. - Removed the ClineProvider class and its associated methods, consolidating functionality within the Controller class. - Added new state management and task handling capabilities within the Controller to support the updated architecture. * clean up * refactor: Update Task class to use Controller reference - Replaced all instances of ClineProvider with Controller in the Task class to align with the recent architectural changes. - Updated references for context management, task history, and message handling to utilize the new Controller structure. - Ensured consistent behavior across the Task class by adapting to the Controller's methods and properties. * refactor: Simplify WebviewProvider listeners structure * Fixes * Make controller a dependency of webview * refactor: Improve message listener in WebviewProvider - Updated the setWebviewMessageListener method to use an arrow function for the message handler, preserving the 'this' context of the controller. - Added detailed comments explaining the importance of maintaining the correct 'this' context when passing methods as callbacks in JavaScript/TypeScript. * Add doc * Add to chat for visible webview * Fixes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
App Version
3.11.14
API Provider
OpenRouter
Model Used
Claude 3.7 Sonnet
Actual vs. Expected Behavior
Actual Behavior:
@
mention highlighting doesn't work correctly@
mention syntaxExpected Behavior:
@
mention highlighting should work correctly for all file paths regardless of spaces or special characters@
mention syntaxDetailed Steps to Reproduce
folder with spaces/file with spaces.txt
)@
to trigger the mention functionalityCode to demonstrate the issue:
Relevant API Request Output
Additional Context
The issue occurs due to multi-level escaping problems in two key utility functions:
convertToMentionPath
inpath-mentions.ts
- Fails to properly handle paths with spaces and existing escaped spacesinsertMention
incontext-mentions.ts
- Doesn't consistently handle the escaped pathsThis issue affects both Windows and Unix-style paths. The problem is particularly severe when files already contain escaped spaces, as the escaping logic doesn't account for this case.
The bug impacts users trying to reference files with spaces in their paths, which is a common scenario especially in project names, documentation folders, and descriptive file naming schemes.
Debug info:
The text was updated successfully, but these errors were encountered: