claude-threads 0.48.2 → 0.48.4

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 CHANGED
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.48.4] - 2026-01-08
11
+
12
+ ### Fixed
13
+ - **Code blocks no longer split incorrectly** - Messages are now split at line boundaries and never inside code blocks, removing ugly continuation markers (#134)
14
+ - **Disabled platforms show dim indicator** - Changed disabled platform status from red (error) to dim (inactive) for clearer visual feedback (#132)
15
+
16
+ ### Added
17
+ - **CI smoke test** - Added startup verification to CI pipeline to catch binary launch issues early (#133)
18
+
19
+ ## [0.48.3] - 2026-01-08
20
+
21
+ ### Changed
22
+ - **Support Claude CLI 2.1.1** - Updated version compatibility range from `>=2.0.74 <=2.0.76` to `>=2.0.74 <=2.1.1` (#131)
23
+
10
24
  ## [0.48.2] - 2026-01-08
11
25
 
12
26
  ### Fixed
package/dist/index.js CHANGED
@@ -45281,6 +45281,7 @@ async function flush(session, registerPost) {
45281
45281
  const currentPostId = session.currentPostId;
45282
45282
  let breakPoint;
45283
45283
  let codeBlockLanguage;
45284
+ let codeBlockOpenPosition;
45284
45285
  if (content.length > HARD_CONTINUATION_THRESHOLD) {
45285
45286
  const startSearchPos = Math.floor(HARD_CONTINUATION_THRESHOLD * 0.7);
45286
45287
  const breakInfo = findLogicalBreakpoint(content, startSearchPos, Math.floor(HARD_CONTINUATION_THRESHOLD * 0.3));
@@ -45290,13 +45291,8 @@ async function flush(session, registerPost) {
45290
45291
  const codeBlockState = getCodeBlockState(content, startSearchPos);
45291
45292
  if (codeBlockState.isInside) {
45292
45293
  codeBlockLanguage = codeBlockState.language;
45293
- const searchWindow = content.substring(startSearchPos, HARD_CONTINUATION_THRESHOLD);
45294
- const lineBreakMatch = searchWindow.match(/\n/);
45295
- if (lineBreakMatch && lineBreakMatch.index !== undefined) {
45296
- breakPoint = startSearchPos + lineBreakMatch.index + 1;
45297
- } else {
45298
- breakPoint = HARD_CONTINUATION_THRESHOLD;
45299
- }
45294
+ codeBlockOpenPosition = codeBlockState.openPosition;
45295
+ breakPoint = HARD_CONTINUATION_THRESHOLD;
45300
45296
  } else {
45301
45297
  breakPoint = content.lastIndexOf(`
45302
45298
  `, HARD_CONTINUATION_THRESHOLD);
@@ -45319,35 +45315,46 @@ async function flush(session, registerPost) {
45319
45315
  return;
45320
45316
  }
45321
45317
  }
45322
- let firstPart = content.substring(0, breakPoint).trim();
45323
- let remainder = content.substring(breakPoint).trim();
45324
- if (codeBlockLanguage !== undefined) {
45325
- firstPart = firstPart + "\n```";
45326
- remainder = "```" + codeBlockLanguage + `
45327
- ` + remainder;
45318
+ if (codeBlockLanguage !== undefined && codeBlockOpenPosition !== undefined) {
45319
+ if (codeBlockOpenPosition === 0) {
45320
+ try {
45321
+ await session.platform.updatePost(currentPostId, content);
45322
+ } catch {
45323
+ sessionLog(session).debug("Update failed (code block at start), will create new post on next flush");
45324
+ session.currentPostId = null;
45325
+ }
45326
+ return;
45327
+ }
45328
+ const breakBeforeCodeBlock = content.lastIndexOf(`
45329
+ `, codeBlockOpenPosition);
45330
+ if (breakBeforeCodeBlock > 0) {
45331
+ breakPoint = breakBeforeCodeBlock;
45332
+ } else {
45333
+ try {
45334
+ await session.platform.updatePost(currentPostId, content);
45335
+ } catch {
45336
+ sessionLog(session).debug("Update failed (no break before code block), will create new post on next flush");
45337
+ session.currentPostId = null;
45338
+ }
45339
+ return;
45340
+ }
45328
45341
  }
45329
- const formatter2 = session.platform.getFormatter();
45330
- const firstPartWithMarker = remainder ? firstPart + `
45331
-
45332
- ` + formatter2.formatItalic("... (continued below)") : firstPart;
45342
+ const firstPart = content.substring(0, breakPoint).trim();
45343
+ const remainder = content.substring(breakPoint).trim();
45333
45344
  try {
45334
- await session.platform.updatePost(currentPostId, firstPartWithMarker);
45345
+ await session.platform.updatePost(currentPostId, firstPart);
45335
45346
  } catch {
45336
45347
  sessionLog(session).debug("Update failed during split, continuing with new post");
45337
45348
  }
45338
45349
  session.currentPostId = null;
45339
45350
  session.pendingContent = remainder;
45340
45351
  if (remainder) {
45341
- const continuationMarker = formatter2.formatItalic("(continued)");
45342
- const continuationContent = continuationMarker + `
45343
-
45344
- ` + remainder;
45345
45352
  const hasActiveTasks = session.tasksPostId && session.lastTasksContent && !session.tasksCompleted;
45346
45353
  if (hasActiveTasks) {
45347
- const postId = await bumpTasksToBottomWithContent(session, continuationContent, registerPost);
45354
+ const postId = await bumpTasksToBottomWithContent(session, remainder, registerPost);
45348
45355
  session.currentPostId = postId;
45349
45356
  } else {
45350
- const post = await withErrorHandling(() => session.platform.createPost(continuationContent, session.threadId), { action: "Create continuation post", session });
45357
+ const post = await withErrorHandling(() => session.platform.createPost(remainder, session.threadId), { action: "Create continuation post", session });
45351
45358
  if (post) {
45352
45359
  session.currentPostId = post.id;
45353
45360
  registerPost(post.id, session.threadId);
@@ -50450,7 +50457,7 @@ var keepAlive = new KeepAliveManager;
50450
50457
  // src/claude/version-check.ts
50451
50458
  var import_semver3 = __toESM(require_semver2(), 1);
50452
50459
  import { execSync } from "child_process";
50453
- var CLAUDE_CLI_VERSION_RANGE = ">=2.0.74 <=2.0.76";
50460
+ var CLAUDE_CLI_VERSION_RANGE = ">=2.0.74 <=2.1.1";
50454
50461
  function getClaudeCliVersion() {
50455
50462
  const claudePath = process.env.CLAUDE_PATH || "claude";
50456
50463
  try {
@@ -62854,7 +62861,10 @@ function Platforms({ platforms }) {
62854
62861
  /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
62855
62862
  children: getPlatformIcon(platform2.platformType || "mattermost")
62856
62863
  }, undefined, false, undefined, this),
62857
- platform2.reconnecting ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
62864
+ !platform2.enabled ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
62865
+ dimColor: true,
62866
+ children: "\u25CB"
62867
+ }, undefined, false, undefined, this) : platform2.reconnecting ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
62858
62868
  color: "yellow",
62859
62869
  children: "\u25CC"
62860
62870
  }, undefined, false, undefined, this) : platform2.connected ? /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
@@ -62865,7 +62875,8 @@ function Platforms({ platforms }) {
62865
62875
  children: "\u25CB"
62866
62876
  }, undefined, false, undefined, this),
62867
62877
  /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
62868
- color: "cyan",
62878
+ color: platform2.enabled ? "cyan" : undefined,
62879
+ dimColor: !platform2.enabled,
62869
62880
  children: [
62870
62881
  "@",
62871
62882
  platform2.botName
@@ -62876,6 +62887,7 @@ function Platforms({ platforms }) {
62876
62887
  children: "on"
62877
62888
  }, undefined, false, undefined, this),
62878
62889
  /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Text, {
62890
+ dimColor: !platform2.enabled,
62879
62891
  children: platform2.displayName
62880
62892
  }, undefined, false, undefined, this),
62881
62893
  platform2.reconnecting && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(Box_default, {
@@ -65080,7 +65092,7 @@ async function main() {
65080
65092
  await sessionManager?.pauseSessionsForPlatform(platformId);
65081
65093
  client.disconnect();
65082
65094
  sessionStore2.setPlatformEnabled(platformId, false);
65083
- ui.setPlatformStatus(platformId, { connected: false });
65095
+ ui.setPlatformStatus(platformId, { connected: false, reconnecting: false });
65084
65096
  ui.addLog({ level: "info", component: "toggle", message: `\u2713 Platform ${platformId} disabled` });
65085
65097
  }
65086
65098
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-threads",
3
- "version": "0.48.2",
3
+ "version": "0.48.4",
4
4
  "description": "Share Claude Code sessions live in a Mattermost channel with interactive features",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",