dsh-agy 0.3.0 → 0.3.1

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/lib/client.js +18 -2
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -1363,7 +1363,23 @@ window.__ModuleLoader__.load({
1363
1363
  hard: 62900
1364
1364
  }
1365
1365
  ];
1366
- function thinkingSamples(t) {
1366
+ /**
1367
+ * Collapsible table of measured thinking tokens.
1368
+ *
1369
+ * MUST be rendered as a component (`h(ThinkingSamples, { t })`), never CALLED as
1370
+ * `ThinkingSamples({ t })` or as a lowercase helper. This function owns a
1371
+ * `useState`, and React keys renderer state by hook call order: a direct call
1372
+ * inside the parent's conditional branch appends this hook to the PARENT's
1373
+ * sequence, so the parent's hook count changes the moment the section expands and
1374
+ * React throws mid-render. The exception unmounts the whole Settings tree — a
1375
+ * white panel no click can revive, only a restart.
1376
+ *
1377
+ * This is the second occurrence of that class of bug in this file (`ModelsTab`
1378
+ * ran a `useMemo` after an early return, white-screening on tab switch). Both
1379
+ * passed `tsc`, the 442 unit tests and CI, because the test environment is
1380
+ * `environment: 'node'` and renders nothing — nothing static checks hook order.
1381
+ */
1382
+ function ThinkingSamples({ t }) {
1367
1383
  const [show, setShow] = (0, react.useState)(false);
1368
1384
  const cell = (value) => h("td", { className: "agy-num" }, value === null ? "-" : value === 0 ? "0" : `~${value.toLocaleString()}`);
1369
1385
  return h("div", {
@@ -1522,7 +1538,7 @@ window.__ModuleLoader__.load({
1522
1538
  const stored = budgets[level] === void 0 ? "" : String(budgets[level]);
1523
1539
  if (value.trim() !== stored) save(level, value);
1524
1540
  }
1525
- })), thinkingSamples(t)), h("div", { className: "agy-thinking-group" }, h("div", { className: "agy-thinking-group-name" }, t("thinkingClaudeGroup")), h("ul", { className: "agy-thinking-notes" }, h("li", null, t("thinkingClaudeNoLevels", {
1541
+ })), h(ThinkingSamples, { t })), h("div", { className: "agy-thinking-group" }, h("div", { className: "agy-thinking-group-name" }, t("thinkingClaudeGroup")), h("ul", { className: "agy-thinking-notes" }, h("li", null, t("thinkingClaudeNoLevels", {
1526
1542
  min: CLAUDE_BUDGET_MIN,
1527
1543
  max: CLAUDE_BUDGET_MAX
1528
1544
  })), h("li", null, t("thinkingClaudeMaxTokens")), h("li", null, t("thinkingClaudeNoReport"))), thinkingRow("claude", t("thinkingClaudeLabel"), claudeDraft, t, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agy",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "packageManager": "pnpm@11.10.0",
5
5
  "description": "Google Antigravity (agy) OAuth auth + model access plugin for DeepSeek Harness: multi-account pool, 429 rotation, device fingerprinting, CLI and web login.",
6
6
  "type": "module",