chore: remove unused api

This commit is contained in:
hypercross 2026-04-07 11:26:43 +08:00
parent 6352977791
commit 83658c9898
2 changed files with 1 additions and 6 deletions

View File

@ -16,7 +16,6 @@ export interface IGameContext<TState extends Record<string, unknown> = {} > {
run<T>(input: string): Promise<CommandResult<T>>;
runParsed<T>(command: Command): Promise<CommandResult<T>>;
prompt: <TResult,TArgs extends any[]=any[]>(def: PromptDef<TArgs>, validator: PromptValidator<TResult,TArgs>, currentPlayer?: string | null) => Promise<TResult>;
addInterruption(promise: Promise<void>): void;
// test only
_state: MutableSignal<TState>;
@ -50,9 +49,6 @@ export function createGameContext<TState extends Record<string, unknown> = {} >(
prompt(def, validator, currentPlayer) {
return commands.prompt(def.schema, validator, currentPlayer);
},
addInterruption(promise) {
state.addInterruption(promise);
},
_state: state,
_commands: commands,

View File

@ -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;