@kolisachint/hoocode-agent 0.5.58 → 0.5.59

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.59] - 2026-09-05
4
+
5
+ ### Fixed
6
+
7
+ - **`hoo`, `/new` and `/reload` now leave you looking at the same thing.** All
8
+ three rebuild the session's resources and repaint the chrome, and they did it
9
+ from two hand-kept lists, so an edit to `settings.json` reached one and not the
10
+ other: after `/reload` the footer went on promising auto-compaction that was
11
+ switched off, and the model count, the subagent indicator and the session chip
12
+ kept the state of the session before it; after `/new` a changed `theme` never
13
+ loaded at all. A theme that did load left the banner in the retired theme's
14
+ colours, on either path — a `Text` holds its string with the escapes already in
15
+ it, so invalidating it is not repainting it. One list now, applied by every
16
+ path, and the resource listing is drawn once per session change instead of
17
+ drawn and immediately wiped. `/reload` also drops the stale view-layer
18
+ references into the transcript it just replayed, the way a session swap always
19
+ has.
20
+
3
21
  ## [0.5.58] - 2026-09-04
4
22
 
5
23
  ### Changed
@@ -3,6 +3,7 @@
3
3
  * Handles TUI rendering and user interaction, delegating business logic to AgentSession.
4
4
  */
5
5
  import type { ImageContent } from "@kolisachint/hoocode-ai";
6
+ import type { Terminal } from "@kolisachint/hoocode-tui";
6
7
  import type { AgentSessionRuntime } from "../../core/agent-session-runtime.js";
7
8
  import type { TeamViewConnection } from "../../core/team-view.js";
8
9
  /**
@@ -21,6 +22,11 @@ export interface InteractiveModeOptions {
21
22
  initialMessages?: string[];
22
23
  /** Force verbose startup (overrides quietStartup setting) */
23
24
  verbose?: boolean;
25
+ /**
26
+ * Terminal the TUI draws to. Defaults to the real process terminal; tests
27
+ * pass a capturing one to mount the whole mode headlessly and screenshot it.
28
+ */
29
+ terminal?: Terminal;
24
30
  }
25
31
  export declare class InteractiveMode {
26
32
  private options;
@@ -164,19 +170,51 @@ export declare class InteractiveMode {
164
170
  */
165
171
  private getDispatchableAgentCount;
166
172
  private bindCurrentSessionExtensions;
173
+ /**
174
+ * Push the current settings and session onto the chrome: keybindings, footer,
175
+ * editor, cursor.
176
+ *
177
+ * Startup, a session swap (/new, /resume, /fork, /cd) and /reload all rebuild
178
+ * the same things from disk, so they must all repaint the same way. They used
179
+ * to do it with two hand-kept copies of this list, and the /reload copy was
180
+ * missing pieces — a `compaction.enabled` edit left the footer still
181
+ * promising auto-compaction. One list, called from both paths; the theme is
182
+ * the second half, in `applySessionTheme`.
183
+ */
167
184
  private applyRuntimeSettings;
185
+ /**
186
+ * Load the theme the settings name, and rebuild what holds colour baked in.
187
+ *
188
+ * Runs after extensions are bound (and after `session.reload()`), because a
189
+ * `resources_discover` handler can contribute the very theme directory the
190
+ * name resolves in — resolving it earlier would fall back to dark for anyone
191
+ * whose theme ships with an extension.
192
+ *
193
+ * The banner is rebuilt rather than invalidated: a `Text` holds its string
194
+ * with the escapes already in it, so invalidating only drops the line cache
195
+ * and the old theme's colours come straight back. It also names the working
196
+ * directory, which `/cd` moves.
197
+ */
198
+ private applySessionTheme;
199
+ private finishRuntimeSettings;
168
200
  private rebindCurrentSession;
169
201
  private handleFatalRuntimeError;
170
202
  /**
171
- * Reset the transcript to whatever the (possibly just-swapped) session holds.
203
+ * Drop every view-layer reference into the transcript that is about to be
204
+ * rebuilt. Shared by the session swaps and by /reload: a component that
205
+ * survives the clear is detached, so anything still pointing at it (the open
206
+ * chain the next tool call would join, the block the unfold key peels back)
207
+ * would be writing to a frame nobody renders.
208
+ */
209
+ private resetTranscriptView;
210
+ /**
211
+ * Reset the transcript to whatever the just-swapped session holds.
172
212
  *
173
- * Every caller — /new, /resume, /fork — reaches here *after* the runtime has
174
- * rebound extensions, and rebinding is what renders the loaded-resource
175
- * listing. Clearing the chat therefore wiped the listing a moment after it was
176
- * drawn, which is why /reload showed skills, agents and plugins and starting a
177
- * new session showed nothing. Re-rendering it here is what makes the surface
178
- * common: one call site, so a session change of any kind reports the same
179
- * capabilities /reload does.
213
+ * Every caller — /new, /resume, /fork, /cd, /import — reaches here after the
214
+ * runtime has rebound extensions. Drawing the listing here rather than in the
215
+ * rebind is what makes the surface common: one call site, so a session change
216
+ * of any kind reports the same capabilities /reload does, and neither path
217
+ * draws the listing twice.
180
218
  */
181
219
  private renderCurrentSessionState;
182
220
  /**