pi-goosedump 0.12.34 → 0.12.35

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 (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.ts +19 -29
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -56,7 +56,7 @@ Use each tool's schema for full options. Typical flow:
56
56
  | `/goose-sessions` | List, resume, or delete project sessions |
57
57
  | `/goose-forget [id\|provider:id]` | Forget stored memory |
58
58
  | `/goose-memory-status` | Show memory storage and indexing status |
59
- | `/goose-settings` | Edit global and project compaction settings |
59
+ | `/goose-settings` | Edit project compaction settings |
60
60
 
61
61
  Resume is available only for Pi sessions.
62
62
 
package/dist/index.ts CHANGED
@@ -1768,23 +1768,20 @@ async function runSettingsEditor(ctx) {
1768
1768
  ];
1769
1769
  const helpRows = [
1770
1770
  ["Tab", "Next tab"],
1771
- ["Shift+Tab / S", "Switch scope in Settings"],
1772
1771
  ["↑ / ↓", "Select setting"],
1773
1772
  ["Enter", "Edit setting or submit value"],
1774
1773
  ["Esc", "Cancel edit or close"],
1775
1774
  ["Ctrl+C", "Close"],
1776
- ["Empty + Enter", "Use the Global value in Project scope"]
1775
+ ["Empty + Enter", "Clear project setting (inherit global value)"]
1777
1776
  ];
1778
1777
  await ctx.ui.custom((tui, theme, _kb, done) => {
1779
1778
  let tab = "settings";
1780
- let scope = projectTrusted ? "project" : "global";
1781
1779
  let selectedSetting = 0;
1782
1780
  let editor;
1783
1781
  let globalSettings = { ...DEFAULT_GOOSEDUMP_SETTINGS };
1784
1782
  let projectSettings = {};
1785
- function settingLabel(editScope, key) {
1786
- const scopeLabel = editScope === "global" ? "Global" : "Project";
1787
- return `${scopeLabel} ${key}`;
1783
+ function settingLabel(key) {
1784
+ return `Project ${key}`;
1788
1785
  }
1789
1786
  function reloadSettings() {
1790
1787
  globalSettings = readScopedGoosedumpSettings(location, "global");
@@ -1814,12 +1811,15 @@ async function runSettingsEditor(ctx) {
1814
1811
  const spec = specs[selectedSetting];
1815
1812
  if (!spec)
1816
1813
  return;
1817
- const editScope = scope;
1818
- const currentValue = editScope === "global" ? globalSettings[spec.key] : projectSettings[spec.key] ?? null;
1819
- editor = new NumberInputSubmenu(settingLabel(editScope, spec.key), currentValue, (value) => {
1814
+ if (!projectTrusted) {
1815
+ ctx.ui.notify("Project settings require a trusted project", "warning");
1816
+ return;
1817
+ }
1818
+ const currentValue = projectSettings[spec.key] ?? null;
1819
+ editor = new NumberInputSubmenu(settingLabel(spec.key), currentValue, (value) => {
1820
1820
  try {
1821
- writeScopedGoosedumpSetting(location, editScope, spec.key, value);
1822
- ctx.ui.notify(`${settingLabel(editScope, spec.key)} = ${spec.key === "turnsBeforeCompact" ? formatCompactSetting(value) : value}`, "info");
1821
+ writeScopedGoosedumpSetting(location, "project", spec.key, value);
1822
+ ctx.ui.notify(`${settingLabel(spec.key)} = ${spec.key === "turnsBeforeCompact" ? formatCompactSetting(value) : value}`, "info");
1823
1823
  finishEdit();
1824
1824
  } catch (error) {
1825
1825
  reportSettingsError(error);
@@ -1830,15 +1830,15 @@ async function runSettingsEditor(ctx) {
1830
1830
  }, {
1831
1831
  min: spec.min,
1832
1832
  max: spec.max,
1833
- onClear: editScope === "project" ? () => {
1833
+ onClear: () => {
1834
1834
  try {
1835
- clearScopedGoosedumpSetting(location, editScope, spec.key);
1836
- ctx.ui.notify(`${settingLabel(editScope, spec.key)} inherits Global`, "info");
1835
+ clearScopedGoosedumpSetting(location, "project", spec.key);
1836
+ ctx.ui.notify(`${settingLabel(spec.key)} inherits Global`, "info");
1837
1837
  finishEdit();
1838
1838
  } catch (error) {
1839
1839
  reportSettingsError(error);
1840
1840
  }
1841
- } : undefined,
1841
+ },
1842
1842
  onInvalid: (message) => ctx.ui.notify(message, "error")
1843
1843
  });
1844
1844
  }
@@ -1856,7 +1856,7 @@ async function runSettingsEditor(ctx) {
1856
1856
  return `${clipped}${" ".repeat(Math.max(0, cellWidth - visibleWidth(clipped)))}`;
1857
1857
  };
1858
1858
  const tabLabel = (label, active) => active ? accent(theme.bold(`[${label}]`)) : theme.fg("muted", label);
1859
- const tabs = `${tabLabel("Settings", tab === "settings")} ${tabLabel("Help", tab === "help")}${dim(` · Scope: ${scope === "project" ? "Project" : "Global"}`)}`;
1859
+ const tabs = `${tabLabel("Settings", tab === "settings")} ${tabLabel("Help", tab === "help")}`;
1860
1860
  const content = [tabs, ""];
1861
1861
  if (editor) {
1862
1862
  content.push(...editor.render(innerW));
@@ -1867,8 +1867,8 @@ async function runSettingsEditor(ctx) {
1867
1867
  } else {
1868
1868
  for (const [index, spec] of specs.entries()) {
1869
1869
  const selected = index === selectedSetting;
1870
- const inherited = scope === "project" && projectSettings[spec.key] === undefined;
1871
- const value = scope === "global" ? globalSettings[spec.key] : projectSettings[spec.key] ?? globalSettings[spec.key];
1870
+ const inherited = projectSettings[spec.key] === undefined;
1871
+ const value = projectSettings[spec.key] ?? globalSettings[spec.key];
1872
1872
  const valueText = `[ ${value} ]`;
1873
1873
  const renderedValue = inherited ? dim(valueText) : selected ? accent(valueText) : text(valueText);
1874
1874
  const cursor = selected ? accent("›") : " ";
@@ -1900,16 +1900,6 @@ async function runSettingsEditor(ctx) {
1900
1900
  tui.requestRender();
1901
1901
  return;
1902
1902
  }
1903
- if (tab === "settings" && (matchesKey(data, Key.shift(Key.tab)) || data.toLowerCase() === "s")) {
1904
- if (!projectTrusted && scope === "global") {
1905
- ctx.ui.notify("Project settings require a trusted project", "warning");
1906
- return;
1907
- }
1908
- scope = scope === "project" ? "global" : "project";
1909
- reloadSettings();
1910
- tui.requestRender();
1911
- return;
1912
- }
1913
1903
  if (matchesKey(data, Key.escape)) {
1914
1904
  done(undefined);
1915
1905
  return;
@@ -2204,7 +2194,7 @@ async function runSessionsPanel(ctx, executablePath) {
2204
2194
  sessions = cwdSessions;
2205
2195
  childrenMap = buildChildrenMap(sessions);
2206
2196
  const sessionKeys = new Set(sessions.map((s) => `${s.provider}:${s.id}`));
2207
- roots = sessions.filter((s) => s.parent === null || !sessionKeys.has(`${s.provider}:${s.parent}`));
2197
+ roots = sessions.filter((s) => s.parent === null);
2208
2198
  expandedNodes = new Set([...expandedNodes].filter((key) => sessionKeys.has(key)));
2209
2199
  rebuildDisplayList();
2210
2200
  if (sessions.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-goosedump",
3
- "version": "0.12.34",
3
+ "version": "0.12.35",
4
4
  "description": "Pi extension for goosedump session search, durable memory, session management, and compaction",
5
5
  "keywords": [
6
6
  "compaction",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@earendil-works/pi-tui": "^0.82.1",
41
- "@jarkkojs/goosedump": "^0.12.34",
41
+ "@jarkkojs/goosedump": "^0.12.35",
42
42
  "@sinclair/typebox": "^0.34.49"
43
43
  },
44
44
  "devDependencies": {