ai
This commit is contained in:
@@ -2520,21 +2520,8 @@ const AIChatPage: React.FC = () => {
|
||||
setCurrentMedia([...currentMedia, ...newMedia]);
|
||||
message.success(`成功添加${items.length}个历史记录`);
|
||||
}}
|
||||
onPortraitSelect={async (items) => {
|
||||
const files: File[] = [];
|
||||
for (const item of items) {
|
||||
try {
|
||||
const response = await fetch(item.avatar);
|
||||
const blob = await response.blob();
|
||||
const file = new File([blob], item.name, { type: blob.type });
|
||||
files.push(file);
|
||||
} catch {
|
||||
message.error(`图片${item.name}下载失败`);
|
||||
}
|
||||
}
|
||||
if (files.length > 0) {
|
||||
await handleBatchUpload(files);
|
||||
}
|
||||
onPortraitSelect={(items) => {
|
||||
handlePrivatePortraitAssetsSelected(items as any);
|
||||
}}
|
||||
uploading={uploading}
|
||||
tooltipTitle={mediaType === 'image'
|
||||
@@ -2588,7 +2575,7 @@ const AIChatPage: React.FC = () => {
|
||||
</div>
|
||||
</UploadSelector>
|
||||
)}
|
||||
{mediaType === 'video' && currentMedia.length === 0 && (
|
||||
{/* {mediaType === 'video' && currentMedia.length === 0 && (
|
||||
<Button
|
||||
size="small"
|
||||
onClick={() => setPrivateAssetPickerOpen(true)}
|
||||
@@ -2596,7 +2583,7 @@ const AIChatPage: React.FC = () => {
|
||||
>
|
||||
真人素材库
|
||||
</Button>
|
||||
)}
|
||||
)} */}
|
||||
|
||||
{/* 层叠附件展示 - 鼠标移入向右排列展开 */}
|
||||
{currentMedia.length > 0 && (
|
||||
@@ -2713,21 +2700,8 @@ const AIChatPage: React.FC = () => {
|
||||
setCurrentMedia([...currentMedia, ...newMedia]);
|
||||
message.success(`成功添加${items.length}个历史记录`);
|
||||
}}
|
||||
onPortraitSelect={async (items) => {
|
||||
const files: File[] = [];
|
||||
for (const item of items) {
|
||||
try {
|
||||
const response = await fetch(item.avatar);
|
||||
const blob = await response.blob();
|
||||
const file = new File([blob], item.name, { type: blob.type });
|
||||
files.push(file);
|
||||
} catch {
|
||||
message.error(`图片${item.name}下载失败`);
|
||||
}
|
||||
}
|
||||
if (files.length > 0) {
|
||||
await handleBatchUpload(files);
|
||||
}
|
||||
onPortraitSelect={(items) => {
|
||||
handlePrivatePortraitAssetsSelected(items as any);
|
||||
}}
|
||||
uploading={uploading}
|
||||
tooltipTitle={mediaType === 'image'
|
||||
@@ -2768,7 +2742,7 @@ const AIChatPage: React.FC = () => {
|
||||
</div>
|
||||
</UploadSelector>
|
||||
)}
|
||||
{mediaType === 'video' && currentMedia.length > 0 && (
|
||||
{/* {mediaType === 'video' && currentMedia.length > 0 && (
|
||||
<Tooltip title="选择真人素材库">
|
||||
<div
|
||||
onClick={(e) => { e.stopPropagation(); setPrivateAssetPickerOpen(true); }}
|
||||
@@ -2795,7 +2769,7 @@ const AIChatPage: React.FC = () => {
|
||||
真
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
)} */}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -1838,17 +1838,18 @@ const GeneratePage: React.FC = () => {
|
||||
});
|
||||
message.success(`成功添加${items.length}个历史记录`);
|
||||
}}
|
||||
onPortraitSelect={async (items) => {
|
||||
for (const item of items) {
|
||||
try {
|
||||
const response = await fetch(item.avatar);
|
||||
const blob = await response.blob();
|
||||
const file = new File([blob], item.name, { type: blob.type });
|
||||
await handlePasteUpload(file);
|
||||
} catch {
|
||||
message.error(`图片${item.name}下载失败`);
|
||||
}
|
||||
}
|
||||
onPortraitSelect={(items) => {
|
||||
items.forEach((item: any) => {
|
||||
setReferences(prev => [...prev, {
|
||||
url: item.previewUrl || '',
|
||||
type: 'image',
|
||||
name: item.name || '真人素材',
|
||||
source: 'private_portrait_asset',
|
||||
private_asset_id: item.id,
|
||||
label: '',
|
||||
}]);
|
||||
});
|
||||
message.success(`已添加 ${items.length} 个真人素材参考`);
|
||||
}}
|
||||
uploading={uploading}
|
||||
tooltipTitle={`参考内容(${references.length}/10)`}
|
||||
|
||||
@@ -295,9 +295,8 @@
|
||||
|
||||
.login-code-btn {
|
||||
height: 48px !important;
|
||||
border-radius: 0 10px 10px 0 !important;
|
||||
border-radius: 10 !important;
|
||||
border: 1.5px solid #e2e8f0 !important;
|
||||
border-left: none !important;
|
||||
font-weight: 600 !important;
|
||||
min-width: 100px !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user