enable async tool discovery by making the registry accessor async; remove call to discoverTools that caused duplicate discovery (#691)

This commit is contained in:
Olcan
2025-06-02 09:56:32 -07:00
committed by GitHub
parent 467dec4edf
commit c5869db080
7 changed files with 21 additions and 20 deletions

View File

@@ -100,6 +100,7 @@ Signal: Signal number or \`(none)\` if no signal was received.
export class ToolRegistry {
private tools: Map<string, Tool> = new Map();
private discovery: Promise<void> | null = null;
private config: Config;
constructor(config: Config) {
@@ -121,7 +122,7 @@ export class ToolRegistry {
}
/**
* Discovers tools from project, if a discovery command is configured.
* Discovers tools from project (if available and configured).
* Can be called multiple times to update discovered tools.
*/
async discoverTools(): Promise<void> {