@kolisachint/hoocode-agent 0.4.19 → 0.4.20
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 +2 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +3 -3
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/wordmark.d.ts +28 -0
- package/dist/core/wordmark.d.ts.map +1 -1
- package/dist/core/wordmark.js +28 -0
- package/dist/core/wordmark.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +19 -29
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +1 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +5 -0
- package/dist/modes/interactive/theme/theme.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/package.json +4 -4
|
@@ -24,7 +24,7 @@ import { SessionManager } from "../../core/session-manager.js";
|
|
|
24
24
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
25
25
|
import { getSubagentPool } from "../../core/subagent-pool-instance.js";
|
|
26
26
|
import { taskStore } from "../../core/task-store.js";
|
|
27
|
-
import {
|
|
27
|
+
import { buildCompactWordmark } from "../../core/wordmark.js";
|
|
28
28
|
import { getChangelogPath, getNewEntries, parseChangelog } from "../../utils/changelog.js";
|
|
29
29
|
import { copyToClipboard } from "../../utils/clipboard.js";
|
|
30
30
|
import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
|
|
@@ -85,7 +85,7 @@ function isDeadTerminalError(error) {
|
|
|
85
85
|
const code = error.code;
|
|
86
86
|
return code !== undefined && DEAD_TERMINAL_ERROR_CODES.has(code);
|
|
87
87
|
}
|
|
88
|
-
const ANTHROPIC_SUBSCRIPTION_AUTH_WARNING = "Anthropic subscription auth
|
|
88
|
+
const ANTHROPIC_SUBSCRIPTION_AUTH_WARNING = "Anthropic subscription auth: billed per token as extra usage, not plan limits.";
|
|
89
89
|
function isAnthropicSubscriptionAuthKey(apiKey) {
|
|
90
90
|
return typeof apiKey === "string" && apiKey.startsWith("sk-ant-oat");
|
|
91
91
|
}
|
|
@@ -403,13 +403,17 @@ export class InteractiveMode {
|
|
|
403
403
|
// Add header with keybindings from config (unless silenced)
|
|
404
404
|
if (this.options.verbose || !this.settingsManager.getQuietStartup()) {
|
|
405
405
|
const termW = this.ui.terminal.columns;
|
|
406
|
-
const
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
:
|
|
406
|
+
const logo = termW >= 40
|
|
407
|
+
? buildCompactWordmark({
|
|
408
|
+
appName: APP_NAME,
|
|
409
|
+
version: this.version,
|
|
410
|
+
cwd: this.formatDisplayPath(this.sessionManager.getCwd()),
|
|
411
|
+
accent: (text) => theme.fg("accent", text),
|
|
412
|
+
dim: (text) => theme.fg("dim", text),
|
|
413
|
+
muted: (text) => theme.fg("muted", text),
|
|
414
|
+
cursor: (text) => theme.blink(theme.fg("accent", text)),
|
|
415
|
+
note: () => theme.fg("dim", ` ${keyText("app.tools.expand")} more`),
|
|
416
|
+
})
|
|
413
417
|
: theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${this.version}`);
|
|
414
418
|
// Build startup instructions using keybinding hint helpers
|
|
415
419
|
const hint = (keybinding, description) => keyHint(keybinding, description);
|
|
@@ -434,20 +438,10 @@ export class InteractiveMode {
|
|
|
434
438
|
hint("app.clipboard.pasteImage", "to paste image"),
|
|
435
439
|
rawKeyHint("drop files", "to attach"),
|
|
436
440
|
].join("\n");
|
|
437
|
-
const compactInstructions = [
|
|
438
|
-
hint("app.interrupt", "interrupt"),
|
|
439
|
-
rawKeyHint(`${keyText("app.clear")}/${keyText("app.exit")}`, "clear/exit"),
|
|
440
|
-
rawKeyHint("/", "commands"),
|
|
441
|
-
rawKeyHint("!", "bash"),
|
|
442
|
-
hint("app.tools.expand", "more"),
|
|
443
|
-
].join(theme.fg("muted", " · "));
|
|
444
|
-
const compactOnboarding = theme.fg("dim", `Press ${keyText("app.tools.expand")} to show full startup help and loaded resources.`);
|
|
445
441
|
const onboarding = theme.fg("dim", `${APP_NAME} can explain its own features and look up its docs. Ask it how to use or extend ${APP_NAME}.`);
|
|
446
|
-
this.builtInHeader = new ExpandableText(() =>
|
|
442
|
+
this.builtInHeader = new ExpandableText(() => logo, () => `${logo}\n${expandedInstructions}\n\n${onboarding}`, this.getStartupExpansionState(), 1, 0);
|
|
447
443
|
// Setup UI layout
|
|
448
|
-
this.headerContainer.addChild(new Spacer(1));
|
|
449
444
|
this.headerContainer.addChild(this.builtInHeader);
|
|
450
|
-
this.headerContainer.addChild(new Spacer(1));
|
|
451
445
|
}
|
|
452
446
|
else {
|
|
453
447
|
// Minimal header when silenced
|
|
@@ -1007,6 +1001,7 @@ export class InteractiveMode {
|
|
|
1007
1001
|
}
|
|
1008
1002
|
}
|
|
1009
1003
|
if (showListing) {
|
|
1004
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
1010
1005
|
const { agentsFiles: contextFiles, warnings: contextWarnings } = this.session.resourceLoader.getAgentsFiles();
|
|
1011
1006
|
const skills = skillsResult.skills;
|
|
1012
1007
|
const templates = this.session.promptTemplates;
|
|
@@ -1021,7 +1016,6 @@ export class InteractiveMode {
|
|
|
1021
1016
|
metaItems.push("subagent_system_prompt");
|
|
1022
1017
|
}
|
|
1023
1018
|
if (totalItems > 0 && totalItems <= 5) {
|
|
1024
|
-
this.chatContainer.addChild(new Spacer(1));
|
|
1025
1019
|
const allCompactItems = [...metaItems];
|
|
1026
1020
|
if (contextFiles.length > 0) {
|
|
1027
1021
|
allCompactItems.push(...contextFiles.map((contextFile) => this.formatContextPath(contextFile.path)));
|
|
@@ -1038,14 +1032,12 @@ export class InteractiveMode {
|
|
|
1038
1032
|
if (customThemes.length > 0) {
|
|
1039
1033
|
allCompactItems.push(...customThemes.map((loadedTheme) => loadedTheme.name ?? this.getCompactPathLabel(loadedTheme.sourcePath, loadedTheme.sourceInfo)));
|
|
1040
1034
|
}
|
|
1041
|
-
|
|
1035
|
+
this.chatContainer.addChild(new Text(`${theme.fg("mdHeading", "[Resources]")} ${theme.fg("dim", allCompactItems.join(", "))}`, 0, 0));
|
|
1042
1036
|
}
|
|
1043
1037
|
else if (totalItems === 0) {
|
|
1044
|
-
this.chatContainer.addChild(new
|
|
1045
|
-
addLoadedSection("Resources", formatCompactList(metaItems), formatCompactList(metaItems));
|
|
1038
|
+
this.chatContainer.addChild(new Text(`${theme.fg("mdHeading", "[Resources]")} ${theme.fg("dim", metaItems.join(", "))}`, 0, 0));
|
|
1046
1039
|
}
|
|
1047
1040
|
else {
|
|
1048
|
-
this.chatContainer.addChild(new Spacer(1));
|
|
1049
1041
|
addLoadedSection("Resources", formatCompactList(metaItems), formatCompactList(metaItems));
|
|
1050
1042
|
if (contextFiles.length > 0) {
|
|
1051
1043
|
this.chatContainer.addChild(new Spacer(1));
|
|
@@ -1104,9 +1096,8 @@ export class InteractiveMode {
|
|
|
1104
1096
|
}
|
|
1105
1097
|
if (contextWarnings.length > 0) {
|
|
1106
1098
|
for (const warning of contextWarnings) {
|
|
1107
|
-
this.chatContainer.addChild(new Text(theme.fg("warning",
|
|
1099
|
+
this.chatContainer.addChild(new Text(theme.fg("warning", warning), 0, 0));
|
|
1108
1100
|
}
|
|
1109
|
-
this.chatContainer.addChild(new Spacer(1));
|
|
1110
1101
|
}
|
|
1111
1102
|
}
|
|
1112
1103
|
if (showDiagnostics) {
|
|
@@ -2972,8 +2963,7 @@ export class InteractiveMode {
|
|
|
2972
2963
|
this.ui.requestRender();
|
|
2973
2964
|
}
|
|
2974
2965
|
showWarning(warningMessage) {
|
|
2975
|
-
this.chatContainer.addChild(new
|
|
2976
|
-
this.chatContainer.addChild(new Text(theme.fg("warning", `Warning: ${warningMessage}`), 1, 0));
|
|
2966
|
+
this.chatContainer.addChild(new Text(theme.fg("warning", warningMessage), 1, 0));
|
|
2977
2967
|
this.ui.requestRender();
|
|
2978
2968
|
}
|
|
2979
2969
|
showNewVersionNotification(newVersion) {
|