Enhance file upload process in devlop.py with progress tracking and remote file validation. Add aiType field to weChatGroup and ContractData interfaces for AI type differentiation. Update ChatWindow component to handle AI configuration changes and ensure proper database updates for contact and message management. Implement database versioning to include aiType in chatSessions and contactsUnified tables, with migration logic for existing data. Improve error handling and user feedback during configuration updates.

This commit is contained in:
2025-10-28 16:55:55 +08:00
parent d1c35b480f
commit 0decc34593
9 changed files with 182 additions and 15 deletions

View File

@@ -91,6 +91,7 @@ export class MessageManager {
avatar: friend.avatar || "",
content: (friend as any).content || "",
lastUpdateTime: friend.lastUpdateTime || new Date().toISOString(),
aiType: (friend as any).aiType ?? 0, // AI类型默认为0普通
config: {
unreadCount: friend.config?.unreadCount || 0,
top: (friend.config as any)?.top || false,
@@ -123,6 +124,7 @@ export class MessageManager {
avatar: group.chatroomAvatar || "",
content: (group as any).content || "",
lastUpdateTime: (group as any).lastUpdateTime || new Date().toISOString(),
aiType: (group as any).aiType ?? 0, // AI类型默认为0普通
config: {
unreadCount: (group.config as any)?.unreadCount || 0,
top: (group.config as any)?.top || false,
@@ -195,6 +197,7 @@ export class MessageManager {
"conRemark",
"avatar",
"wechatAccountId", // 添加wechatAccountId比较
"aiType", // 添加aiType比较
];
for (const field of fieldsToCompare) {