@promptbook/utils
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
29 lines (28 loc) • 1.13 kB
TypeScript
/**
* Supported values of the `--git-changes` option, which decides what happens with a dirty working tree.
*
* - `fail` — refuse to start while the working tree has uncommitted changes
* - `ignore` — start anyway and leave the uncommitted changes where they are
* - `continue` — resume the single prompt which was left in the middle of its implementation
*
* @private internal shared utility of `ptbk coder run`
*/
export declare const GIT_CHANGES_MODE_VALUES: readonly ["fail", "ignore", "continue"];
/**
* Behavior requested for a working tree which has uncommitted changes.
*
* @private internal shared utility of `ptbk coder run`
*/
export type GitChangesMode = (typeof GIT_CHANGES_MODE_VALUES)[number];
/**
* Mode applied when `--git-changes` is not used at all.
*
* @private internal shared utility of `ptbk coder run`
*/
export declare const DEFAULT_GIT_CHANGES_MODE: GitChangesMode;
/**
* Checks whether a value is a supported `--git-changes` mode.
*
* @private internal shared utility of `ptbk coder run`
*/
export declare function isGitChangesMode(value: string): value is GitChangesMode;