refactor: PromptDef

This commit is contained in:
2026-04-06 15:54:02 +08:00
parent fe3bef0a01
commit 6cfb3b6df8
7 changed files with 45 additions and 14 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ describe('createGameContext', () => {
const ctx = createGameContext(registry);
registry.register('test <value>', async function (_ctx, value) {
return this.prompt<string>('prompt <answer>', () => 'ok');
return this.prompt({schema: 'prompt <answer>'}, () => 'ok');
});
const promptPromise = new Promise<PromptEvent>(resolve => {