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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user