@elyx-code/project-logic-tree 0.0.7224 → 0.0.7225

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -316,6 +316,7 @@ export interface ICommandStep<TContext = any> {
316
316
  ghostHint?: string;
317
317
  required?: boolean;
318
318
  allowFreeText?: boolean;
319
+ isEnabled?: (confirmedParts: ICommandPart[], ctx?: TContext) => boolean;
319
320
  getOptions?: (query: string, ctx: TContext) => Promise<ICommandOptionItem[]>;
320
321
  resolvePart: (valueOrOption: any, ctx: TContext, partIndex: number) => ICommandPart;
321
322
  isStepSatisfied?: (value: string | ICommandPart, ctx: TContext) => boolean;
@@ -328,7 +329,7 @@ export interface IComposableCommand<TContext = any> {
328
329
  icon?: string;
329
330
  namedColor?: NamedColor | string;
330
331
  subcommands?: Record<string, IComposableCommand<TContext>> | IComposableCommand<TContext>[];
331
- steps?: ICommandStep<TContext>[];
332
+ steps?: ICommandStep<TContext>[] | ((confirmedParts: ICommandPart[], ctx?: TContext) => ICommandStep<TContext>[]);
332
333
  beforeSubmit?: (ctx: ICommandExecutionContext) => Promise<IBeforeSubmitResult>;
333
334
  execute?: (ctx: ICommandExecutionContext) => Promise<ICommandExecutionResult>;
334
335
  getOptions?: (stage: CommandStage, query: string, ctx: ICommandAutocompleteContext) => Promise<any[]>;