perf: replace regex with slice(1) for leading slash removal

This commit is contained in:
Roo Code 2025-11-04 01:57:36 +00:00
parent 746921f5f4
commit b863406fcc

View file

@ -382,7 +382,7 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
// Keep the context menu open and immediately search within the folder
setShowContextMenu(true)
setSelectedType(null)
const folderQuery = insertValue.replace(/^\/+/, "")
const folderQuery = insertValue.slice(1)
setSearchQuery(folderQuery)
setSelectedMenuIndex(0)