adhdev 0.7.44 → 0.7.45

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/dist/cli/index.js CHANGED
@@ -19366,7 +19366,7 @@ function shSingleQuote(arg) {
19366
19366
  }
19367
19367
  return `'${arg.replace(/'/g, `'\\''`)}'`;
19368
19368
  }
19369
- function estimatePromptDisplayLines(text, cols = 100) {
19369
+ function estimatePromptDisplayLines(text, cols = 80) {
19370
19370
  const normalized = String(text || "").replace(/\r/g, "");
19371
19371
  if (!normalized) return 1;
19372
19372
  return normalized.split("\n").reduce((sum, line) => sum + Math.max(1, Math.ceil(Math.max(1, line.length) / cols)), 0);
@@ -19650,8 +19650,8 @@ var init_provider_cli_adapter = __esm({
19650
19650
  shellArgs = allArgs;
19651
19651
  }
19652
19652
  const ptyOpts = {
19653
- cols: 100,
19654
- rows: 30,
19653
+ cols: 80,
19654
+ rows: 24,
19655
19655
  cwd: this.workingDir,
19656
19656
  env: buildCliSpawnEnv(process.env, spawnConfig.env)
19657
19657
  };
@@ -19707,7 +19707,7 @@ var init_provider_cli_adapter = __esm({
19707
19707
  this.spawnAt = Date.now();
19708
19708
  this.startupParseGate = true;
19709
19709
  this.startupBuffer = "";
19710
- this.terminalScreen.reset(30, 100);
19710
+ this.terminalScreen.reset(24, 80);
19711
19711
  this.pendingTerminalQueryTail = "";
19712
19712
  this.currentTurnScope = null;
19713
19713
  this.ready = false;
@@ -46084,7 +46084,7 @@ var init_adhdev_daemon = __esm({
46084
46084
  fs16 = __toESM(require("fs"));
46085
46085
  path18 = __toESM(require("path"));
46086
46086
  import_chalk2 = __toESM(require("chalk"));
46087
- pkgVersion = "0.7.44";
46087
+ pkgVersion = "0.7.45";
46088
46088
  if (pkgVersion === "unknown") {
46089
46089
  try {
46090
46090
  const possiblePaths = [
@@ -46139,6 +46139,10 @@ var init_adhdev_daemon = __esm({
46139
46139
  isTerminalCliSession(sessionId) {
46140
46140
  return this.getCliPresentationMode(sessionId) === "terminal";
46141
46141
  }
46142
+ isCliSession(sessionId) {
46143
+ const mode = this.getCliPresentationMode(sessionId);
46144
+ return mode === "chat" || mode === "terminal";
46145
+ }
46142
46146
  async start(options = {}) {
46143
46147
  try {
46144
46148
  const { installGlobalInterceptor: installGlobalInterceptor2 } = require("./logging/logger");
@@ -46179,7 +46183,7 @@ ${err?.stack || ""}`);
46179
46183
  getServerConn: () => this.serverConn,
46180
46184
  getP2p: () => ({
46181
46185
  broadcastPtyOutput: (key, data) => {
46182
- if (!this.isTerminalCliSession(key)) return;
46186
+ if (!this.isCliSession(key)) return;
46183
46187
  this.p2p?.broadcastPtyOutput(key, data);
46184
46188
  }
46185
46189
  }),
@@ -46444,8 +46448,8 @@ ${err?.stack || ""}`);
46444
46448
  case "get_runtime_snapshot": {
46445
46449
  const sessionId = typeof data.sessionId === "string" ? data.sessionId : "";
46446
46450
  if (!sessionId) return { success: false, error: "sessionId is required" };
46447
- if (!this.isTerminalCliSession(sessionId)) {
46448
- return { success: false, error: "CLI session is not in terminal mode", code: "CLI_VIEW_MODE_NOT_TERMINAL" };
46451
+ if (!this.isCliSession(sessionId)) {
46452
+ return { success: false, error: "CLI session runtime unavailable", code: "CLI_RUNTIME_UNAVAILABLE" };
46449
46453
  }
46450
46454
  if (!this.sessionHostEndpoint) return { success: false, error: "Session host unavailable" };
46451
46455
  const client = new SessionHostClient({ endpoint: this.sessionHostEndpoint });