@kolisachint/hoocode-agent 0.4.151 → 0.4.153

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 (40) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/core/embsearch/embsearch-progress.d.ts +33 -0
  3. package/dist/core/embsearch/embsearch-progress.d.ts.map +1 -0
  4. package/dist/core/embsearch/embsearch-progress.js +86 -0
  5. package/dist/core/embsearch/embsearch-progress.js.map +1 -0
  6. package/dist/core/embsearch/embsearch-service.d.ts +4 -0
  7. package/dist/core/embsearch/embsearch-service.d.ts.map +1 -1
  8. package/dist/core/embsearch/embsearch-service.js +6 -1
  9. package/dist/core/embsearch/embsearch-service.js.map +1 -1
  10. package/dist/core/startup-progress.d.ts +48 -0
  11. package/dist/core/startup-progress.d.ts.map +1 -0
  12. package/dist/core/startup-progress.js +50 -0
  13. package/dist/core/startup-progress.js.map +1 -0
  14. package/dist/core/system-prompt.d.ts.map +1 -1
  15. package/dist/core/system-prompt.js +7 -0
  16. package/dist/core/system-prompt.js.map +1 -1
  17. package/dist/core/tools/bash.d.ts.map +1 -1
  18. package/dist/core/tools/bash.js +1 -1
  19. package/dist/core/tools/bash.js.map +1 -1
  20. package/dist/core/tools/grep.d.ts.map +1 -1
  21. package/dist/core/tools/grep.js +1 -1
  22. package/dist/core/tools/grep.js.map +1 -1
  23. package/dist/core/tools/search.d.ts.map +1 -1
  24. package/dist/core/tools/search.js +0 -1
  25. package/dist/core/tools/search.js.map +1 -1
  26. package/dist/main.d.ts.map +1 -1
  27. package/dist/main.js +4 -48
  28. package/dist/main.js.map +1 -1
  29. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  30. package/dist/modes/interactive/components/footer.js +44 -0
  31. package/dist/modes/interactive/components/footer.js.map +1 -1
  32. package/dist/modes/interactive/interactive-mode.d.ts +3 -0
  33. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  34. package/dist/modes/interactive/interactive-mode.js +35 -5
  35. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  36. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  37. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  38. package/examples/extensions/sandbox/package.json +1 -1
  39. package/examples/extensions/with-deps/package.json +1 -1
  40. package/package.json +4 -4
@@ -16,6 +16,7 @@ import { KeybindingsManager } from "../../core/keybindings.js";
16
16
  import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
17
17
  import { SessionManager } from "../../core/session-manager.js";
18
18
  import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
19
+ import { startupProgress } from "../../core/startup-progress.js";
19
20
  import { taskStore } from "../../core/task-store.js";
20
21
  import { buildCompactWordmark } from "../../core/wordmark.js";
21
22
  import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
@@ -165,6 +166,8 @@ export class InteractiveMode {
165
166
  unsubscribe;
166
167
  // Task store subscription unsubscribe function (task panel)
167
168
  taskStoreUnsubscribe;
169
+ // Startup-progress subscription unsubscribe function (footer download/index bars)
170
+ startupProgressUnsubscribe;
168
171
  signalCleanupHandlers = [];
169
172
  // Track if editor is in bash mode (text starts with !)
170
173
  isBashMode = false;
@@ -556,6 +559,10 @@ export class InteractiveMode {
556
559
  }
557
560
  this.chatContainer.addChild(new DynamicBorder());
558
561
  }
562
+ /** Feed a first-run tool-binary download into the footer's startup-progress line. */
563
+ reportToolDownload(key, label, receivedBytes, totalBytes) {
564
+ startupProgress.set({ key, kind: "download", label, receivedBytes, totalBytes });
565
+ }
559
566
  async init() {
560
567
  if (this.isInitialized)
561
568
  return;
@@ -569,18 +576,30 @@ export class InteractiveMode {
569
576
  // Both help — fd for autocomplete, rg for the grep tool — but neither is required
570
577
  // to start: resolving them can hit a slow or failing network in restricted
571
578
  // environments, and awaiting here froze first paint. Resolve in the background
572
- // (silently, so download notices never corrupt the TUI) and wire fd in when ready;
573
- // the grep/find tools resolve rg/fd on demand with a native fallback regardless.
579
+ // (never awaited, so a first-run download never blocks first paint) and wire fd
580
+ // in when ready; the grep/find tools resolve rg/fd on demand with a native
581
+ // fallback regardless. embsearch is intentionally NOT preloaded here: when the
582
+ // semantic index is enabled, EmbsearchService (main.ts) owns its download and
583
+ // build, reporting through the same startupProgress channel — preloading it too
584
+ // would fetch the binary twice and race.
585
+ //
586
+ // First-run download progress streams into the footer's startupProgress line
587
+ // via ensureTool's byte-count callback; the line clears when the download
588
+ // settles (path resolved) or is dropped if it fails.
574
589
  void Promise.all([
575
- ensureTool("fd", true),
576
- ensureTool("rg", true),
577
- this.settingsManager.getEnableEmbsearchTools() ? ensureTool("embsearch", true) : Promise.resolve(null),
590
+ ensureTool("fd", true, (received, total) => this.reportToolDownload("fd", "fd", received, total)),
591
+ ensureTool("rg", true, (received, total) => this.reportToolDownload("rg", "ripgrep", received, total)),
578
592
  ])
579
593
  .then(([fdPath]) => {
580
594
  this.fdPath = fdPath;
581
595
  })
582
596
  .catch(() => {
583
597
  // Non-fatal: autocomplete simply stays disabled until/unless fd resolves.
598
+ })
599
+ .finally(() => {
600
+ // Downloads settled (resolved or failed): drop any lingering bars.
601
+ startupProgress.remove("fd");
602
+ startupProgress.remove("rg");
584
603
  });
585
604
  // Add header container as first child
586
605
  this.ui.addChild(this.headerContainer);
@@ -669,6 +688,12 @@ export class InteractiveMode {
669
688
  this.taskStoreUnsubscribe = taskStore.subscribe(throttled(TASK_RENDER_THROTTLE_MS, () => {
670
689
  this.ui.requestRender();
671
690
  }));
691
+ // Re-render the footer as startup progress updates (tool downloads stream
692
+ // byte counts in bursts, the index build ticks per batch). Throttled like the
693
+ // task panel so a fast download doesn't drive a render per chunk.
694
+ this.startupProgressUnsubscribe = startupProgress.subscribe(throttled(TASK_RENDER_THROTTLE_MS, () => {
695
+ this.ui.requestRender();
696
+ }));
672
697
  // Initialize available provider count for footer display
673
698
  await this.modelController.updateAvailableProviderCount();
674
699
  }
@@ -1650,6 +1675,10 @@ export class InteractiveMode {
1650
1675
  // glanceable for the whole turn. Active tasks are kept: a follow-up/steer
1651
1676
  // message can arrive while a subagent is still running.
1652
1677
  taskStore.reset();
1678
+ // Startup progress is transient startup status: once the user starts a
1679
+ // turn, drop any lingering bars/notices (e.g. an unavailable-index line)
1680
+ // so they don't sit in the footer for the rest of the session.
1681
+ startupProgress.clear();
1653
1682
  this.chimeTurnAborted = false;
1654
1683
  this.addMessageToChat(event.message);
1655
1684
  this.messageQueue.updatePendingMessagesDisplay();
@@ -2132,6 +2161,7 @@ export class InteractiveMode {
2132
2161
  // This prevents escape sequences from leaking to the parent shell over slow SSH.
2133
2162
  await this.ui.terminal.drainInput(1000);
2134
2163
  this.taskStoreUnsubscribe?.();
2164
+ this.startupProgressUnsubscribe?.();
2135
2165
  this.teamFocus.closeAttach();
2136
2166
  this.taskPanel.dispose();
2137
2167
  this.stop();