Interpret bounded Truthtrance fact questions
Verify and publish checkpoint container / container (push) Successful in 10m38s

This commit is contained in:
Quintine committed 2026-10-29 04:31:15 +11:00
1 parent 88c0ab1547
commit 8ae275f598
16 files changed
+431 -31

No files matched your search

+16 -7
View File
@@ -64,6 +64,7 @@ import { useId, useState } from 'react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { CHEAP_HERO_TRAITOR } from '@/game/traitors';
import { parseFreeformFactV1 } from '@/game/truthtrance-freeform-facts';
import {
truthQuestionText,
type TruthFact,
@@ -352,6 +353,9 @@ export function Truthtrance({
{w.question && (
<blockquote>
<p>{truthQuestionText(w.question, leaderName, locationName, name)}</p>
{w.question.kind === 'freeform' && w.question.interpreted && (
<p className="fine">Checked as: {truthQuestionText({ kind: 'fact', target: w.question.target, fact: w.question.interpreted.fact }, leaderName, locationName, name)}</p>
)}
<p className="fine">Asked of {name(w.question.target)}</p>
</blockquote>
)}
@@ -556,7 +560,7 @@ export function Truthtrance({
elements remain yours to choose.
</p>
</>
) : w.question!.kind === 'fact' ? (
) : w.question!.kind === 'fact' || w.question!.kind === 'freeform' && w.question!.interpreted ? (
<>
<p className="notice">
Your current game information establishes:{' '}
@@ -943,12 +947,17 @@ export function Truthtrance({
placeholder="Will you ship at least six forces to Carthag this turn?"
/>
</label>
<p className="notice">
Freeform answers rely on the players. Automatic checks for
arbitrary promises are unfinished. AI can answer structured
fact, supported shipment and battle-plan questions; it
cannot yet interpret freeform questions.
</p>
{scope === 'fact' && parseFreeformFactV1(text) ? (
<p className="notice" aria-label="Recognized freeform question">
This will be checked as: {truthQuestionText({ kind: 'fact', target, fact: parseFreeformFactV1(text)! }, leaderName, locationName, name)}
</p>
) : (
<p className="notice">
This wording is not automatically interpreted. Players must answer
facts truthfully; AI will answer I don’t know. Automatic checks
for arbitrary promises remain unfinished.
</p>
)}
</>
)}
{!['fact', 'battlePlan', 'futureBattleLeader', 'shipment'].includes(kind) && button(