Skip to content

Commit b863406

Browse files
committed
perf: replace regex with slice(1) for leading slash removal
1 parent 746921f commit b863406

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webview-ui/src/components/chat/ChatTextArea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
382382
// Keep the context menu open and immediately search within the folder
383383
setShowContextMenu(true)
384384
setSelectedType(null)
385-
const folderQuery = insertValue.replace(/^\/+/, "")
385+
const folderQuery = insertValue.slice(1)
386386
setSearchQuery(folderQuery)
387387
setSelectedMenuIndex(0)
388388

0 commit comments

Comments
 (0)