diff --git a/apps/web/components/cards.tsx b/apps/web/components/cards.tsx index 47eb7afe..148c1594 100644 --- a/apps/web/components/cards.tsx +++ b/apps/web/components/cards.tsx @@ -1,7 +1,7 @@ // Domain cards shared by pages: agent questions, runners, project list. import Link from "next/link"; import { BellRing, CircleCheck, CircleHelp, FileCheck, Hourglass, Play, RotateCcw, Send, ShieldQuestion, Square, SquareTerminal } from "lucide-react"; -import { questionState, type Project, type Question, type SessionView, type StepView } from "@peppa/core"; +import { questionState, questionType, type Project, type Question, type SessionView, type StepView } from "@peppa/core"; import { db } from "@/lib/db"; import { SubscriptionName } from "@/components/SubscriptionName"; import { answerQuestion, messageSession, resumeTaskSession, stopTaskSession } from "@/app/(app)/actions"; @@ -37,6 +37,7 @@ export async function QuestionCard({ q, taskKey, taskStatus, back, compact = fal const t = await getT(); const review = q.kind === "attention" && taskStatus === "review"; const answered = !!q.answeredAt; + const notice = questionType(q, taskStatus) === null && q.taskId == null && q.sessionId == null; // PEP-149: a factory message with answers to choose from is a question for the person. const k = KIND[q.kind === "attention" && !review && q.options?.length ? "question" : q.kind]; const Icon = review ? CircleCheck : k.icon; @@ -71,12 +72,13 @@ export async function QuestionCard({ q, taskKey, taskStatus, back, compact = fal
{t("Повторов: {n} · первое сообщение {ago}", { n: state.repeats, ago: ago(q.createdAt, t) })}
)} + {/* PEP-149: a notice about the product as a whole (released, backlog is empty) asks nothing — no answer form. */} {answered ? (
{q.answeredVia === "system" ?