Theia API Documentation v1.65.0
    Preparing search index...
    interface PromptFragmentCustomizationService {
        onDidChangeCustomAgents: Event<void>;
        onDidChangePromptFragmentCustomization: Event<string[]>;
        createBuiltInPromptFragmentCustomization(
            fragmentId: string,
            defaultContent?: string,
        ): Promise<void>;
        createPromptFragmentCustomization(
            fragmentId: string,
            defaultContent?: string,
        ): Promise<void>;
        editBuiltInPromptFragmentCustomization(
            fragmentId: string,
            defaultContent?: string,
        ): Promise<void>;
        editPromptFragmentCustomization(
            fragmentId: string,
            customizationId: string,
        ): Promise<void>;
        getActivePromptFragmentCustomization(
            fragmentId: string,
        ): undefined | CustomizedPromptFragment;
        getAllCustomizations(fragmentId: string): CustomizedPromptFragment[];
        getCustomAgents(): Promise<CustomAgentDescription[]>;
        getCustomAgentsLocations(): Promise<{ exists: boolean; uri: URI }[]>;
        getCustomizedPromptFragmentIds(): string[];
        getPromptFragmentCustomizationDescription(
            fragmentId: string,
            customizationId: string,
        ): Promise<undefined | string>;
        getPromptFragmentCustomizationType(
            fragmentId: string,
            customizationId: string,
        ): Promise<undefined | string>;
        getPromptFragmentIDFromResource(resourceId: unknown): undefined | string;
        isPromptFragmentCustomized(fragmentId: string): boolean;
        openCustomAgentYaml(uri: URI): Promise<void>;
        removeAllPromptFragmentCustomizations(fragmentId: string): Promise<void>;
        removePromptFragmentCustomization(
            fragmentId: string,
            customizationId: string,
        ): Promise<void>;
        resetToCustomization(
            fragmentId: string,
            customizationId: string,
        ): Promise<void>;
    }

    Implemented by

    Index

    Properties

    onDidChangeCustomAgents: Event<void>

    Event fired when custom agents are modified

    onDidChangePromptFragmentCustomization: Event<string[]>

    Event fired when a prompt fragment is changed

    Methods

    • Creates a customization based on a built-in fragment

      Parameters

      • fragmentId: string

        The ID of the built-in fragment to customize

      • OptionaldefaultContent: string

        Optional default content for the customization

      Returns Promise<void>

    • Creates a new customization for a prompt fragment

      Parameters

      • fragmentId: string

        The fragment ID to customize

      • OptionaldefaultContent: string

        Optional default content for the customization

      Returns Promise<void>

    • Edits the built-in customization of a prompt fragment

      Parameters

      • fragmentId: string

        The prompt fragment ID to edit

      • OptionaldefaultContent: string

        Optional default content for the customization

      Returns Promise<void>

    • Edits a specific customization of a prompt fragment

      Parameters

      • fragmentId: string

        The prompt fragment ID

      • customizationId: string

        The customization ID to edit

      Returns Promise<void>

    • Gets the locations of custom agent configuration files

      Returns Promise<{ exists: boolean; uri: URI }[]>

      Array of URIs and existence status

    • Gets the IDs of all prompt fragments that have customizations

      Returns string[]

      Array of prompt fragment IDs

    • Gets information about the description of a customization

      Parameters

      • fragmentId: string

        The fragment ID

      • customizationId: string

        The customization ID

      Returns Promise<undefined | string>

      Description of the customization

    • Gets information about the source/type of a customization

      Parameters

      • fragmentId: string

        The fragment ID

      • customizationId: string

        The customization ID

      Returns Promise<undefined | string>

      Type of the customization source

    • Gets the fragment ID from a resource identifier

      Parameters

      • resourceId: unknown

        Resource identifier (implementation specific)

      Returns undefined | string

      Fragment ID or undefined if not found

    • Checks if a prompt fragment has customizations

      Parameters

      • fragmentId: string

        The prompt fragment ID

      Returns boolean

      Whether the fragment has any customizations

    • Opens an existing customAgents.yml file at the given URI, or creates a new one if it doesn't exist.

      Parameters

      • uri: URI

        The URI of the customAgents.yml file to open or create

      Returns Promise<void>

    • Resets a fragment to its built-in version by removing all customizations

      Parameters

      • fragmentId: string

        The fragment ID to reset

      Returns Promise<void>

    • Removes a specific customization of a prompt fragment

      Parameters

      • fragmentId: string

        The prompt fragment ID

      • customizationId: string

        The customization ID to remove

      Returns Promise<void>

    • Resets to a specific customization by removing higher-priority customizations

      Parameters

      • fragmentId: string

        The fragment ID

      • customizationId: string

        The customization ID to reset to

      Returns Promise<void>