fix(h5-chat): resolve logged-in blank page from canSubmit TDZ
Memind CI / Test, build, and release guards (push) Failing after 4m28s
Memind CI / Test, build, and release guards (push) Failing after 4m28s
Move canSubmit above sendButtonLabel so authenticated ChatPanel render no longer throws before initialization. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -521,6 +521,7 @@ export function ChatPanel({
|
|||||||
: chatState === 'waiting'
|
: chatState === 'waiting'
|
||||||
? '请求已提交…'
|
? '请求已提交…'
|
||||||
: null;
|
: null;
|
||||||
|
const canSubmit = input.trim() || pendingImages.length > 0 || pendingFiles.length > 0;
|
||||||
const sendButtonLabel =
|
const sendButtonLabel =
|
||||||
uploadingImage || uploadingFile
|
uploadingImage || uploadingFile
|
||||||
? '上传中…'
|
? '上传中…'
|
||||||
@@ -579,7 +580,6 @@ export function ChatPanel({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const voiceDisabled = inputBlocked || uploadingImage || uploadingFile;
|
const voiceDisabled = inputBlocked || uploadingImage || uploadingFile;
|
||||||
const canSubmit = input.trim() || pendingImages.length > 0 || pendingFiles.length > 0;
|
|
||||||
const uploadDisabled = !canUpload || busy || uploadingImage || uploadingFile || offlineBlocked || !!pendingTool;
|
const uploadDisabled = !canUpload || busy || uploadingImage || uploadingFile || offlineBlocked || !!pendingTool;
|
||||||
|
|
||||||
const revokePendingImage = (item: PendingChatImage) => {
|
const revokePendingImage = (item: PendingChatImage) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user