@kolisachint/hoocode-agent 0.4.6 → 0.4.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.
- package/CHANGELOG.md +20 -0
- package/dist/core/export-html/template.css +1 -1
- package/dist/core/footer-data-provider.d.ts +6 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +12 -0
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/lifeguard.d.ts +45 -0
- package/dist/core/lifeguard.d.ts.map +1 -0
- package/dist/core/lifeguard.js +214 -0
- package/dist/core/lifeguard.js.map +1 -0
- package/dist/core/output-verifier.d.ts +19 -0
- package/dist/core/output-verifier.d.ts.map +1 -0
- package/dist/core/output-verifier.js +110 -0
- package/dist/core/output-verifier.js.map +1 -0
- package/dist/core/resource-loader.d.ts +2 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +3 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/subagent-pool.d.ts +101 -0
- package/dist/core/subagent-pool.d.ts.map +1 -0
- package/dist/core/subagent-pool.js +398 -0
- package/dist/core/subagent-pool.js.map +1 -0
- package/dist/core/subagent.d.ts.map +1 -1
- package/dist/core/subagent.js +3 -0
- package/dist/core/subagent.js.map +1 -1
- package/dist/core/token-budget.d.ts +59 -0
- package/dist/core/token-budget.d.ts.map +1 -0
- package/dist/core/token-budget.js +161 -0
- package/dist/core/token-budget.js.map +1 -0
- package/dist/core/tools/subagent.d.ts +3 -0
- package/dist/core/tools/subagent.d.ts.map +1 -1
- package/dist/core/tools/subagent.js +23 -0
- package/dist/core/tools/subagent.js.map +1 -1
- package/dist/core/wordmark.d.ts +9 -0
- package/dist/core/wordmark.d.ts.map +1 -0
- package/dist/core/wordmark.js +17 -0
- package/dist/core/wordmark.js.map +1 -0
- package/dist/init-templates.generated.d.ts.map +1 -1
- package/dist/init-templates.generated.js +5 -5
- package/dist/init-templates.generated.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +5 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +33 -2
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/12-full-control.ts +1 -0
- package/package.json +4 -4
- package/templates/subagent/edit.md +5 -0
- package/templates/subagent/explore.md +5 -0
- package/templates/subagent/fix.md +5 -0
- package/templates/subagent/review.md +5 -0
- 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";
|
|
@@ -232,11 +233,13 @@ export class InteractiveMode {
|
|
|
232
233
|
autocompleteMaxVisible,
|
|
233
234
|
});
|
|
234
235
|
this.editor = this.defaultEditor;
|
|
236
|
+
this.editor.promptPrefix = ">";
|
|
235
237
|
this.editorContainer = new Container();
|
|
236
238
|
this.editorContainer.addChild(this.editor);
|
|
237
239
|
this.footerDataProvider = new FooterDataProvider(this.sessionManager.getCwd());
|
|
238
240
|
this.footer = new FooterComponent(this.session, this.footerDataProvider);
|
|
239
241
|
this.footer.setAutoCompactEnabled(this.session.autoCompactionEnabled);
|
|
242
|
+
this.footerDataProvider.setSubagentEnabled(this.session.getActiveToolNames().includes("subagent"));
|
|
240
243
|
this.taskPanel = new TaskPanelComponent();
|
|
241
244
|
// Load hide thinking block setting
|
|
242
245
|
this.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();
|
|
@@ -397,7 +400,10 @@ export class InteractiveMode {
|
|
|
397
400
|
this.ui.addChild(this.headerContainer);
|
|
398
401
|
// Add header with keybindings from config (unless silenced)
|
|
399
402
|
if (this.options.verbose || !this.settingsManager.getQuietStartup()) {
|
|
400
|
-
const
|
|
403
|
+
const termW = this.ui.terminal.columns;
|
|
404
|
+
const logo = termW >= 70
|
|
405
|
+
? `${theme.fg("accent", WORDMARK)}\n${theme.fg("dim", `v${this.version}`)}`
|
|
406
|
+
: theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${this.version}`);
|
|
401
407
|
// Build startup instructions using keybinding hint helpers
|
|
402
408
|
const hint = (keybinding, description) => keyHint(keybinding, description);
|
|
403
409
|
const expandedInstructions = [
|
|
@@ -1000,9 +1006,16 @@ export class InteractiveMode {
|
|
|
1000
1006
|
const loadedThemes = themesResult.themes;
|
|
1001
1007
|
const customThemes = loadedThemes.filter((t) => t.sourcePath);
|
|
1002
1008
|
const totalItems = contextFiles.length + skills.length + templates.length + extensions.length + customThemes.length;
|
|
1009
|
+
// Meta items: active mode and subagent system prompt (always shown)
|
|
1010
|
+
const metaItems = [];
|
|
1011
|
+
const rawMode = this.footerDataProvider.getActiveMode().replace(" + subagent", "");
|
|
1012
|
+
metaItems.push(`mode/${rawMode}`);
|
|
1013
|
+
if (this.footerDataProvider.getSubagentEnabled()) {
|
|
1014
|
+
metaItems.push("subagent_system_prompt");
|
|
1015
|
+
}
|
|
1003
1016
|
if (totalItems > 0 && totalItems <= 5) {
|
|
1004
1017
|
this.chatContainer.addChild(new Spacer(1));
|
|
1005
|
-
const allCompactItems = [];
|
|
1018
|
+
const allCompactItems = [...metaItems];
|
|
1006
1019
|
if (contextFiles.length > 0) {
|
|
1007
1020
|
allCompactItems.push(...contextFiles.map((contextFile) => this.formatContextPath(contextFile.path)));
|
|
1008
1021
|
}
|
|
@@ -1020,7 +1033,13 @@ export class InteractiveMode {
|
|
|
1020
1033
|
}
|
|
1021
1034
|
addLoadedSection("Resources", formatCompactList(allCompactItems), formatCompactList(allCompactItems));
|
|
1022
1035
|
}
|
|
1036
|
+
else if (totalItems === 0) {
|
|
1037
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
1038
|
+
addLoadedSection("Resources", formatCompactList(metaItems), formatCompactList(metaItems));
|
|
1039
|
+
}
|
|
1023
1040
|
else {
|
|
1041
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
1042
|
+
addLoadedSection("Resources", formatCompactList(metaItems), formatCompactList(metaItems));
|
|
1024
1043
|
if (contextFiles.length > 0) {
|
|
1025
1044
|
this.chatContainer.addChild(new Spacer(1));
|
|
1026
1045
|
const contextList = contextFiles
|
|
@@ -1951,6 +1970,7 @@ export class InteractiveMode {
|
|
|
1951
1970
|
this.isBashMode = text.trimStart().startsWith("!");
|
|
1952
1971
|
if (wasBashMode !== this.isBashMode) {
|
|
1953
1972
|
this.updateEditorBorderColor();
|
|
1973
|
+
this.updateEditorPromptPrefix();
|
|
1954
1974
|
}
|
|
1955
1975
|
};
|
|
1956
1976
|
// Handle clipboard image paste (triggered on Ctrl+V)
|
|
@@ -2810,6 +2830,17 @@ export class InteractiveMode {
|
|
|
2810
2830
|
}
|
|
2811
2831
|
this.ui.requestRender();
|
|
2812
2832
|
}
|
|
2833
|
+
updateEditorPromptPrefix() {
|
|
2834
|
+
if (this.isBashMode) {
|
|
2835
|
+
this.editor.promptPrefix = "!";
|
|
2836
|
+
this.editor.promptColor = theme.getBashModeBorderColor();
|
|
2837
|
+
}
|
|
2838
|
+
else {
|
|
2839
|
+
this.editor.promptPrefix = ">";
|
|
2840
|
+
this.editor.promptColor = (s) => s;
|
|
2841
|
+
}
|
|
2842
|
+
this.ui.requestRender();
|
|
2843
|
+
}
|
|
2813
2844
|
cycleThinkingLevel() {
|
|
2814
2845
|
const newLevel = this.session.cycleThinkingLevel();
|
|
2815
2846
|
if (newLevel === undefined) {
|