adhdev 0.1.39 → 0.1.40

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.
Files changed (2) hide show
  1. package/dist/index.js +23 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5335,12 +5335,23 @@ var init_daemon_commands = __esm({
5335
5335
  if (!data) return { success: false, error: "data required" };
5336
5336
  if (this.ctx.adapters) {
5337
5337
  const targetCli = cliType || "gemini-cli";
5338
+ const directAdapter = this.ctx.adapters.get(targetCli);
5339
+ if (directAdapter && typeof directAdapter.writeRaw === "function") {
5340
+ directAdapter.writeRaw(data);
5341
+ return { success: true };
5342
+ }
5338
5343
  for (const [, adapter] of this.ctx.adapters) {
5339
5344
  if (adapter.cliType === targetCli && typeof adapter.writeRaw === "function") {
5340
5345
  adapter.writeRaw(data);
5341
5346
  return { success: true };
5342
5347
  }
5343
5348
  }
5349
+ for (const [key, adapter] of this.ctx.adapters) {
5350
+ if ((key.startsWith(targetCli) || targetCli.startsWith(adapter.cliType)) && typeof adapter.writeRaw === "function") {
5351
+ adapter.writeRaw(data);
5352
+ return { success: true };
5353
+ }
5354
+ }
5344
5355
  }
5345
5356
  return { success: false, error: `CLI adapter not found: ${cliType}` };
5346
5357
  }
@@ -5349,8 +5360,18 @@ var init_daemon_commands = __esm({
5349
5360
  if (!cols || !rows) return { success: false, error: "cols and rows required" };
5350
5361
  if (this.ctx.adapters) {
5351
5362
  const targetCli = cliType || "gemini-cli";
5352
- for (const [, adapter] of this.ctx.adapters) {
5353
- if (adapter.cliType === targetCli && typeof adapter.resize === "function") {
5363
+ const directAdapter = this.ctx.adapters.get(targetCli);
5364
+ if (directAdapter && typeof directAdapter.resize === "function") {
5365
+ if (force) {
5366
+ directAdapter.resize(cols - 1, rows);
5367
+ setTimeout(() => directAdapter.resize(cols, rows), 50);
5368
+ } else {
5369
+ directAdapter.resize(cols, rows);
5370
+ }
5371
+ return { success: true };
5372
+ }
5373
+ for (const [key, adapter] of this.ctx.adapters) {
5374
+ if ((adapter.cliType === targetCli || key.startsWith(targetCli) || targetCli.startsWith(adapter.cliType)) && typeof adapter.resize === "function") {
5354
5375
  if (force) {
5355
5376
  adapter.resize(cols - 1, rows);
5356
5377
  setTimeout(() => adapter.resize(cols, rows), 50);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adhdev",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "description": "ADHDev CLI — Detect, install and configure your IDE + AI agent extensions",
5
5
  "main": "dist/index.js",
6
6
  "bin": {