Theia API Documentation v1.65.0
    Preparing search index...

    Registry for all the function calls available to Agents.

    interface ToolInvocationRegistry {
        onDidChange: Event<void>;
        getAllFunctions(): ToolRequest[];
        getFunction(toolId: string): undefined | ToolRequest;
        getFunctions(...toolIds: string[]): ToolRequest[];
        registerTool(tool: ToolRequest): void;
        unregisterAllTools(providerName: string): void;
    }

    Implemented by

    Index

    Properties

    onDidChange: Event<void>

    Event that is fired whenever the registry changes (tool registered or unregistered).

    Methods

    • Retrieves a specific ToolRequest from the registry.

      Parameters

      • toolId: string

        The unique identifier of the tool to retrieve.

      Returns undefined | ToolRequest

      The ToolRequest object corresponding to the provided tool ID, or undefined if the tool is not found in the registry.

    • Retrieves multiple ToolRequests from the registry.

      Parameters

      • ...toolIds: string[]

        A list of tool IDs to retrieve.

      Returns ToolRequest[]

      An array of ToolRequest objects for the specified tool IDs. If a tool ID is not found, it is skipped in the returned array.

    • Unregisters all tools provided by a specific tool provider.

      Parameters

      • providerName: string

        The name of the tool provider whose tools should be removed (as specificed in the ToolRequest).

      Returns void