claude-threads 0.43.0 → 0.44.0
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 +29 -4
- 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.44.0] - 2026-01-07
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Persist platform enabled state** - Platform enabled/disabled toggles (Shift+1-9) now persist across restarts. When you disable a platform, it stays disabled after bot restart.
|
|
14
|
+
|
|
10
15
|
## [0.43.0] - 2026-01-07
|
|
11
16
|
|
|
12
17
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -44525,6 +44525,23 @@ class SessionStore {
|
|
|
44525
44525
|
log4.debug(`Removed sticky post ID for ${platformId}`);
|
|
44526
44526
|
}
|
|
44527
44527
|
}
|
|
44528
|
+
getPlatformEnabledState() {
|
|
44529
|
+
const data = this.loadRaw();
|
|
44530
|
+
return new Map(Object.entries(data.platformEnabledState || {}));
|
|
44531
|
+
}
|
|
44532
|
+
isPlatformEnabled(platformId) {
|
|
44533
|
+
const data = this.loadRaw();
|
|
44534
|
+
return data.platformEnabledState?.[platformId] ?? true;
|
|
44535
|
+
}
|
|
44536
|
+
setPlatformEnabled(platformId, enabled) {
|
|
44537
|
+
const data = this.loadRaw();
|
|
44538
|
+
if (!data.platformEnabledState) {
|
|
44539
|
+
data.platformEnabledState = {};
|
|
44540
|
+
}
|
|
44541
|
+
data.platformEnabledState[platformId] = enabled;
|
|
44542
|
+
this.writeAtomic(data);
|
|
44543
|
+
log4.debug(`Set platform ${platformId} enabled state to ${enabled}`);
|
|
44544
|
+
}
|
|
44528
44545
|
findByThread(platformId, threadId) {
|
|
44529
44546
|
const sessionId = `${platformId}:${threadId}`;
|
|
44530
44547
|
const data = this.loadRaw();
|
|
@@ -64528,6 +64545,7 @@ async function main() {
|
|
|
64528
64545
|
};
|
|
64529
64546
|
let sessionManager = null;
|
|
64530
64547
|
let autoUpdateManager = null;
|
|
64548
|
+
const sessionStore2 = new SessionStore;
|
|
64531
64549
|
const ui = await startUI({
|
|
64532
64550
|
config: {
|
|
64533
64551
|
version: VERSION,
|
|
@@ -64580,6 +64598,7 @@ async function main() {
|
|
|
64580
64598
|
try {
|
|
64581
64599
|
client.prepareForReconnect();
|
|
64582
64600
|
await client.connect();
|
|
64601
|
+
sessionStore2.setPlatformEnabled(platformId, true);
|
|
64583
64602
|
ui.addLog({ level: "info", component: "toggle", message: `\u2713 Platform ${platformId} reconnected` });
|
|
64584
64603
|
await sessionManager?.resumePausedSessionsForPlatform(platformId);
|
|
64585
64604
|
} catch (err) {
|
|
@@ -64590,6 +64609,7 @@ async function main() {
|
|
|
64590
64609
|
ui.addLog({ level: "info", component: "toggle", message: `Disabling platform ${platformId}...` });
|
|
64591
64610
|
await sessionManager?.pauseSessionsForPlatform(platformId);
|
|
64592
64611
|
client.disconnect();
|
|
64612
|
+
sessionStore2.setPlatformEnabled(platformId, false);
|
|
64593
64613
|
ui.setPlatformStatus(platformId, { connected: false });
|
|
64594
64614
|
ui.addLog({ level: "info", component: "toggle", message: `\u2713 Platform ${platformId} disabled` });
|
|
64595
64615
|
}
|
|
@@ -64615,23 +64635,28 @@ async function main() {
|
|
|
64615
64635
|
ui.removeSession(sessionId);
|
|
64616
64636
|
});
|
|
64617
64637
|
const platforms = new Map;
|
|
64638
|
+
const platformEnabledState = sessionStore2.getPlatformEnabledState();
|
|
64618
64639
|
ui.addLog({ level: "debug", component: "init", message: `Initializing ${config.platforms.length} platform(s)` });
|
|
64619
64640
|
for (const platformConfig of config.platforms) {
|
|
64620
64641
|
const typedConfig = platformConfig;
|
|
64621
|
-
|
|
64642
|
+
const isEnabled = platformEnabledState.get(platformConfig.id) ?? true;
|
|
64643
|
+
ui.addLog({ level: "info", component: "init", message: `Creating ${platformConfig.type} platform: ${platformConfig.id}${isEnabled ? "" : " (disabled)"}` });
|
|
64622
64644
|
ui.setPlatformStatus(platformConfig.id, {
|
|
64623
64645
|
displayName: platformConfig.displayName || platformConfig.id,
|
|
64624
64646
|
botName: typedConfig.botName,
|
|
64625
64647
|
url: typedConfig.type === "mattermost" ? typedConfig.url : "slack.com",
|
|
64626
|
-
platformType: typedConfig.type
|
|
64648
|
+
platformType: typedConfig.type,
|
|
64649
|
+
enabled: isEnabled
|
|
64627
64650
|
});
|
|
64628
64651
|
const client = createPlatformClient(platformConfig);
|
|
64629
64652
|
platforms.set(platformConfig.id, client);
|
|
64630
64653
|
session.addPlatform(platformConfig.id, client);
|
|
64631
64654
|
wirePlatformEvents(platformConfig.id, client, session, ui);
|
|
64632
64655
|
}
|
|
64633
|
-
|
|
64634
|
-
|
|
64656
|
+
const enabledPlatforms = Array.from(platforms.entries()).filter(([id]) => platformEnabledState.get(id) ?? true);
|
|
64657
|
+
const disabledCount = platforms.size - enabledPlatforms.length;
|
|
64658
|
+
ui.addLog({ level: "info", component: "init", message: `Connecting ${enabledPlatforms.length} platform(s)...${disabledCount > 0 ? ` (${disabledCount} disabled)` : ""}` });
|
|
64659
|
+
await Promise.all(enabledPlatforms.map(async ([id, client]) => {
|
|
64635
64660
|
ui.addLog({ level: "debug", component: "init", message: `Connecting to ${id}...` });
|
|
64636
64661
|
try {
|
|
64637
64662
|
await client.connect();
|