@promptbook/utils
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
53 lines (52 loc) • 1.9 kB
TypeScript
/**
* How many prompt boilerplate files are generated and how many prompts each of them contains.
*
* @private internal utility of `ptbk coder`
*/
export type BoilerplateCount = {
/**
* Number of generated prompt boilerplate files.
*/
readonly filesCount: number;
/**
* Number of prompts written into each generated file.
*
* Note: More than one prompt per file is an advanced option - each prompt is one separate
* coding task separated by `---`, with all prompts in the file sharing its fresh emoji tag.
*/
readonly promptsPerFileCount: number;
};
/**
* Number of prompt boilerplate files and prompts per file used when `--count` is not provided.
*
* @private internal utility of `ptbk coder`
*/
export declare const DEFAULT_BOILERPLATE_COUNT: BoilerplateCount;
/**
* Formats one boilerplate count back into the `N*M` notation of the `--count` option.
*
* @private internal utility of `ptbk coder`
*/
export declare function formatBoilerplateCount({ filesCount, promptsPerFileCount }: BoilerplateCount): string;
/**
* Default value of the `--count` option rendered in the `N*M` notation, for example `5*1`.
*
* @private internal utility of `ptbk coder`
*/
export declare const DEFAULT_BOILERPLATE_COUNT_OPTION_VALUE: string;
/**
* Description of the `--count` option shared by all commands which generate prompt boilerplates.
*
* @private internal utility of `ptbk coder`
*/
export declare const BOILERPLATE_COUNT_OPTION_DESCRIPTION: string;
/**
* Parses the `--count` option value into the number of files and the number of prompts in each of them.
*
* Both notations are supported:
* - `N` and `N*1` => N files with one prompt each
* - `N*M` => N files with M prompts each
*
* @private internal utility of `ptbk coder`
*/
export declare function parseBoilerplateCount(countOption: string): BoilerplateCount;