myagent-ai 1.47.14 → 1.47.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myagent-ai",
3
- "version": "1.47.14",
3
+ "version": "1.47.15",
4
4
  "description": "本地桌面端执行型AI助手 - Open Interpreter 风格 | Local Desktop Execution-Oriented AI Assistant",
5
5
  "main": "main.py",
6
6
  "bin": {
@@ -1374,8 +1374,11 @@ async function sendMessage(opts) {
1374
1374
 
1375
1375
  // [v1.23.35] Create session if needed — 使用 UUID 防止 ID 重复/乱串
1376
1376
  let sessionId = state.activeSessionId;
1377
- // [v1.25.5] 如果 activeSessionId 为空,等待 loadSessions 完成确保会话绑定正确
1378
- if ((!sessionId || sessionId === '__new__') && typeof loadSessions === 'function' && state.activeAgent) {
1377
+ // [v1.47.14] 修复:新对话状态下不调用 loadSessions()!
1378
+ // loadSessions() 会通过 _pendingSessionRestore URL 参数 auto-select
1379
+ // 历史会话,导致用户在"新对话"页面发消息时被跳转到历史会话。
1380
+ // 只有 activeSessionId 完全为空(不是 '__new__')时才需要等待 loadSessions。
1381
+ if (!sessionId && sessionId !== '__new__' && typeof loadSessions === 'function' && state.activeAgent) {
1379
1382
  console.log('[sendMessage] activeSessionId is empty, waiting for loadSessions...');
1380
1383
  await loadSessions();
1381
1384
  sessionId = state.activeSessionId;