@yeaft/webchat-agent 0.0.184 → 0.0.185
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.
- package/crew.js +3 -3
- package/package.json +1 -1
package/crew.js
CHANGED
|
@@ -414,14 +414,14 @@ export async function handleCheckCrewExists(msg) {
|
|
|
414
414
|
try {
|
|
415
415
|
const stat = await fs.stat(crewDir);
|
|
416
416
|
if (stat.isDirectory()) {
|
|
417
|
-
// 尝试读取
|
|
417
|
+
// 尝试读取 session.json 获取 session 信息
|
|
418
418
|
let sessionInfo = null;
|
|
419
419
|
try {
|
|
420
|
-
const sessionPath = join(crewDir, '
|
|
420
|
+
const sessionPath = join(crewDir, 'session.json');
|
|
421
421
|
const data = await fs.readFile(sessionPath, 'utf-8');
|
|
422
422
|
sessionInfo = JSON.parse(data);
|
|
423
423
|
} catch {
|
|
424
|
-
//
|
|
424
|
+
// session.json 可能不存在,不影响
|
|
425
425
|
}
|
|
426
426
|
ctx.sendToServer({
|
|
427
427
|
type: 'crew_exists_result',
|