claude-threads 1.4.8 → 1.5.1
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 +10 -0
- package/dist/index.js +32 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.5.1] - 2026-03-09
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **Crash when stdin is not a TTY** - Bot now falls back to headless mode when stdin is not a TTY (e.g., when run via daemon in a non-interactive shell) (#287)
|
|
12
|
+
|
|
13
|
+
## [1.5.0] - 2026-03-08
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **Customizable sticky message** - New `stickyMessage` config with `description` and `footer` fields to personalize the pinned channel message (#262, #286)
|
|
17
|
+
|
|
8
18
|
## [1.4.8] - 2026-03-08
|
|
9
19
|
|
|
10
20
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -60927,6 +60927,18 @@ function formatTopicFromPrompt(prompt, formatter) {
|
|
|
60927
60927
|
}
|
|
60928
60928
|
return cleaned || formatter.formatItalic("No topic");
|
|
60929
60929
|
}
|
|
60930
|
+
function appendDescription(lines, config) {
|
|
60931
|
+
if (config.description) {
|
|
60932
|
+
lines.push(config.description);
|
|
60933
|
+
lines.push("");
|
|
60934
|
+
}
|
|
60935
|
+
}
|
|
60936
|
+
function appendFooter(lines, config) {
|
|
60937
|
+
if (config.footer) {
|
|
60938
|
+
lines.push("");
|
|
60939
|
+
lines.push(config.footer);
|
|
60940
|
+
}
|
|
60941
|
+
}
|
|
60930
60942
|
async function buildStickyMessage(sessions, platformId, config, formatter, getThreadLink) {
|
|
60931
60943
|
if (isShuttingDown) {
|
|
60932
60944
|
const lines2 = [
|
|
@@ -60965,9 +60977,10 @@ async function buildStickyMessage(sessions, platformId, config, formatter, getTh
|
|
|
60965
60977
|
statusBar,
|
|
60966
60978
|
"",
|
|
60967
60979
|
formatter.formatBold("Active Claude Threads"),
|
|
60968
|
-
""
|
|
60969
|
-
formatter.formatItalic("No active sessions")
|
|
60980
|
+
""
|
|
60970
60981
|
];
|
|
60982
|
+
appendDescription(lines2, config);
|
|
60983
|
+
lines2.push(formatter.formatItalic("No active sessions"));
|
|
60971
60984
|
if (historySessions.length > 0) {
|
|
60972
60985
|
lines2.push("");
|
|
60973
60986
|
lines2.push(formatter.formatBold(`Recent (${historySessions.length})`));
|
|
@@ -60982,6 +60995,7 @@ async function buildStickyMessage(sessions, platformId, config, formatter, getTh
|
|
|
60982
60995
|
lines2.push("");
|
|
60983
60996
|
lines2.push(`✨ ${formatter.formatBold("What's new:")} ${whatsNew2}`);
|
|
60984
60997
|
}
|
|
60998
|
+
appendFooter(lines2, config);
|
|
60985
60999
|
lines2.push("");
|
|
60986
61000
|
lines2.push(`${formatter.formatItalic("Mention me to start a session")} · ${formatter.formatCode("bun install -g claude-threads")} · ${formatter.formatLink("claude-threads.run", "https://claude-threads.run/")}`);
|
|
60987
61001
|
return lines2.join(`
|
|
@@ -60996,6 +61010,7 @@ async function buildStickyMessage(sessions, platformId, config, formatter, getTh
|
|
|
60996
61010
|
formatter.formatBold(`Active Claude Threads (${totalCount})`),
|
|
60997
61011
|
""
|
|
60998
61012
|
];
|
|
61013
|
+
appendDescription(lines, config);
|
|
60999
61014
|
const formatSessionEntry = (session, isThisPlatform) => {
|
|
61000
61015
|
const platformIcon = getPlatformIcon(session.platform.platformType);
|
|
61001
61016
|
const topic = getSessionTopic(session, formatter);
|
|
@@ -61044,6 +61059,7 @@ async function buildStickyMessage(sessions, platformId, config, formatter, getTh
|
|
|
61044
61059
|
lines.push("");
|
|
61045
61060
|
lines.push(`✨ ${formatter.formatBold("What's new:")} ${whatsNew}`);
|
|
61046
61061
|
}
|
|
61062
|
+
appendFooter(lines, config);
|
|
61047
61063
|
lines.push("");
|
|
61048
61064
|
lines.push(`${formatter.formatItalic("Mention me to start a session")} · ${formatter.formatCode("bun install -g claude-threads")} · ${formatter.formatLink("claude-threads.run", "https://claude-threads.run/")}`);
|
|
61049
61065
|
return lines.join(`
|
|
@@ -68104,6 +68120,8 @@ class SessionManager extends EventEmitter4 {
|
|
|
68104
68120
|
sessionMonitor = null;
|
|
68105
68121
|
backgroundCleanup = null;
|
|
68106
68122
|
isShuttingDown = false;
|
|
68123
|
+
customDescription;
|
|
68124
|
+
customFooter;
|
|
68107
68125
|
autoUpdateManager = null;
|
|
68108
68126
|
constructor(workingDir, skipPermissions = false, chromeEnabled = false, worktreeMode = "prompt", sessionsPath, threadLogsEnabled = true, threadLogsRetentionDays = 30, limits) {
|
|
68109
68127
|
super();
|
|
@@ -68481,12 +68499,18 @@ class SessionManager extends EventEmitter4 {
|
|
|
68481
68499
|
skipPermissions: this.skipPermissions,
|
|
68482
68500
|
worktreeMode: this.worktreeMode,
|
|
68483
68501
|
workingDir: this.workingDir,
|
|
68484
|
-
debug: this.debug
|
|
68502
|
+
debug: this.debug,
|
|
68503
|
+
description: this.customDescription,
|
|
68504
|
+
footer: this.customFooter
|
|
68485
68505
|
});
|
|
68486
68506
|
}
|
|
68487
68507
|
async updateAllStickyMessages() {
|
|
68488
68508
|
await this.updateStickyMessage();
|
|
68489
68509
|
}
|
|
68510
|
+
setStickyMessageCustomization(description, footer) {
|
|
68511
|
+
this.customDescription = description;
|
|
68512
|
+
this.customFooter = footer;
|
|
68513
|
+
}
|
|
68490
68514
|
setSkipPermissions(value) {
|
|
68491
68515
|
this.skipPermissions = value;
|
|
68492
68516
|
}
|
|
@@ -79245,7 +79269,7 @@ class InkProvider {
|
|
|
79245
79269
|
}
|
|
79246
79270
|
async start() {
|
|
79247
79271
|
const { config, onQuit, toggleCallbacks } = this.options;
|
|
79248
|
-
if (!process.stdout.isTTY) {
|
|
79272
|
+
if (!process.stdout.isTTY || !process.stdin.isTTY) {
|
|
79249
79273
|
throw new Error("InkProvider requires an interactive terminal (TTY). Use HeadlessProvider for non-TTY environments.");
|
|
79250
79274
|
}
|
|
79251
79275
|
let resolveHandlers;
|
|
@@ -80518,7 +80542,7 @@ function hasRequiredCliArgs(args) {
|
|
|
80518
80542
|
return !!(args.url && args.token && args.channel);
|
|
80519
80543
|
}
|
|
80520
80544
|
async function main() {
|
|
80521
|
-
const isHeadless = opts.headless || !process.stdout.isTTY;
|
|
80545
|
+
const isHeadless = opts.headless || !process.stdout.isTTY || !process.stdin.isTTY;
|
|
80522
80546
|
if (!isHeadless) {
|
|
80523
80547
|
process.stdout.write("\x1B[2J\x1B[H");
|
|
80524
80548
|
}
|
|
@@ -80724,6 +80748,9 @@ async function main() {
|
|
|
80724
80748
|
const threadLogsEnabled = config.threadLogs?.enabled ?? true;
|
|
80725
80749
|
const threadLogsRetentionDays = config.threadLogs?.retentionDays ?? 30;
|
|
80726
80750
|
const session = new SessionManager(workingDir, initialSkipPermissions, config.chrome, config.worktreeMode, undefined, threadLogsEnabled, threadLogsRetentionDays, config.limits);
|
|
80751
|
+
if (config.stickyMessage) {
|
|
80752
|
+
session.setStickyMessageCustomization(config.stickyMessage.description, config.stickyMessage.footer);
|
|
80753
|
+
}
|
|
80727
80754
|
sessionManager = session;
|
|
80728
80755
|
session.on("session:add", (info) => {
|
|
80729
80756
|
ui.addSession(info);
|