Questions about an analysis or forecast, answered by the model that wrote it
- 3 questions in every package, +5 questions add-on (1 000 Ft); question units, refund on failure - The answer sees the chart data, the analysis and earlier questions; at most 250 words - Editable question prompt (Promptok → Kérdés-válasz); admins regenerate answers - Package texts and FAQ updated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -8,6 +8,7 @@ import type { Analysis } from "@/lib/types";
|
||||
|
||||
import { AI_SHORT } from "./AiNote";
|
||||
import { AnalysisLoading } from "./AnalysisLoading";
|
||||
import { AnalysisQuestions } from "./AnalysisQuestions";
|
||||
import { PackageChooser } from "./PackageCards";
|
||||
import { RegenerateButton } from "./RegenerateButton";
|
||||
import { AnalysisView } from "./AnalysisView";
|
||||
@@ -88,6 +89,7 @@ export function DetailedAnalysis({
|
||||
isAdmin,
|
||||
canPay,
|
||||
note,
|
||||
questionsLeft,
|
||||
}: {
|
||||
target: AnalysisTarget;
|
||||
initial: Analysis | null;
|
||||
@@ -97,6 +99,8 @@ export function DetailedAnalysis({
|
||||
canPay: boolean;
|
||||
/** Shown above a finished analysis (e.g. who is the first and the second person). */
|
||||
note?: string;
|
||||
/** Questions left; given where questions can be asked (natal analysis, forecast). */
|
||||
questionsLeft?: number;
|
||||
}) {
|
||||
const [analysis, setAnalysis] = useState<Analysis | null>(initial);
|
||||
const [step, setStep] = useState<Step>("offer");
|
||||
@@ -146,9 +150,20 @@ export function DetailedAnalysis({
|
||||
return (
|
||||
<section className="analysis-card" aria-label={t.eyebrow}>
|
||||
<span className="eyebrow">{t.eyebrow}</span>
|
||||
{isAdmin && <RegenerateButton analysisId={analysis.id} onStarted={setAnalysis} />}
|
||||
{isAdmin && (
|
||||
<RegenerateButton<Analysis> url={`/admin/analyses/${analysis.id}/regenerate`} onStarted={setAnalysis} />
|
||||
)}
|
||||
{note && <p className="hint">{note}</p>}
|
||||
<AnalysisView content={analysis.content} kind={target.kind} />
|
||||
{questionsLeft !== undefined && target.kind !== "synastry" && (
|
||||
<AnalysisQuestions
|
||||
analysisId={analysis.id}
|
||||
left={questionsLeft}
|
||||
isAdmin={isAdmin}
|
||||
canPay={canPay}
|
||||
forecast={target.kind === "forecast"}
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user