chore: bump version to 0.3.20 + metona-toast 迁移至 @metona-team 私有源

This commit is contained in:
2026-07-23 21:42:14 +08:00
parent 56bd3a46d7
commit 983c52b0e4
16 changed files with 141 additions and 78 deletions
+3 -3
View File
@@ -108,7 +108,7 @@ export function ChatInput(): React.JSX.Element {
// v0.3.0: 用 Toast 提示用户 DeepSeek 不支持图片
const skipped = fileArray.length - filtered.length;
// v0.3.0 修复:记录 Toast 加载失败错误到控制台,而非静默吞掉
import('metona-toast').then((mod) => {
import('@metona-team/metona-toast').then((mod) => {
mod.default.warning(`DeepSeek 不支持图片,已自动跳过 ${skipped} 个图片文件`);
}).catch((err) => {
console.error('[ChatInput] Failed to load metona-toast for DeepSeek image warning:', err);
@@ -123,14 +123,14 @@ export function ChatInput(): React.JSX.Element {
(r): r is PromiseFulfilledResult<Attachment> => r.status === 'fulfilled',
).map((r) => r.value);
if (successful.length === 0) {
import('metona-toast').then((mod) => {
import('@metona-team/metona-toast').then((mod) => {
mod.default.error('文件读取失败,请检查文件是否损坏或被锁定');
}).catch(() => {});
return;
}
if (successful.length < filtered.length) {
const failedCount = filtered.length - successful.length;
import('metona-toast').then((mod) => {
import('@metona-team/metona-toast').then((mod) => {
mod.default.warning(`${failedCount} 个文件读取失败,已跳过`);
}).catch(() => {});
}