adhdev 0.9.82-rc.184 → 0.9.82-rc.185

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.
@@ -126678,7 +126678,7 @@ var init_adhdev_daemon = __esm({
126678
126678
  init_version();
126679
126679
  init_src();
126680
126680
  init_runtime_defaults();
126681
- pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.184" });
126681
+ pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.185" });
126682
126682
  LOCAL_DAEMON_HEALTH_TIMEOUT_MS = 8e3;
126683
126683
  AdhdevDaemon = class _AdhdevDaemon {
126684
126684
  localHttpServer = null;
package/dist/cli/index.js CHANGED
@@ -126648,7 +126648,7 @@ var init_adhdev_daemon = __esm({
126648
126648
  init_version();
126649
126649
  init_src();
126650
126650
  init_runtime_defaults();
126651
- pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.184" });
126651
+ pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.185" });
126652
126652
  LOCAL_DAEMON_HEALTH_TIMEOUT_MS = 8e3;
126653
126653
  AdhdevDaemon = class _AdhdevDaemon {
126654
126654
  localHttpServer = null;
package/dist/index.js CHANGED
@@ -95470,7 +95470,7 @@ var init_adhdev_daemon = __esm({
95470
95470
  init_version();
95471
95471
  init_src();
95472
95472
  init_runtime_defaults();
95473
- pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.184" });
95473
+ pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.82-rc.185" });
95474
95474
  LOCAL_DAEMON_HEALTH_TIMEOUT_MS = 8e3;
95475
95475
  AdhdevDaemon = class _AdhdevDaemon {
95476
95476
  localHttpServer = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adhdev",
3
- "version": "0.9.82-rc.184",
3
+ "version": "0.9.82-rc.185",
4
4
  "description": "ADHDev — Agent Dashboard Hub for Dev. The control hub for your AI coding agents (Claude Code, Codex, Hermes, …).",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -49,7 +49,7 @@
49
49
  "node": ">=18"
50
50
  },
51
51
  "dependencies": {
52
- "@adhdev/daemon-core": "0.9.82-rc.184",
52
+ "@adhdev/daemon-core": "0.9.82-rc.185",
53
53
  "@adhdev/ghostty-vt-node": "*",
54
54
  "@modelcontextprotocol/sdk": "^1.0.0",
55
55
  "@xterm/addon-serialize": "^0.14.0",
@@ -230,10 +230,6 @@ function isLocalTransport(transport) {
230
230
  }
231
231
 
232
232
  // src/tools/chat-compact.ts
233
- function isAssistantLike(message) {
234
- const role = String(message?.role ?? "").toLowerCase();
235
- return role === "assistant" || role === "agent";
236
- }
237
233
  function messageContent(message) {
238
234
  const content = message?.content;
239
235
  if (typeof content === "string") return content;
@@ -253,10 +249,7 @@ function isCoordinatorVisibleMessage(message) {
253
249
  return role === "user" || role === "assistant" || role === "agent";
254
250
  }
255
251
  function buildCompactMessageTail(visibleMessages, opts) {
256
- const summary = typeof opts.summary === "string" ? opts.summary.trim() : "";
257
- const shouldOmitSummaryMessage = !!summary && !!opts.finalAssistant && isAssistantLike(opts.finalAssistant) && messageContent(opts.finalAssistant).trim() === summary;
258
- const sourceMessages = shouldOmitSummaryMessage ? visibleMessages.filter((message) => message !== opts.finalAssistant) : visibleMessages;
259
- return sourceMessages.slice(-opts.limit);
252
+ return visibleMessages.slice(-opts.limit);
260
253
  }
261
254
  function compactChatPayload(payload, opts = {}) {
262
255
  const rawMessages = Array.isArray(payload?.messages) ? payload.messages : [];
@@ -4062,11 +4055,17 @@ function formatChatResult(result, sessionId, format, limit = 50, compact = false
4062
4055
  }, null, 2);
4063
4056
  }
4064
4057
  if ((format === "text" || format === void 0) && compact && compactPayload) {
4065
- const lines2 = outputMessages.slice(-limit).map((m) => {
4058
+ const summaryText = typeof compactPayload.summary === "string" ? compactPayload.summary.trim() : "";
4059
+ const tail = outputMessages.slice(-limit);
4060
+ const lastIndex = tail.length - 1;
4061
+ const lines2 = tail.flatMap((m, idx) => {
4066
4062
  const role = m.role === "user" ? "User" : m.role === "assistant" ? "Agent" : m.role;
4067
4063
  const content = messageContent(m);
4064
+ if (idx === lastIndex && (role === "Agent" || m.role === "agent") && summaryText && content.trim() === summaryText) {
4065
+ return [];
4066
+ }
4068
4067
  const truncated = content.length > 500 ? `${content.slice(0, 500)}\u2026` : content;
4069
- return `[${role}] ${truncated}`;
4068
+ return [`[${role}] ${truncated}`];
4070
4069
  });
4071
4070
  if (compactPayload.summary) {
4072
4071
  const truncatedSummary = compactPayload.summary.length > 500 ? `${compactPayload.summary.slice(0, 500)}\u2026` : compactPayload.summary;