Browse Source

fix(stage-c): add error catch to onDone IIFE and disable input during plan dialog

Mochocyang 2 months ago
parent
commit
57d6190d7e
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/components/chat/chat-panel.tsx

+ 2 - 2
src/components/chat/chat-panel.tsx

@@ -1095,7 +1095,7 @@ export function ChatPanel() {
                   followupText = buildPlanConfirmMessage(action.modify)
                 }
                 await handleSendRef.current(followupText, [])
-              })()
+              })().catch((err) => console.error("[Stage C] 续写失败:", err))
             },
             onError: markError,
           },
@@ -1701,7 +1701,7 @@ export function ChatPanel() {
             <ReferenceInput
               value={referenceText}
               tokens={currentTokens}
-              disabled={isStreaming}
+              disabled={isStreaming || pendingChapterPlan.open}
               isStreaming={isStreaming}
               onStop={handleStop}
               rightControls={