Skip to content

Commit e87cf08

Browse files
committed
add limit to code symbol
1 parent 4fa7b3d commit e87cf08

File tree

1 file changed

+7
-1
lines changed
  • packages/core/src/codewhispererChat/controllers/chat

1 file changed

+7
-1
lines changed

packages/core/src/codewhispererChat/controllers/chat/controller.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,13 @@ export class ChatController {
539539
id: contextCommandItem.id,
540540
icon: 'folder' as MynahIconsType,
541541
})
542-
} else if (contextCommandItem.symbol) {
542+
}
543+
// TODO: Remove the limit of 25k once the performance issue of mynahUI in webview is fixed.
544+
else if (
545+
contextCommandItem.symbol &&
546+
symbolsCmd.children &&
547+
symbolsCmd.children[0].commands.length < 25_000
548+
) {
543549
symbolsCmd.children?.[0].commands.push({
544550
command: contextCommandItem.symbol.name,
545551
description: `${contextCommandItem.symbol.kind}, ${path.join(wsFolderName, contextCommandItem.relativePath)}, L${contextCommandItem.symbol.range.start.line}-${contextCommandItem.symbol.range.end.line}`,

0 commit comments

Comments
 (0)