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/index.js CHANGED
@@ -18996,7 +18996,7 @@ function shSingleQuote(arg) {
18996
18996
  }
18997
18997
  return `'${arg.replace(/'/g, `'\\''`)}'`;
18998
18998
  }
18999
- function estimatePromptDisplayLines(text, cols = 100) {
18999
+ function estimatePromptDisplayLines(text, cols = 80) {
19000
19000
  const normalized = String(text || "").replace(/\r/g, "");
19001
19001
  if (!normalized) return 1;
19002
19002
  return normalized.split("\n").reduce((sum, line) => sum + Math.max(1, Math.ceil(Math.max(1, line.length) / cols)), 0);
@@ -19280,8 +19280,8 @@ var init_provider_cli_adapter = __esm({
19280
19280
  shellArgs = allArgs;
19281
19281
  }
19282
19282
  const ptyOpts = {
19283
- cols: 100,
19284
- rows: 30,
19283
+ cols: 80,
19284
+ rows: 24,
19285
19285
  cwd: this.workingDir,
19286
19286
  env: buildCliSpawnEnv(process.env, spawnConfig.env)
19287
19287
  };
@@ -19337,7 +19337,7 @@ var init_provider_cli_adapter = __esm({
19337
19337
  this.spawnAt = Date.now();
19338
19338
  this.startupParseGate = true;
19339
19339
  this.startupBuffer = "";
19340
- this.terminalScreen.reset(30, 100);
19340
+ this.terminalScreen.reset(24, 80);
19341
19341
  this.pendingTerminalQueryTail = "";
19342
19342
  this.currentTurnScope = null;
19343
19343
  this.ready = false;
@@ -45396,7 +45396,7 @@ var init_adhdev_daemon = __esm({
45396
45396
  fs15 = __toESM(require("fs"));
45397
45397
  path17 = __toESM(require("path"));
45398
45398
  import_chalk2 = __toESM(require("chalk"));
45399
- pkgVersion = "0.7.44";
45399
+ pkgVersion = "0.7.45";
45400
45400
  if (pkgVersion === "unknown") {
45401
45401
  try {
45402
45402
  const possiblePaths = [
@@ -45451,6 +45451,10 @@ var init_adhdev_daemon = __esm({
45451
45451
  isTerminalCliSession(sessionId) {
45452
45452
  return this.getCliPresentationMode(sessionId) === "terminal";
45453
45453
  }
45454
+ isCliSession(sessionId) {
45455
+ const mode = this.getCliPresentationMode(sessionId);
45456
+ return mode === "chat" || mode === "terminal";
45457
+ }
45454
45458
  async start(options = {}) {
45455
45459
  try {
45456
45460
  const { installGlobalInterceptor: installGlobalInterceptor2 } = require("./logging/logger");
@@ -45491,7 +45495,7 @@ ${err?.stack || ""}`);
45491
45495
  getServerConn: () => this.serverConn,
45492
45496
  getP2p: () => ({
45493
45497
  broadcastPtyOutput: (key, data) => {
45494
- if (!this.isTerminalCliSession(key)) return;
45498
+ if (!this.isCliSession(key)) return;
45495
45499
  this.p2p?.broadcastPtyOutput(key, data);
45496
45500
  }
45497
45501
  }),
@@ -45756,8 +45760,8 @@ ${err?.stack || ""}`);
45756
45760
  case "get_runtime_snapshot": {
45757
45761
  const sessionId = typeof data.sessionId === "string" ? data.sessionId : "";
45758
45762
  if (!sessionId) return { success: false, error: "sessionId is required" };
45759
- if (!this.isTerminalCliSession(sessionId)) {
45760
- return { success: false, error: "CLI session is not in terminal mode", code: "CLI_VIEW_MODE_NOT_TERMINAL" };
45763
+ if (!this.isCliSession(sessionId)) {
45764
+ return { success: false, error: "CLI session runtime unavailable", code: "CLI_RUNTIME_UNAVAILABLE" };
45761
45765
  }
45762
45766
  if (!this.sessionHostEndpoint) return { success: false, error: "Session host unavailable" };
45763
45767
  const client = new SessionHostClient({ endpoint: this.sessionHostEndpoint });