mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
Fix logic for spaces after context mentions (#1827)
This commit is contained in:
parent
70a476e722
commit
78bc0c12af
1 changed files with 3 additions and 5 deletions
|
|
@ -300,16 +300,14 @@ export function shouldShowContextMenu(text: string, position: number): boolean {
|
|||
|
||||
const textAfterAt = beforeCursor.slice(atIndex + 1)
|
||||
|
||||
// Check if there's any whitespace after the '@'
|
||||
if (/\s/.test(textAfterAt)) return false
|
||||
|
||||
// Don't show the menu if it's clearly a URL
|
||||
if (textAfterAt.toLowerCase().startsWith("http")) {
|
||||
return false
|
||||
}
|
||||
|
||||
// If there's a space after @, don't show the menu (normal @ mention)
|
||||
if (textAfterAt.indexOf(" ") === 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
// Show menu in all other cases
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue