This commit is contained in:
2026-07-02 19:03:17 +08:00
parent 488c98617d
commit 1dd356fd9d
3 changed files with 515 additions and 4 deletions
+13 -3
View File
@@ -816,7 +816,17 @@ const AIChatPage: React.FC = () => {
mediaReferences = undefined;
}
} else {
mediaReferences = currentMedia.length > 0 ? [...currentMedia] : undefined;
if (currentMedia.length > 0) {
mediaReferences = currentMedia.map((m) => {
if (m.type === 'image') {
const { duration, ...rest } = m;
return rest;
}
return m;
});
} else {
mediaReferences = undefined;
}
}
// 创建用户消息对象
@@ -2008,7 +2018,7 @@ const AIChatPage: React.FC = () => {
{/* 上方输入布局 */}
<div style={{ display: 'flex', gap: isFirstLastFrameComposer ? 18 : 18, alignItems: 'flex-start', marginBottom: 14 }}>
{/* 左侧附件区域 */}
<div style={{ width: isFirstLastFrameComposer ? 240 : 128, minWidth: isFirstLastFrameComposer ? 240 : 128, display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'flex-start', paddingTop: 2 }}>
<div style={{ width: isFirstLastFrameComposer ? 180 : 128, minWidth: isFirstLastFrameComposer ? 180 : 128, display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'flex-start', paddingTop: 2 }}>
{/* 首尾帧模式 */}
{mediaType === 'video' && referenceMode === 'first_last_frame' ? (
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'stretch', gap: 12, width: '100%', height: 100 }}>
@@ -2373,7 +2383,7 @@ const AIChatPage: React.FC = () => {
onKeyDown={handleInputKeyDown}
onKeyPress={handleKeyPress}
placeholder={composerPlaceholder}
autoSize={{ minRows: inputValue.trim() ? 2 : 3, maxRows: 6 }}
autoSize={{ minRows: 3, maxRows: 6 }}
style={{
flex: 1,
width: '100%',