theclawbay 0.3.39 → 0.3.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.
@@ -858,7 +858,7 @@ async function promptForCodexUsageUiPatch() {
858
858
  });
859
859
  try {
860
860
  process.stdout.write("\n");
861
- process.stdout.write("Patch Codex to show The Claw Bay usage remaining in the CLI/app footer and add a logout card in installed Codex VS Code settings? [y/N] ");
861
+ process.stdout.write("Patch Codex to show The Claw Bay usage remaining? [y/N] ");
862
862
  const answer = (await rl.question("")).trim().toLowerCase();
863
863
  return answer === "y" || answer === "yes";
864
864
  }
@@ -2263,7 +2263,7 @@ SetupCommand.flags = {
2263
2263
  "codex-usage-ui": core_1.Flags.boolean({
2264
2264
  required: false,
2265
2265
  allowNo: true,
2266
- description: "Patch Codex to show The Claw Bay usage remaining and add a logout card in installed Codex VS Code settings.",
2266
+ description: "Patch Codex to show The Claw Bay usage remaining.",
2267
2267
  }),
2268
2268
  "debug-output": core_1.Flags.boolean({
2269
2269
  required: false,
@@ -244,7 +244,7 @@ function buildWebviewPatch() {
244
244
  }
245
245
 
246
246
  function isAgentSettingsRoute() {
247
- return currentRoute().includes("/settings/agent");
247
+ return currentRoute().includes("/settings/general") || currentRoute().includes("/settings/agent");
248
248
  }
249
249
 
250
250
  function ensureStyle() {
@@ -253,28 +253,29 @@ function buildWebviewPatch() {
253
253
  style.id = styleId;
254
254
  style.textContent = \`
255
255
  #\${cardId} {
256
- margin: 16px 0 24px;
256
+ margin: 20px 0 28px;
257
257
  border: 1px solid var(--vscode-panel-border, rgba(255,255,255,0.12));
258
258
  border-radius: 12px;
259
259
  background: var(--vscode-editorWidget-background, rgba(255,255,255,0.03));
260
260
  color: var(--vscode-foreground, inherit);
261
261
  overflow: hidden;
262
262
  }
263
- #\${cardId} details {
264
- width: 100%;
265
- }
266
- #\${cardId} summary {
263
+ #\${cardId} .theclawbay-header {
267
264
  display: flex;
268
265
  align-items: center;
269
266
  justify-content: space-between;
270
267
  gap: 12px;
271
268
  padding: 14px 16px;
272
- cursor: pointer;
273
- font-weight: 600;
274
- list-style: none;
275
269
  }
276
- #\${cardId} summary::-webkit-details-marker {
277
- display: none;
270
+ #\${cardId} .theclawbay-title {
271
+ font-size: 14px;
272
+ font-weight: 700;
273
+ color: var(--vscode-foreground, inherit);
274
+ }
275
+ #\${cardId} .theclawbay-topline {
276
+ display: flex;
277
+ align-items: center;
278
+ gap: 10px;
278
279
  }
279
280
  #\${cardId} .theclawbay-badge {
280
281
  border-radius: 999px;
@@ -309,6 +310,27 @@ function buildWebviewPatch() {
309
310
  #\${cardId} .theclawbay-button:hover {
310
311
  background: var(--vscode-button-hoverBackground, #1177bb);
311
312
  }
313
+ #\${cardId} .theclawbay-row {
314
+ display: flex;
315
+ align-items: center;
316
+ justify-content: space-between;
317
+ gap: 16px;
318
+ flex-wrap: wrap;
319
+ }
320
+ #\${cardId} .theclawbay-toggle {
321
+ display: inline-flex;
322
+ align-items: center;
323
+ gap: 10px;
324
+ font-size: 13px;
325
+ font-weight: 600;
326
+ color: var(--vscode-foreground, inherit);
327
+ }
328
+ #\${cardId} .theclawbay-toggle input {
329
+ width: 34px;
330
+ height: 18px;
331
+ accent-color: var(--vscode-button-background, #0e639c);
332
+ cursor: pointer;
333
+ }
312
334
  \`;
313
335
  document.head.appendChild(style);
314
336
  }
@@ -336,33 +358,60 @@ function buildWebviewPatch() {
336
358
  const wrapper = document.createElement("section");
337
359
  wrapper.id = cardId;
338
360
 
339
- const details = document.createElement("details");
340
- const summary = document.createElement("summary");
361
+ const header = document.createElement("div");
362
+ header.className = "theclawbay-header";
363
+
364
+ const topline = document.createElement("div");
365
+ topline.className = "theclawbay-topline";
341
366
  const title = document.createElement("span");
367
+ title.className = "theclawbay-title";
342
368
  title.textContent = "The Claw Bay";
343
369
  const badge = document.createElement("span");
344
370
  badge.className = "theclawbay-badge";
345
371
  badge.textContent = "Patched";
346
- summary.append(title, badge);
372
+ topline.append(title, badge);
373
+ header.appendChild(topline);
347
374
 
348
375
  const body = document.createElement("div");
349
376
  body.className = "theclawbay-body";
350
377
 
351
378
  const copy = document.createElement("p");
352
379
  copy.className = "theclawbay-copy";
353
- copy.textContent = "Shows The Claw Bay usage remaining inside Codex and lets you remove the patch cleanly from here.";
380
+ copy.textContent = "Shows The Claw Bay usage remaining inside Codex.";
381
+
382
+ const row = document.createElement("div");
383
+ row.className = "theclawbay-row";
384
+
385
+ const toggleLabel = document.createElement("label");
386
+ toggleLabel.className = "theclawbay-toggle";
387
+
388
+ const toggle = document.createElement("input");
389
+ toggle.type = "checkbox";
390
+ toggle.checked = true;
391
+ toggle.addEventListener("change", () => {
392
+ if (!toggle.checked) {
393
+ vscodeApi?.postMessage({ type: "open-vscode-command", command: commandId, args: [] });
394
+ }
395
+ window.setTimeout(() => {
396
+ toggle.checked = true;
397
+ }, 0);
398
+ });
399
+
400
+ const toggleText = document.createElement("span");
401
+ toggleText.textContent = "Usage remaining patch";
402
+ toggleLabel.append(toggle, toggleText);
354
403
 
355
404
  const button = document.createElement("button");
356
405
  button.type = "button";
357
406
  button.className = "theclawbay-button";
358
- button.textContent = "Log out and remove patch";
407
+ button.textContent = "Remove patch";
359
408
  button.addEventListener("click", () => {
360
409
  vscodeApi?.postMessage({ type: "open-vscode-command", command: commandId, args: [] });
361
410
  });
362
411
 
363
- body.append(copy, button);
364
- details.append(summary, body);
365
- wrapper.appendChild(details);
412
+ row.append(toggleLabel, button);
413
+ body.append(copy, row);
414
+ wrapper.append(header, body);
366
415
  return wrapper;
367
416
  }
368
417
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "theclawbay",
3
- "version": "0.3.39",
3
+ "version": "0.3.40",
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": {