diff --git a/packages/core/src/human-feedback/dummy.ts b/packages/core/src/human-feedback/dummy.ts new file mode 100644 index 0000000..2a4f549 --- /dev/null +++ b/packages/core/src/human-feedback/dummy.ts @@ -0,0 +1,34 @@ +import { + HumanFeedbackMechanism, + HumanFeedbackType, + HumanFeedbackUserActions +} from './feedback' + +export class HumanFeedbackMechanismDummy< + T extends HumanFeedbackType, + TOutput +> extends HumanFeedbackMechanism { + protected async _select( + output: TOutput + ): Promise { + return output[0] as any + } + + protected async _multiselect( + output: TOutput + ): Promise { + return output as any + } + + protected async _annotate(): Promise { + return 'Default annotation' + } + + protected async _edit(output: string): Promise { + return output + } + + protected async _askUser(): Promise { + return HumanFeedbackUserActions.Accept + } +} diff --git a/packages/core/src/human-feedback/index.ts b/packages/core/src/human-feedback/index.ts index 105c876..593a175 100644 --- a/packages/core/src/human-feedback/index.ts +++ b/packages/core/src/human-feedback/index.ts @@ -2,3 +2,4 @@ export * from './cli' export * from './feedback' export * from './slack' export * from './twilio' +export * from './dummy'