claude-threads 0.48.7 → 0.48.8
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/CHANGELOG.md +5 -0
- package/dist/index.js +16 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.48.8] - 2026-01-08
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Sessions now persist before update restart** - When `!update now` was triggered, sessions were lost because the bot exited without persisting them. Now sessions are properly saved before restart and resume automatically after the update (#141)
|
|
14
|
+
|
|
10
15
|
## [0.48.7] - 2026-01-08
|
|
11
16
|
|
|
12
17
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -64997,6 +64997,7 @@ class AutoUpdateManager extends EventEmitter9 {
|
|
|
64997
64997
|
this.emit("update:restart", updateInfo.latestVersion);
|
|
64998
64998
|
await this.callbacks.broadcastUpdate((fmt) => `\u2705 ${fmt.formatBold("Update installed")} - restarting now. ${fmt.formatItalic("Sessions will resume automatically.")}`).catch(() => {});
|
|
64999
64999
|
await new Promise((resolve7) => setTimeout(resolve7, 1000));
|
|
65000
|
+
await this.callbacks.prepareForRestart();
|
|
65000
65001
|
log22.info(`\uD83D\uDD04 Restarting for update to v${updateInfo.latestVersion}`);
|
|
65001
65002
|
process.exit(RESTART_EXIT_CODE);
|
|
65002
65003
|
} else {
|
|
@@ -65294,12 +65295,26 @@ async function main() {
|
|
|
65294
65295
|
}
|
|
65295
65296
|
}));
|
|
65296
65297
|
await session.initialize();
|
|
65298
|
+
let isShuttingDown2 = false;
|
|
65297
65299
|
autoUpdateManager = new AutoUpdateManager(config.autoUpdate, {
|
|
65298
65300
|
getSessionActivity: () => session.getActivityInfo(),
|
|
65299
65301
|
getActiveThreadIds: () => session.getActiveThreadIds(),
|
|
65300
65302
|
broadcastUpdate: (msg) => session.broadcastToAll(msg),
|
|
65301
65303
|
postAskMessage: (ids, ver) => session.postUpdateAskMessage(ids, ver),
|
|
65302
|
-
refreshUI: () => session.updateAllStickyMessages()
|
|
65304
|
+
refreshUI: () => session.updateAllStickyMessages(),
|
|
65305
|
+
prepareForRestart: async () => {
|
|
65306
|
+
if (isShuttingDown2)
|
|
65307
|
+
return;
|
|
65308
|
+
isShuttingDown2 = true;
|
|
65309
|
+
ui.setShuttingDown();
|
|
65310
|
+
session.setShuttingDown();
|
|
65311
|
+
await session.updateAllStickyMessages();
|
|
65312
|
+
await session.killAllSessions();
|
|
65313
|
+
autoUpdateManager?.stop();
|
|
65314
|
+
for (const client of platforms.values()) {
|
|
65315
|
+
client.disconnect();
|
|
65316
|
+
}
|
|
65317
|
+
}
|
|
65303
65318
|
});
|
|
65304
65319
|
session.setAutoUpdateManager(autoUpdateManager);
|
|
65305
65320
|
autoUpdateManager.on("update:available", (info) => {
|
|
@@ -65354,7 +65369,6 @@ async function main() {
|
|
|
65354
65369
|
});
|
|
65355
65370
|
autoUpdateManager.start();
|
|
65356
65371
|
ui.setReady();
|
|
65357
|
-
let isShuttingDown2 = false;
|
|
65358
65372
|
const shutdown = async (_signal) => {
|
|
65359
65373
|
if (isShuttingDown2)
|
|
65360
65374
|
return;
|