theclawbay 0.3.40 → 0.3.41

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.
@@ -8,7 +8,6 @@ const promises_1 = __importDefault(require("node:fs/promises"));
8
8
  const node_os_1 = __importDefault(require("node:os"));
9
9
  const node_path_1 = __importDefault(require("node:path"));
10
10
  const node_readline_1 = require("node:readline");
11
- const promises_2 = require("node:readline/promises");
12
11
  const node_child_process_1 = require("node:child_process");
13
12
  const core_1 = require("@oclif/core");
14
13
  const yaml_1 = require("yaml");
@@ -751,7 +750,6 @@ async function promptForSetupClients(clients) {
751
750
  stdin.off("keypress", onKeypress);
752
751
  if (stdin.isTTY)
753
752
  stdin.setRawMode(Boolean(wasRaw));
754
- stdin.pause();
755
753
  stdout.write("\x1b[?25h");
756
754
  clearScreen();
757
755
  const finalSelection = new Set(options.filter((option) => option.checked).map((option) => option.id));
@@ -852,19 +850,38 @@ function resolveSetupClientSelection(params) {
852
850
  async function promptForCodexUsageUiPatch() {
853
851
  if (!process.stdin.isTTY || !process.stdout.isTTY)
854
852
  return false;
855
- const rl = (0, promises_2.createInterface)({
856
- input: process.stdin,
857
- output: process.stdout,
853
+ const stdin = process.stdin;
854
+ const stdout = process.stdout;
855
+ const wasRaw = stdin.isRaw;
856
+ stdin.resume();
857
+ return new Promise((resolve) => {
858
+ const finish = (enabled) => {
859
+ stdin.off("data", onData);
860
+ if (stdin.isTTY)
861
+ stdin.setRawMode(Boolean(wasRaw));
862
+ stdout.write("\n");
863
+ resolve(enabled);
864
+ };
865
+ const onData = (chunk) => {
866
+ const key = chunk.toString("utf8");
867
+ if (key === "\u0003") {
868
+ stdout.write("\x1b[?25h");
869
+ process.exit(130);
870
+ }
871
+ const normalized = key.trim().toLowerCase();
872
+ if (normalized === "y" || normalized === "yes") {
873
+ finish(true);
874
+ return;
875
+ }
876
+ if (!normalized || normalized === "n" || normalized === "no") {
877
+ finish(false);
878
+ }
879
+ };
880
+ process.stdout.write("\nPatch Codex to show The Claw Bay usage remaining? [y/N] ");
881
+ if (stdin.isTTY)
882
+ stdin.setRawMode(true);
883
+ stdin.on("data", onData);
858
884
  });
859
- try {
860
- process.stdout.write("\n");
861
- process.stdout.write("Patch Codex to show The Claw Bay usage remaining? [y/N] ");
862
- const answer = (await rl.question("")).trim().toLowerCase();
863
- return answer === "y" || answer === "yes";
864
- }
865
- finally {
866
- rl.close();
867
- }
868
885
  }
869
886
  async function resolveCodexUsageUiSelection(params) {
870
887
  if (!params.codexSelected)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "theclawbay",
3
- "version": "0.3.40",
3
+ "version": "0.3.41",
4
4
  "description": "CLI for connecting Codex, Continue, Cline, OpenClaw, OpenCode, Kilo, Roo Code, Aider, experimental Trae, and experimental Zo to The Claw Bay.",
5
5
  "license": "MIT",
6
6
  "bin": {