@crazyhappyone/dsh-tui 0.1.0-alpha.29 → 0.1.0-alpha.30

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 +14 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9756,7 +9756,12 @@ function fieldRow(label, value, selected, columns, required = false) {
9756
9756
  }
9757
9757
  function computeSettingsWindow(maxRows, totalRows, errorReason) {
9758
9758
  if (maxRows === void 0) return SETTINGS_WINDOW;
9759
- const errorLines = errorReason === void 0 ? 0 : errorReason === EMPTY_TABLE_REASON2 ? 1 : 2;
9759
+ let errorLines = 0;
9760
+ if (errorReason === EMPTY_TABLE_REASON2) {
9761
+ errorLines = 1;
9762
+ } else if (errorReason !== void 0) {
9763
+ errorLines = 2;
9764
+ }
9760
9765
  const fixedOverhead = 2 + errorLines;
9761
9766
  const available = Math.max(1, maxRows - fixedOverhead);
9762
9767
  if (totalRows <= available) {
@@ -9776,7 +9781,12 @@ function SettingsPane({
9776
9781
  const { columns } = useWindowSize5();
9777
9782
  const width = columns > 0 ? columns : 80;
9778
9783
  const errorReason = updateError ?? (rows.length === 0 ? EMPTY_TABLE_REASON2 : void 0);
9779
- const footnote = onboarding === true ? ONBOARDING_FOOTNOTE : editing ? EDIT_FOOTNOTE : FOOTNOTE2;
9784
+ let footnote = FOOTNOTE2;
9785
+ if (onboarding === true) {
9786
+ footnote = ONBOARDING_FOOTNOTE;
9787
+ } else if (editing) {
9788
+ footnote = EDIT_FOOTNOTE;
9789
+ }
9780
9790
  const windowLimit = computeSettingsWindow(maxRows, rows.length, errorReason);
9781
9791
  const size = Math.min(windowLimit, rows.length);
9782
9792
  const start = rows.length <= size ? 0 : Math.min(
@@ -9802,7 +9812,7 @@ function SettingsPane({
9802
9812
  localized = row.field;
9803
9813
  }
9804
9814
  const label = row.label === void 0 ? `${row.namespace} \xB7 ${localized}` : localized;
9805
- return /* @__PURE__ */ jsx14(Box14, { width: "100%", children: /* @__PURE__ */ jsx14(Text14, { children: paintBackgroundRow(fieldRow(label, row.value, selected, width, row.required === true), "settingsCardBg", width) }) }, `${row.namespace}:${row.field}`);
9815
+ return /* @__PURE__ */ jsx14(Box14, { width: "100%", children: /* @__PURE__ */ jsx14(Text14, { children: paintBackgroundRow(fieldRow(label, row.value, selected, width, row.required === true), "settingsCardBg", width) }) }, `${row.namespace}:${row.field}:${String(absolute)}`);
9806
9816
  }),
9807
9817
  rows.length > start + size ? renderLine(`\u2026 \u8FD8\u6709 ${String(rows.length - start - size)} \u9879`, "fgDim") : null,
9808
9818
  errorReason === void 0 ? null : /* @__PURE__ */ jsxs13(Box14, { flexDirection: "column", width: "100%", children: [
@@ -12603,7 +12613,7 @@ function TuiLoop({
12603
12613
  open: settingsPaneRef.current.open,
12604
12614
  editing: settingsPaneRef.current.editing,
12605
12615
  onboarding: settingsPaneRef.current.onboarding,
12606
- editValue: settingsPaneRef.current.rows[settingsPaneRef.current.selectedIndex]?.value
12616
+ editValue: settingsPaneRef.current.rows[settingsPaneRef.current.selectedIndex]?.editValue ?? settingsPaneRef.current.rows[settingsPaneRef.current.selectedIndex]?.value
12607
12617
  },
12608
12618
  controller.getSubmitOnEnter(),
12609
12619
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crazyhappyone/dsh-tui",
3
- "version": "0.1.0-alpha.29",
3
+ "version": "0.1.0-alpha.30",
4
4
  "description": "Source-runtime launcher for the DeepSeek Harness terminal interface",
5
5
  "type": "module",
6
6
  "license": "MIT",