xiaozuoassistant 0.2.35 → 0.2.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -105,7 +105,9 @@ export class FeishuChannel extends BaseChannel {
|
|
|
105
105
|
// Silently ignore to prevent "[warn]: no im.message.message_read_v1 handle"
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
|
-
|
|
108
|
+
// 启动时不要阻塞等待,允许它在后台进行连接
|
|
109
|
+
// 这样即使某一个 bot 连接超时,也不会阻塞其他 bot 的启动
|
|
110
|
+
wsClient.start({
|
|
109
111
|
eventDispatcher: eventDispatcher
|
|
110
112
|
}).catch(e => {
|
|
111
113
|
console.error(`[Feishu-${botName}] WSClient start threw an error:`, e);
|
|
@@ -93,6 +93,23 @@ export class VectorMemory {
|
|
|
93
93
|
}
|
|
94
94
|
else {
|
|
95
95
|
console.warn(`[VectorMemory] Validation search encountered a non-dimension error:`, err);
|
|
96
|
+
// 添加兜底重试:如果因为空表或者其他 LanceDB 的内部状态错误导致验证查询失败,
|
|
97
|
+
// 为了防止后续增删改查报错,我们直接抛弃这个坏掉的表,重新建!
|
|
98
|
+
try {
|
|
99
|
+
await this.db.dropTable('memories');
|
|
100
|
+
console.log(`[VectorMemory] Dropped potentially corrupted table due to unhandled error.`);
|
|
101
|
+
const dummyData = [{
|
|
102
|
+
id: 'init',
|
|
103
|
+
text: 'init',
|
|
104
|
+
vector: Array(testVector.length).fill(0),
|
|
105
|
+
metadata: { type: 'recent', timestamp: Date.now(), sessionId: 'init', tags: '' }
|
|
106
|
+
}];
|
|
107
|
+
this.table = await this.db.createTable('memories', dummyData);
|
|
108
|
+
console.log(`[VectorMemory] Recreated table successfully.`);
|
|
109
|
+
}
|
|
110
|
+
catch (dropErr) {
|
|
111
|
+
console.error(`[VectorMemory] Fallback recreation failed. Manual deletion required.`);
|
|
112
|
+
}
|
|
96
113
|
}
|
|
97
114
|
}
|
|
98
115
|
}
|