From 83658c9898718068726347d3c05dc7e934213be0 Mon Sep 17 00:00:00 2001 From: hypercross Date: Tue, 7 Apr 2026 11:26:43 +0800 Subject: [PATCH] chore: remove unused api --- src/core/game.ts | 4 ---- src/samples/tic-tac-toe.ts | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/core/game.ts b/src/core/game.ts index 18fce66..1076653 100644 --- a/src/core/game.ts +++ b/src/core/game.ts @@ -16,7 +16,6 @@ export interface IGameContext = {} > { run(input: string): Promise>; runParsed(command: Command): Promise>; prompt: (def: PromptDef, validator: PromptValidator, currentPlayer?: string | null) => Promise; - addInterruption(promise: Promise): void; // test only _state: MutableSignal; @@ -50,9 +49,6 @@ export function createGameContext = {} >( prompt(def, validator, currentPlayer) { return commands.prompt(def.schema, validator, currentPlayer); }, - addInterruption(promise) { - state.addInterruption(promise); - }, _state: state, _commands: commands, diff --git a/src/samples/tic-tac-toe.ts b/src/samples/tic-tac-toe.ts index 5de066f..b76ec39 100644 --- a/src/samples/tic-tac-toe.ts +++ b/src/samples/tic-tac-toe.ts @@ -1,8 +1,7 @@ import { createGameCommandRegistry, Part, createRegion, - IGameContext + IGameContext, createPromptDef } from '@/index'; -import {createPromptDef} from "@/core/game"; const BOARD_SIZE = 3; const MAX_TURNS = BOARD_SIZE * BOARD_SIZE;