@kolisachint/hoocode-agent 0.4.5 → 0.4.7

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 (68) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/dist/core/agent-session.d.ts +1 -0
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +73 -129
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/compaction/compaction.d.ts.map +1 -1
  7. package/dist/core/compaction/compaction.js +11 -1
  8. package/dist/core/compaction/compaction.js.map +1 -1
  9. package/dist/core/export-html/template.css +1 -1
  10. package/dist/core/extensions/loader.d.ts.map +1 -1
  11. package/dist/core/extensions/loader.js +1 -0
  12. package/dist/core/extensions/loader.js.map +1 -1
  13. package/dist/core/extensions/types.d.ts +4 -0
  14. package/dist/core/extensions/types.d.ts.map +1 -1
  15. package/dist/core/extensions/types.js.map +1 -1
  16. package/dist/core/settings-defaults.d.ts +54 -0
  17. package/dist/core/settings-defaults.d.ts.map +1 -0
  18. package/dist/core/settings-defaults.js +54 -0
  19. package/dist/core/settings-defaults.js.map +1 -0
  20. package/dist/core/settings-manager.d.ts +3 -9
  21. package/dist/core/settings-manager.d.ts.map +1 -1
  22. package/dist/core/settings-manager.js +41 -45
  23. package/dist/core/settings-manager.js.map +1 -1
  24. package/dist/core/subagent-pool.d.ts +78 -0
  25. package/dist/core/subagent-pool.d.ts.map +1 -0
  26. package/dist/core/subagent-pool.js +222 -0
  27. package/dist/core/subagent-pool.js.map +1 -0
  28. package/dist/core/task-store.d.ts +7 -0
  29. package/dist/core/task-store.d.ts.map +1 -1
  30. package/dist/core/task-store.js +12 -0
  31. package/dist/core/task-store.js.map +1 -1
  32. package/dist/core/tools/ls.d.ts.map +1 -1
  33. package/dist/core/tools/ls.js +6 -1
  34. package/dist/core/tools/ls.js.map +1 -1
  35. package/dist/core/tools/read.d.ts.map +1 -1
  36. package/dist/core/tools/read.js.map +1 -1
  37. package/dist/core/tools/subagent.d.ts.map +1 -1
  38. package/dist/core/tools/subagent.js +3 -1
  39. package/dist/core/tools/subagent.js.map +1 -1
  40. package/dist/core/tools/write.d.ts.map +1 -1
  41. package/dist/core/tools/write.js.map +1 -1
  42. package/dist/core/wordmark.d.ts +9 -0
  43. package/dist/core/wordmark.d.ts.map +1 -0
  44. package/dist/core/wordmark.js +17 -0
  45. package/dist/core/wordmark.js.map +1 -0
  46. package/dist/init-templates.generated.d.ts.map +1 -1
  47. package/dist/init-templates.generated.js +5 -5
  48. package/dist/init-templates.generated.js.map +1 -1
  49. package/dist/main.d.ts.map +1 -1
  50. package/dist/main.js +2 -2
  51. package/dist/main.js.map +1 -1
  52. package/dist/modes/interactive/components/task-panel.d.ts +4 -3
  53. package/dist/modes/interactive/components/task-panel.d.ts.map +1 -1
  54. package/dist/modes/interactive/components/task-panel.js +6 -6
  55. package/dist/modes/interactive/components/task-panel.js.map +1 -1
  56. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  57. package/dist/modes/interactive/interactive-mode.js +20 -9
  58. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  59. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  60. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  61. package/examples/extensions/sandbox/package.json +1 -1
  62. package/examples/extensions/with-deps/package.json +1 -1
  63. package/package.json +4 -4
  64. package/templates/subagent/edit.md +5 -0
  65. package/templates/subagent/explore.md +5 -0
  66. package/templates/subagent/fix.md +5 -0
  67. package/templates/subagent/review.md +5 -0
  68. package/templates/subagent/test.md +5 -0
@@ -22,6 +22,7 @@ import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../cor
22
22
  import { SessionManager } from "../../core/session-manager.js";
23
23
  import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
24
24
  import { taskStore } from "../../core/task-store.js";
25
+ import { WORDMARK } from "../../core/wordmark.js";
25
26
  import { getChangelogPath, getNewEntries, parseChangelog } from "../../utils/changelog.js";
26
27
  import { copyToClipboard } from "../../utils/clipboard.js";
27
28
  import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
@@ -397,7 +398,10 @@ export class InteractiveMode {
397
398
  this.ui.addChild(this.headerContainer);
398
399
  // Add header with keybindings from config (unless silenced)
399
400
  if (this.options.verbose || !this.settingsManager.getQuietStartup()) {
400
- const logo = theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${this.version}`);
401
+ const termW = this.ui.terminal.columns;
402
+ const logo = termW >= 70
403
+ ? `${theme.fg("accent", WORDMARK)}\n${theme.fg("dim", `v${this.version}`)}`
404
+ : theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${this.version}`);
401
405
  // Build startup instructions using keybinding hint helpers
402
406
  const hint = (keybinding, description) => keyHint(keybinding, description);
403
407
  const expandedInstructions = [
@@ -964,7 +968,10 @@ export class InteractiveMode {
964
968
  const promptsResult = this.session.resourceLoader.getPrompts();
965
969
  const themesResult = this.session.resourceLoader.getThemes();
966
970
  const extensions = options?.extensions ??
967
- this.session.resourceLoader.getExtensions().extensions.map((extension) => ({
971
+ this.session.resourceLoader
972
+ .getExtensions()
973
+ .extensions.filter((extension) => !extension.internal)
974
+ .map((extension) => ({
968
975
  path: extension.path,
969
976
  sourceInfo: extension.sourceInfo,
970
977
  displayName: extension.displayName,
@@ -2068,7 +2075,10 @@ export class InteractiveMode {
2068
2075
  return;
2069
2076
  }
2070
2077
  if (text === "/compact" || text.startsWith("/compact ")) {
2071
- const customInstructions = text.startsWith("/compact ") ? text.slice(9).trim() : undefined;
2078
+ const prefix = "/compact ";
2079
+ const customInstructions = text.startsWith(prefix)
2080
+ ? text.slice(prefix.length).trim() || undefined
2081
+ : undefined;
2072
2082
  this.editor.setText("");
2073
2083
  await this.handleCompactCommand(customInstructions);
2074
2084
  return;
@@ -2207,6 +2217,9 @@ export class InteractiveMode {
2207
2217
  this.ui.requestRender();
2208
2218
  }
2209
2219
  else if (event.message.role === "assistant") {
2220
+ // Main agent is moving on to its next turn: retire any finished subagent
2221
+ // tasks that were kept visible after a parallel spawn.
2222
+ taskStore.retireFinished();
2210
2223
  this.streamingComponent = new AssistantMessageComponent(undefined, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel);
2211
2224
  this.streamingMessage = event.message;
2212
2225
  this.chatContainer.addChild(this.streamingComponent);
@@ -4565,12 +4578,10 @@ export class InteractiveMode {
4565
4578
  this.ui.requestRender();
4566
4579
  }
4567
4580
  async handleCompactCommand(customInstructions) {
4568
- const entries = this.sessionManager.getEntries();
4569
- const messageCount = entries.filter((e) => e.type === "message").length;
4570
- if (messageCount < 2) {
4571
- this.showWarning("Nothing to compact (no messages yet)");
4572
- return;
4573
- }
4581
+ // The session is the single source of truth for whether compaction is
4582
+ // possible (e.g. "Already compacted", "Nothing to compact (session too
4583
+ // small)"). Its specific error is surfaced via the compaction_end event,
4584
+ // so we don't pre-check here and risk a divergent message.
4574
4585
  if (this.loadingAnimation) {
4575
4586
  this.loadingAnimation.stop();
4576
4587
  this.loadingAnimation = undefined;