feat(parser): return ambiguous variant when noun matches multiple aliases
Replaces the previous behavior of returning unknown-noun. The dispatcher will use this in the next commit to prompt the player to disambiguate. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,7 @@ export type ParsedCommand =
|
||||
| { kind: 'verb-only'; verb: Verb | 'look' | 'inventory' | 'wait' }
|
||||
| { kind: 'verb-target'; verb: Verb; target: NounRef }
|
||||
| { kind: 'verb-target-prep'; verb: Verb; target: NounRef; preposition: string; indirect: NounRef }
|
||||
| { kind: 'ambiguous'; verb: Verb; rawNoun: string; candidates: string[] }
|
||||
| { kind: 'go'; direction: Direction }
|
||||
| { kind: 'meta'; verb: MetaVerb }
|
||||
| { kind: 'disambiguation'; chosen: string }
|
||||
|
||||
Reference in New Issue
Block a user