feat(lsp): add result limits to prevent token overflow

- Add DEFAULT_MAX_REFERENCES, DEFAULT_MAX_SYMBOLS, DEFAULT_MAX_DIAGNOSTICS (200 each)
- Apply limits to lsp_find_references, lsp_document_symbols, lsp_workspace_symbols, lsp_diagnostics
- Show truncation warning when results exceed limits
This commit is contained in:
YeonGyu-Kim
2025-12-05 22:51:46 +09:00
parent 725ec9b91d
commit b045f6918e
2 changed files with 48 additions and 10 deletions
+4
View File
@@ -36,6 +36,10 @@ export const SEVERITY_MAP: Record<number, string> = {
4: "hint",
}
export const DEFAULT_MAX_REFERENCES = 200
export const DEFAULT_MAX_SYMBOLS = 200
export const DEFAULT_MAX_DIAGNOSTICS = 200
export const BUILTIN_SERVERS: Record<string, Omit<LSPServerConfig, "id">> = {
typescript: {
command: ["typescript-language-server", "--stdio"],