fix: couldn't edit text when sent file-only message (#6930)

This commit is contained in:
Wang Jiyuan 2025-06-07 00:19:21 +08:00 committed by GitHub
parent 7f12c2f8b8
commit d3da4f4623
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -129,7 +129,8 @@ export function getUserMessage({
const blocks: MessageBlock[] = [] const blocks: MessageBlock[] = []
const blockIds: string[] = [] const blockIds: string[] = []
if (content?.trim()) { // 内容为空也应该创建空文本块
if (content !== undefined) {
// Pass messageId when creating blocks // Pass messageId when creating blocks
const textBlock = createMainTextBlock(messageId, content, { const textBlock = createMainTextBlock(messageId, content, {
status: MessageBlockStatus.SUCCESS, status: MessageBlockStatus.SUCCESS,