+ {/* Workspace header */}
+
+
+
+ {/* Conversation thread */}
+
+
+
+ {task.thread.map((turn, i) => (
+ answerFollowup(task.id, qid, oid)}
+ />
+ ))}
+
+
+ {/* Reply box */}
+
+
+
+ {/* Task card sidebar */}
+ {task.card ?
: null}
+
+
+ )
+}
+
+function ThreadTurn({
+ turn,
+ onAnswer,
+}: {
+ turn: ChatTurn
+ onAnswer: (questionId: string, optionId: string) => void
+}) {
+ if (turn.kind === 'user') {
+ return (
+
+
+
+ H
+
+
+ {turn.text}
+
+
+ {turn.followups && turn.followups.length > 0 ? (
+
+ {turn.followups.map((q, idx) => (
+
+ ))}
+
+ ) : null}
+
+ )
+}
+
+function FollowupBlock({
+ index,
+ q,
+ onAnswer,
+}: {
+ index: number
+ q: FollowupQuestion
+ onAnswer: (questionId: string, optionId: string) => void
+}) {
+ return (
+
+
+ {index}.
+ {q.question}
+
+
+ {q.options.map((opt) => {
+ const picked = q.answer === opt.id
+ return (
+
+ )
+ })}
+
+
+ )
+}
+
+function TaskCardPanel({ task }: { task: HeicodeTask }) {
+ const t = useTranslation()
+ if (!task.card) return null
+ const { goal, scope, generated_artifacts, manager_actions } = task.card
+ return (
+