@vincentbanana/bananacli 0.4.5 → 0.4.6
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/dist/session/store.js +3 -2
- package/package.json +1 -1
package/dist/session/store.js
CHANGED
|
@@ -106,7 +106,8 @@ export class SessionStore {
|
|
|
106
106
|
/** 返回最近一次更新且有内容的会话 id。 */
|
|
107
107
|
async lastActive() {
|
|
108
108
|
const sessions = await this.list();
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
// 必须用「最近更新的会话」,包括刚建好的空会话。
|
|
110
|
+
// 以前写的是「优先找有消息的会话」,结果新建对话后第一次发消息会被悄悄塞进上一个旧对话。
|
|
111
|
+
return sessions[0]?.id ?? null;
|
|
111
112
|
}
|
|
112
113
|
}
|
package/package.json
CHANGED