feat(play): always generate new scene for freeform text input + enhance insert-beat

User feedback: custom interactions rarely produce new story content because
the classifier heavily biased toward insert-beat (single reaction, no scene
change). Three changes to fix this:

1. Freeform text input now always triggers a full scene generation (skips
   the classify step entirely) — users who type expect the story to advance.

2. Vision (background click) classifier de-biased: prompt now favors
   change-scene when uncertain, and the code fallback flipped from
   insert-beat to change-scene. insert-beat narrowed to pure observation.

3. Insert-beat enhanced: generates 1-3 beats (was 1) with follow-up
   choices (was: loop back to original beat). Even when vision classifies
   as insert-beat, the player gets richer content and new options.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
yuanzonghao
2026-06-24 18:36:35 +08:00
parent ae4d9f8873
commit 6f8125570a
6 changed files with 160 additions and 150 deletions
+11
View File
@@ -695,8 +695,19 @@ export type InsertBeatPartial = {
lineDelivery?: string;
};
/** Multi-beat response: 1-3 beats + optional follow-up choices. */
export type InsertBeatMulti = {
beats: InsertBeatPartial[];
/** Follow-up choices shown after the last beat (max 2). */
choices?: { label: string; effect: string }[];
};
export type InsertBeatResponse = {
partial: InsertBeatPartial;
/** Additional beats beyond the first (for richer insert-beat interactions). */
extraBeats?: InsertBeatPartial[];
/** Follow-up choices shown after the last inserted beat. */
followUpChoices?: { label: string; effect: string }[];
characters: Character[];
};