perf(shared): optimize hot-path utilities across plugin
- task-list: replace O(n³) blocker resolution with Map lookup (C4) - logger: buffer log entries and flush periodically to reduce sync I/O (C5) - plugin-interface: create chatParamsHandler once at init (H3) - pattern-matcher: cache compiled RegExp for wildcard matchers (H6) - file-reference-resolver: use replaceAll instead of split/join (M9) - connected-providers-cache: add in-memory cache for read operations (L4)
This commit is contained in:
@@ -74,7 +74,7 @@ export async function resolveFileReferencesInText(
|
||||
|
||||
let resolved = text
|
||||
for (const [pattern, replacement] of replacements.entries()) {
|
||||
resolved = resolved.split(pattern).join(replacement)
|
||||
resolved = resolved.replaceAll(pattern, replacement)
|
||||
}
|
||||
|
||||
if (findFileReferences(resolved).length > 0 && depth + 1 < maxDepth) {
|
||||
|
||||
Reference in New Issue
Block a user