dsh-ntr 0.1.2 → 0.1.4

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/lib/client.js CHANGED
@@ -1988,7 +1988,7 @@ window.__ModuleLoader__.load({
1988
1988
  }),
1989
1989
  section.items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
1990
1990
  type: "button",
1991
- role: "menuitemradio",
1991
+ role: item.checkbox === true ? "menuitemcheckbox" : "menuitemradio",
1992
1992
  "aria-checked": item.active === true,
1993
1993
  className: `ntr-acp-menu-item${item.active === true ? " is-active" : ""}`,
1994
1994
  disabled: item.disabled === true,
@@ -2001,11 +2001,16 @@ window.__ModuleLoader__.load({
2001
2001
  style: { background: item.dot },
2002
2002
  "aria-hidden": true
2003
2003
  }),
2004
+ item.checkbox === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2005
+ className: `ntr-acp-check${item.active === true ? " is-on" : ""}`,
2006
+ "aria-hidden": true,
2007
+ children: item.active === true ? "✓" : ""
2008
+ }),
2004
2009
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2005
2010
  className: "ntr-acp-menu-item-label",
2006
2011
  children: item.label
2007
2012
  }),
2008
- item.active === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2013
+ item.active === true && item.checkbox !== true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2009
2014
  className: "ntr-acp-tick",
2010
2015
  "aria-hidden": true,
2011
2016
  children: "✓"
@@ -2331,6 +2336,8 @@ window.__ModuleLoader__.load({
2331
2336
  .ntr-acp-seat-sub { color: var(--dsw-alias-text-secondary, #6b7280); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
2332
2337
  .ntr-acp-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
2333
2338
  .ntr-acp-tick { margin-left: auto; color: var(--dsw-alias-state-business-primary, #2563eb); }
2339
+ .ntr-acp-check { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 13px; height: 13px; border: 1px solid var(--dsw-alias-border-l2, #d1d5db); border-radius: 3px; font-size: 10px; line-height: 1; color: var(--dsw-alias-state-business-primary, #2563eb); }
2340
+ .ntr-acp-check.is-on { border-color: var(--dsw-alias-state-business-primary, #2563eb); }
2334
2341
  .ntr-acp-menu { position: absolute; bottom: calc(100% + 8px); left: 8px; z-index: 100; width: min(360px, 100%); max-height: min(420px, 60vh); display: flex; flex-direction: column; border: 1px solid var(--dsw-alias-border-l2, #d1d5db); border-radius: 10px; background: var(--dsw-alias-bg-layer-1, #fff); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16); font-size: 12px; overflow: hidden; }
2335
2342
  .ntr-acp-menu-head { padding: 8px 10px 6px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
2336
2343
  .ntr-acp-menu-title { flex: 1; }
@@ -2777,7 +2784,7 @@ window.__ModuleLoader__.load({
2777
2784
  if (!sameStringArray(payload.allowedCwdRoots ?? [], current.allowedCwdRoots ?? [])) return false;
2778
2785
  if (!sameStringMap(payload.env ?? {}, current.env ?? {})) return false;
2779
2786
  if (exposureKey(payload.exposedModels) !== exposureKey(current.exposedModels)) return false;
2780
- if (payload.autoDiscoverModels === true !== (current.autoDiscoverModels === true)) return false;
2787
+ if (payload.autoDiscoverModels !== false !== (current.autoDiscoverModels !== false)) return false;
2781
2788
  if (payload.idleTimeoutMs !== void 0 && payload.idleTimeoutMs !== current.idleTimeoutMs) return false;
2782
2789
  return true;
2783
2790
  }
@@ -3142,7 +3149,7 @@ window.__ModuleLoader__.load({
3142
3149
  exposed: server === void 0 ? void 0 : [...server]
3143
3150
  }));
3144
3151
  }, [serverExposureKey]);
3145
- const serverAutoDiscover = detected.currentConfig?.autoDiscoverModels === true;
3152
+ const serverAutoDiscover = detected.currentConfig?.autoDiscoverModels !== false;
3146
3153
  (0, react.useEffect)(() => {
3147
3154
  setForm((prev) => ({
3148
3155
  ...prev,
@@ -3396,7 +3403,7 @@ window.__ModuleLoader__.load({
3396
3403
  value
3397
3404
  })),
3398
3405
  exposed: config?.exposedModels === void 0 ? void 0 : [...config.exposedModels],
3399
- autoDiscoverModels: config?.autoDiscoverModels === true,
3406
+ autoDiscoverModels: config?.autoDiscoverModels !== false,
3400
3407
  idleStr: idleText(activeAgent?.idleTimeoutMs ?? config?.idleTimeoutMs)
3401
3408
  };
3402
3409
  }
@@ -3444,7 +3451,7 @@ window.__ModuleLoader__.load({
3444
3451
  ...form.npmPackage.trim() === "" ? {} : { npmPackage: form.npmPackage.trim() },
3445
3452
  env,
3446
3453
  ...form.exposed === void 0 ? {} : { exposedModels: form.exposed },
3447
- ...form.autoDiscoverModels ? { autoDiscoverModels: true } : {},
3454
+ ...form.autoDiscoverModels ? {} : { autoDiscoverModels: false },
3448
3455
  ...idleRaw === "" || !idleValid(idleRaw) ? {} : { idleTimeoutMs: Number(idleRaw) }
3449
3456
  };
3450
3457
  if (form.rootsOpen) {
@@ -4794,10 +4801,12 @@ window.__ModuleLoader__.load({
4794
4801
  if (catalog === void 0 || extras.length === 0) return [];
4795
4802
  const picked = choice !== void 0 && choice.agentId === catalog.agentId ? choice.extraConfigs : void 0;
4796
4803
  return extras.map((option) => {
4797
- const value = picked?.[option.configId] ?? option.currentValue;
4804
+ const raw = picked?.[option.configId] ?? option.currentValue;
4805
+ const value = typeof raw === "boolean" ? raw ? "true" : "false" : raw;
4798
4806
  return {
4799
4807
  configId: option.configId,
4800
4808
  name: option.name,
4809
+ ...option.kind === "boolean" ? { kind: "boolean" } : {},
4801
4810
  ...value === void 0 ? {} : { value },
4802
4811
  choices: option.choices
4803
4812
  };
@@ -5140,16 +5149,30 @@ window.__ModuleLoader__.load({
5140
5149
  * and the pick would then be read as the primary model axis.
5141
5150
  */
5142
5151
  function advancedSections(context) {
5143
- return advancedOptions(context.catalog, context.choice).map((option) => ({
5144
- id: `config:${option.configId}`,
5145
- title: option.name,
5146
- items: option.choices.map((choice) => ({
5147
- id: choice.id,
5148
- label: choice.name,
5149
- ...choice.description === void 0 ? {} : { detail: choice.description },
5150
- active: choice.id === option.value
5151
- }))
5152
- }));
5152
+ return advancedOptions(context.catalog, context.choice).map((option) => {
5153
+ if (option.kind === "boolean") {
5154
+ const checked = option.value === "true";
5155
+ return {
5156
+ id: `config:${option.configId}`,
5157
+ items: [{
5158
+ id: checked ? "false" : "true",
5159
+ label: option.name,
5160
+ active: checked,
5161
+ checkbox: true
5162
+ }]
5163
+ };
5164
+ }
5165
+ return {
5166
+ id: `config:${option.configId}`,
5167
+ title: option.name,
5168
+ items: option.choices.map((choice) => ({
5169
+ id: choice.id,
5170
+ label: choice.name,
5171
+ ...choice.description === void 0 ? {} : { detail: choice.description },
5172
+ active: choice.id === option.value
5173
+ }))
5174
+ };
5175
+ });
5153
5176
  }
5154
5177
  /**
5155
5178
  * REMOVED on purpose (2026-10-17): the agent's own `session/set_mode` list used