diff --git a/components/reasoning-workspace.jsx b/components/reasoning-workspace.jsx index b39e03b..46519cc 100644 --- a/components/reasoning-workspace.jsx +++ b/components/reasoning-workspace.jsx @@ -148,6 +148,99 @@ function useSessionPersistence() { return { saveSession, loadSession, clearSession, sessionReady: true }; } +// ── Shared focused-question body (extracted from OpenQuestionsPanel) ── + +function FocusedQuestionBody({ + nodeId, + isFocused, + hasCompletedInvestigation: hasCompleted, + focused, + formulationStep, + formulateMsg, + processingStep, + deconstructMsg, + focusedAnswer, + handleDeconstructSubmit, + retryFormulation, + setFocusedAnswer, + setSelectedPresentationItemId, + setFocusedPresentationItemId, + setDoneForNowIds, + setFollowUpQuestion, +}) { + return ( + <> + {isFocused && (() => { + const hasContent = focused?.question?.trim() || formulationStep === "active" || processingStep === "active" || focused?.error; + + if (!hasContent) return null; + + return ( +
+
+ {focused?.question?.trim() ? ( +
+

Question

+

{focused.question}

+
+ ) : formulationStep === "active" ? ( +

{formulateMsg}

+ ) : null} + + {focused?.question?.trim() && processingStep !== "active" && focused.status === "formulated" && ( +
+ +