Member Junction
    Preparing search index...

    Manager class for system placeholders. Provides methods to get, add, remove, and resolve placeholders.

    SystemPlaceholderManager

    Index

    Constructors

    Properties

    placeholders: SystemPlaceholder[] = ...

    Array of system placeholders. Protected to allow extension by subclasses.

    Methods

    • Adds a new system placeholder.

      Parameters

      Returns void

      If a placeholder with the same name already exists

      SystemPlaceholderManager.addPlaceholder({
      name: '_ORGANIZATION_NAME',
      description: 'Current organization name',
      getValue: async (params) => {
      // Custom logic to get organization name
      return 'My Organization';
      }
      });
    • Gets the current array of system placeholders. Returns a reference to the array, allowing direct manipulation.

      Returns SystemPlaceholder[]

      The array of system placeholders

      const placeholders = SystemPlaceholderManager.getPlaceholders();
      placeholders.push({
      name: '_CUSTOM_VALUE',
      description: 'My custom value',
      getValue: async (params) => 'custom result'
      });
    • Removes a system placeholder by name.

      Parameters

      • name: string

        The name of the placeholder to remove

      Returns boolean

      True if removed, false if not found

    • Internal

      Resolves all system placeholders for the given prompt parameters. Returns a map of placeholder names to their resolved values.

      Parameters

      Returns Promise<Record<string, string>>

      Map of placeholder names to values