Interface PromptFragmentCustomizationService

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

Implemented by

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

    • Optional defaultContent: 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

    • Optional defaultContent: 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

    • Optional defaultContent: 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 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>