@hncode/hncode 0.6.1 → 0.6.2

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/package.json +1 -1
  2. package/src/tui.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hncode/hncode",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "hncode — A cyan-blue TUI AI coding agent with zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/tui.js CHANGED
@@ -10027,11 +10027,13 @@ export async function dispatch(cmdRaw, arg, state, cfg, session, h, submit, stdo
10027
10027
  case 'goal': {
10028
10028
  const a = raw.toLowerCase();
10029
10029
  // EVERY WRITE GOES THROUGH THE STORE the Goal tool reads, so /goal and the tool can never disagree
10030
- // about the objective. `persistState` keeps it across a restart; the tool's own set() does the same.
10030
+ // about the objective. `persist` is this function's own wrapper around `h.persistState` — `sessHost` is
10031
+ // a binding inside `startTUI` and does not exist at module level, which is what made `/goal` throw
10032
+ // `sessHost is not defined`.
10031
10033
  const applyGoal = (value, paused) => {
10032
10034
  state.objective = String(value || '');
10033
10035
  state.goalPaused = !!paused;
10034
- sessHost.persistState();
10036
+ persist();
10035
10037
  renderFrame();
10036
10038
  };
10037
10039
  if (!raw || a === 'status') {