fix: 修复前台4项问题(MCP列举/微信技能上限/Word资产栏/技能MCP反馈) + 同步容器live状态
- #549 平台MCP列举: 注入全量已启用MCP清单, AI不再凭空编造 - #550 微信Bot技能自动发现上限 15->300 - #551 知识库Word文档同步资产后Word栏可见 + 双向删除同步(assets/knowledge级联软删) - #552 对话反馈实际使用的技能/MCP(used_mcp字段), 含历史消息序列化 - 同步容器内其他未提交live改动(im_bot_platform/TokenDashboard/WechatBot/ChatPage)
This commit is contained in:
1 parent
7fb7c07f57
commit
1578d68f95
10 files changed
+1927
-1719
No files matched your search
@@ -54,6 +54,7 @@ function mapFileTypeToLabel(ft: string): string {
|
||||
const mapping: Record<string, string> = {
|
||||
pdf: 'pdf', docx: 'word', doc: 'word', xlsx: 'excel', xls: 'excel',
|
||||
pptx: 'ppt', ppt: 'ppt', csv: 'txt', md: 'md', txt: 'txt',
|
||||
word: 'word', excel: 'excel',
|
||||
};
|
||||
return mapping[ft] || 'other';
|
||||
}
|
||||
@@ -399,7 +400,7 @@ const AssetsPage: React.FC = () => {
|
||||
const VALID_CATEGORIES = ['file', 'novel', 'image', 'video', 'audio', 'custom', 'other'];
|
||||
const normalizeAsset = (item: any): Asset => {
|
||||
const rawCat = item.category;
|
||||
const ft = item.fileType || item.file_type || 'other';
|
||||
const ft = mapFileTypeToLabel(item.fileType || item.file_type || 'other');
|
||||
let category = rawCat;
|
||||
if (!VALID_CATEGORIES.includes(category)) {
|
||||
category = (ft && ft !== 'other') ? 'file' : 'other';
|
||||
|
||||
Reference in new issue
Block a user