@kolisachint/hoocode-agent 0.5.7 → 0.5.8

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 (43) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist/{modes/interactive → core}/brand.d.ts +6 -0
  3. package/dist/core/brand.d.ts.map +1 -0
  4. package/dist/{modes/interactive → core}/brand.js +6 -0
  5. package/dist/core/brand.js.map +1 -0
  6. package/dist/core/extensions/plugins/listing.d.ts +34 -0
  7. package/dist/core/extensions/plugins/listing.d.ts.map +1 -0
  8. package/dist/core/extensions/plugins/listing.js +69 -0
  9. package/dist/core/extensions/plugins/listing.js.map +1 -0
  10. package/dist/core/extensions/types.d.ts +9 -0
  11. package/dist/core/extensions/types.d.ts.map +1 -1
  12. package/dist/core/extensions/types.js.map +1 -1
  13. package/dist/core/format-list.d.ts +101 -0
  14. package/dist/core/format-list.d.ts.map +1 -0
  15. package/dist/core/format-list.js +171 -0
  16. package/dist/core/format-list.js.map +1 -0
  17. package/dist/core/skills.d.ts +9 -0
  18. package/dist/core/skills.d.ts.map +1 -1
  19. package/dist/core/skills.js +9 -0
  20. package/dist/core/skills.js.map +1 -1
  21. package/dist/core/tools/plugins.d.ts.map +1 -1
  22. package/dist/core/tools/plugins.js +93 -28
  23. package/dist/core/tools/plugins.js.map +1 -1
  24. package/dist/extensions/core/marketplace.d.ts.map +1 -1
  25. package/dist/extensions/core/marketplace.js +61 -13
  26. package/dist/extensions/core/marketplace.js.map +1 -1
  27. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  28. package/dist/modes/interactive/components/footer.js +1 -1
  29. package/dist/modes/interactive/components/footer.js.map +1 -1
  30. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  31. package/dist/modes/interactive/interactive-mode.js +24 -3
  32. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  33. package/dist/modes/interactive/resource-display.d.ts +2 -0
  34. package/dist/modes/interactive/resource-display.d.ts.map +1 -1
  35. package/dist/modes/interactive/resource-display.js +10 -7
  36. package/dist/modes/interactive/resource-display.js.map +1 -1
  37. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  38. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  39. package/examples/extensions/sandbox/package.json +1 -1
  40. package/examples/extensions/with-deps/package.json +1 -1
  41. package/package.json +4 -4
  42. package/dist/modes/interactive/brand.d.ts.map +0 -1
  43. package/dist/modes/interactive/brand.js.map +0 -1
@@ -13,6 +13,7 @@ import { APP_NAME, APP_TITLE, VERSION } from "../../config.js";
13
13
  import { loadAgentRegistry } from "../../core/agent-registry.js";
14
14
  import { parseSkillBlock } from "../../core/agent-session.js";
15
15
  import { sumAssistantUsage } from "../../core/agent-session-stats.js";
16
+ import { SEGMENT_SEP } from "../../core/brand.js";
16
17
  import { FooterDataProvider } from "../../core/footer-data-provider.js";
17
18
  import { formatDurationSecs } from "../../core/format-duration.js";
18
19
  import { formatTokens } from "../../core/format-tokens.js";
@@ -30,7 +31,6 @@ import { killTrackedDetachedChildren } from "../../utils/shell.js";
30
31
  import { ensureTool } from "../../utils/tools-manager.js";
31
32
  import { checkForNewHooCodeVersion } from "../../utils/version-check.js";
32
33
  import { BashExecutionController } from "./bash-execution-controller.js";
33
- import { SEGMENT_SEP } from "./brand.js";
34
34
  import { CommandExecutor } from "./command-executor.js";
35
35
  import { BELL, CompletionChime } from "./completion-chime.js";
36
36
  import { AssistantMessageComponent } from "./components/assistant-message.js";
@@ -124,6 +124,19 @@ function throttled(ms, fn) {
124
124
  run();
125
125
  };
126
126
  }
127
+ /**
128
+ * Style a status/notify message for the chat.
129
+ *
130
+ * Plain messages are dimmed, as they always were. A message that already
131
+ * carries escape codes is passed through untouched: `theme.fg` closes with
132
+ * `\x1b[39m` (reset foreground, not "restore"), so wrapping a pre-styled string
133
+ * in dim would drop the dim at the first inner span — and the TUI's wrapper
134
+ * carries that reset state across newlines, so every following line would lose
135
+ * it too. Passing through is what lets a listing colour its own columns.
136
+ */
137
+ function styleStatusMessage(message) {
138
+ return message.includes("\x1b[") ? message : theme.fg("dim", message);
139
+ }
127
140
  export class InteractiveMode {
128
141
  options;
129
142
  runtimeHost;
@@ -848,6 +861,7 @@ export class InteractiveMode {
848
861
  }
849
862
  },
850
863
  getStateLine: () => this.buildSessionStateLine(),
864
+ getColumns: () => this.ui.terminal.columns,
851
865
  quietStartup: () => this.settingsManager.getQuietStartup(),
852
866
  verbose: this.options.verbose ?? false,
853
867
  isExpanded: () => this.getStartupExpansionState(),
@@ -1194,6 +1208,9 @@ export class InteractiveMode {
1194
1208
  * Create the ExtensionUIContext for extensions.
1195
1209
  */
1196
1210
  createExtensionUIContext() {
1211
+ // Captured for the `columns` getter: `this` inside a getter on the object
1212
+ // literal below would be the literal, not the mode.
1213
+ const tui = this.ui;
1197
1214
  return {
1198
1215
  select: (title, options, opts) => this.dialogs.showSelector(title, options, opts),
1199
1216
  confirm: (title, message, opts) => this.dialogs.confirm(title, message, opts),
@@ -1205,6 +1222,10 @@ export class InteractiveMode {
1205
1222
  return this.dialogs.showAskOptions(questions, opts);
1206
1223
  },
1207
1224
  notify: (message, type) => this.showExtensionNotify(message, type),
1225
+ get columns() {
1226
+ // Live, not captured: the listing must reflow after a resize.
1227
+ return tui.terminal.columns;
1228
+ },
1208
1229
  onTerminalInput: (handler) => this.addExtensionTerminalInputListener(handler),
1209
1230
  setStatus: (key, text) => this.setExtensionStatus(key, text),
1210
1231
  setMode: (mode) => {
@@ -2118,12 +2139,12 @@ export class InteractiveMode {
2118
2139
  const last = children.length > 0 ? children[children.length - 1] : undefined;
2119
2140
  const secondLast = children.length > 1 ? children[children.length - 2] : undefined;
2120
2141
  if (last && secondLast && last === this.lastStatusText && secondLast === this.lastStatusSpacer) {
2121
- this.lastStatusText.setText(theme.fg("dim", message));
2142
+ this.lastStatusText.setText(styleStatusMessage(message));
2122
2143
  this.ui.requestRender();
2123
2144
  return;
2124
2145
  }
2125
2146
  const spacer = new Spacer(1);
2126
- const text = new Text(theme.fg("dim", message), 1, 0);
2147
+ const text = new Text(styleStatusMessage(message), 1, 0);
2127
2148
  this.chatContainer.addChild(spacer);
2128
2149
  this.chatContainer.addChild(text);
2129
2150
  this.lastStatusSpacer = spacer;