过滤 canonical 草稿中的空白输入 part

在统一 user item 转换入口移除纯空白 input_text,覆盖恢复草稿和所有提交路径。
This commit is contained in:
2026-09-15 17:54:00 +08:00
parent 3c7b02b9f8
commit 35733f0e33
@@ -120,7 +120,9 @@ export function chatComposerDraftToDirectCodexUserItem(
): DirectCodexUserItem {
let content: DirectCodexUserContentPart[];
if (draft.content?.length) {
content = draft.content;
content = draft.content.filter(
(part) => part.type !== 'input_text' || part.text.trim().length > 0,
);
} else if (draft.references.length > 0) {
content = [
...(draft.text