From b863406fcc2f6653156e301788fd297cedc876a8 Mon Sep 17 00:00:00 2001 From: Roo Code Date: Tue, 4 Nov 2025 01:57:36 +0000 Subject: [PATCH] perf: replace regex with slice(1) for leading slash removal --- webview-ui/src/components/chat/ChatTextArea.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index d0715c0667..3be7ba05a0 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -382,7 +382,7 @@ export const ChatTextArea = forwardRef( // 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)