fix(web): 会话列表合同跟着外壳搬家,无活跃会话不再静默吞发送
四条源码合同改到 (app)/layout 与注册载荷两端对断。列表只剩校正会话时普通输入框锁定,发送会打开校正或给出提示。
This commit is contained in:
@@ -20,7 +20,7 @@ import {
|
||||
resolveRectificationEntryAction,
|
||||
} from "@/lib/rectification-entry";
|
||||
import {
|
||||
dropRectificationStoredPending,
|
||||
composerLocksAsRectification, dropRectificationStoredPending,
|
||||
ordinaryComposerPlaceholder,
|
||||
rectificationOrdinaryComposerReopen,
|
||||
} from "@/lib/rectification-session-composer-guard";
|
||||
@@ -391,7 +391,7 @@ export default function Home() {
|
||||
|
||||
const activeSession = sessions.find((session) => session.id === activeSessionId)
|
||||
?? sessions.find((session) => session.sessionType !== "birth_time_rectification");
|
||||
const activeRectificationSession = activeSession?.sessionType === "birth_time_rectification";
|
||||
const activeRectificationSession = composerLocksAsRectification(activeSession, sessions);
|
||||
const rectificationSurfaceOpen = Boolean(activeRectificationSession && activeSession && activeSession.id === rectificationSessionId);
|
||||
const rectificationComposerLocked = Boolean(activeRectificationSession && !rectificationSurfaceOpen);
|
||||
const rectificationComposerReopen = rectificationOrdinaryComposerReopen({ activeRectificationSession, error: rectificationError, errorSessionId: rectificationErrorSessionId, sessionId: activeSession?.id });
|
||||
@@ -1745,7 +1745,7 @@ export default function Home() {
|
||||
{jumpToLatestVisible && (
|
||||
<JumpToLatestButton onClick={conversationAnchor.anchorToLatest} />
|
||||
)}
|
||||
{rectificationComposerReopen && activeSession ? <RectificationComposerReopen message={rectificationErrorMessage} onReopen={() => void reopenRectificationSession(activeSession.id)} /> : null}
|
||||
{rectificationComposerReopen ? <RectificationComposerReopen message={rectificationErrorMessage} onReopen={() => void reopenRectificationSession(activeSession?.id || rectificationErrorSessionId || "")} /> : null}
|
||||
<ChatComposer
|
||||
inputRef={composerInput}
|
||||
inputLabel={!profileComplete && onboardingStep === "name" ? "输入你的称呼" : "输入你的问题"}
|
||||
|
||||
Reference in New Issue
Block a user