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:
@@ -32,10 +32,7 @@ export function createPluginInterface(args: {
|
||||
return {
|
||||
tool: tools,
|
||||
|
||||
"chat.params": async (input: unknown, output: unknown) => {
|
||||
const handler = createChatParamsHandler({ anthropicEffort: hooks.anthropicEffort })
|
||||
await handler(input, output)
|
||||
},
|
||||
"chat.params": createChatParamsHandler({ anthropicEffort: hooks.anthropicEffort }),
|
||||
|
||||
"chat.headers": createChatHeadersHandler({ ctx }),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user