@kolisachint/hoocode-agent 0.4.101 → 0.4.103
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 +11 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +8 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extension-mcp-servers.d.ts +33 -0
- package/dist/core/extension-mcp-servers.d.ts.map +1 -0
- package/dist/core/extension-mcp-servers.js +29 -0
- package/dist/core/extension-mcp-servers.js.map +1 -0
- package/dist/core/extensions/loader.d.ts +14 -0
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +37 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/plugins/hooks-bridge.d.ts +24 -0
- package/dist/core/extensions/plugins/hooks-bridge.d.ts.map +1 -0
- package/dist/core/extensions/plugins/hooks-bridge.js +171 -0
- package/dist/core/extensions/plugins/hooks-bridge.js.map +1 -0
- package/dist/core/extensions/plugins/index.d.ts +29 -0
- package/dist/core/extensions/plugins/index.d.ts.map +1 -0
- package/dist/core/extensions/plugins/index.js +109 -0
- package/dist/core/extensions/plugins/index.js.map +1 -0
- package/dist/core/extensions/plugins/manifest.d.ts +71 -0
- package/dist/core/extensions/plugins/manifest.d.ts.map +1 -0
- package/dist/core/extensions/plugins/manifest.js +109 -0
- package/dist/core/extensions/plugins/manifest.js.map +1 -0
- package/dist/core/extensions/plugins/marketplace.d.ts +57 -0
- package/dist/core/extensions/plugins/marketplace.d.ts.map +1 -0
- package/dist/core/extensions/plugins/marketplace.js +82 -0
- package/dist/core/extensions/plugins/marketplace.js.map +1 -0
- package/dist/core/extensions/runner.d.ts +8 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +10 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +4 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/keybindings.d.ts +5 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +4 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/resource-loader.d.ts +10 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +46 -1
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/scheduler.d.ts +58 -0
- package/dist/core/scheduler.d.ts.map +1 -0
- package/dist/core/scheduler.js +166 -0
- package/dist/core/scheduler.js.map +1 -0
- package/dist/extensions/core/hoo-core.d.ts +24 -0
- package/dist/extensions/core/hoo-core.d.ts.map +1 -1
- package/dist/extensions/core/hoo-core.js +411 -2
- package/dist/extensions/core/hoo-core.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +7 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +42 -1
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/voice-transcribe.d.ts +33 -0
- package/dist/modes/interactive/voice-transcribe.d.ts.map +1 -0
- package/dist/modes/interactive/voice-transcribe.js +73 -0
- package/dist/modes/interactive/voice-transcribe.js.map +1 -0
- 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
|
@@ -9,7 +9,7 @@ import * as path from "node:path";
|
|
|
9
9
|
import { getProviders, } from "@kolisachint/hoocode-ai";
|
|
10
10
|
import { CombinedAutocompleteProvider, Container, fuzzyFilter, getCapabilities, hyperlink, Loader, Markdown, matchesKey, ProcessTerminal, Spacer, setKeybindings, Text, TruncatedText, TUI, } from "@kolisachint/hoocode-tui";
|
|
11
11
|
import { spawn, spawnSync } from "child_process";
|
|
12
|
-
import { APP_NAME, APP_TITLE, getAgentDir, getAuthPath, getDocsPath, VERSION } from "../../config.js";
|
|
12
|
+
import { APP_NAME, APP_TITLE, getAgentDir, getAuthPath, getDocsPath, resolveVoicetoolsBin, VERSION, } from "../../config.js";
|
|
13
13
|
import { parseSkillBlock } from "../../core/agent-session.js";
|
|
14
14
|
import { FooterDataProvider } from "../../core/footer-data-provider.js";
|
|
15
15
|
import { KeybindingsManager } from "../../core/keybindings.js";
|
|
@@ -60,6 +60,7 @@ import { TreeSelectorComponent } from "./components/tree-selector.js";
|
|
|
60
60
|
import { UserMessageComponent } from "./components/user-message.js";
|
|
61
61
|
import { UserMessageSelectorComponent } from "./components/user-message-selector.js";
|
|
62
62
|
import { getAvailableThemes, getAvailableThemesWithPaths, getEditorTheme, getMarkdownTheme, getThemeByName, initTheme, onThemeChange, setRegisteredThemes, setTheme, setThemeInstance, stopThemeWatcher, Theme, theme, } from "./theme/theme.js";
|
|
63
|
+
import { startVoiceTranscribe } from "./voice-transcribe.js";
|
|
63
64
|
function isExpandable(obj) {
|
|
64
65
|
return typeof obj === "object" && obj !== null && "setExpanded" in obj && typeof obj.setExpanded === "function";
|
|
65
66
|
}
|
|
@@ -114,6 +115,7 @@ export class InteractiveMode {
|
|
|
114
115
|
defaultEditor;
|
|
115
116
|
editor;
|
|
116
117
|
editorComponentFactory;
|
|
118
|
+
voiceSession;
|
|
117
119
|
autocompleteProvider;
|
|
118
120
|
autocompleteProviderWrappers = [];
|
|
119
121
|
fdPath;
|
|
@@ -2081,6 +2083,7 @@ export class InteractiveMode {
|
|
|
2081
2083
|
});
|
|
2082
2084
|
this.defaultEditor.onAction("app.team.focus", () => this.enterTeamFocus());
|
|
2083
2085
|
this.defaultEditor.onAction("app.editor.external", () => this.openExternalEditor());
|
|
2086
|
+
this.defaultEditor.onAction("app.input.voiceTranscribe", () => this.toggleVoiceTranscribe());
|
|
2084
2087
|
this.defaultEditor.onAction("app.message.followUp", () => this.handleFollowUp());
|
|
2085
2088
|
this.defaultEditor.onAction("app.message.dequeue", () => this.handleDequeue());
|
|
2086
2089
|
this.defaultEditor.onAction("app.session.new", () => this.commandExecutor.handleClear());
|
|
@@ -2756,6 +2759,40 @@ export class InteractiveMode {
|
|
|
2756
2759
|
* If multiple status messages are emitted back-to-back (without anything else being added to the chat),
|
|
2757
2760
|
* we update the previous status line instead of appending new ones to avoid log spam.
|
|
2758
2761
|
*/
|
|
2762
|
+
/**
|
|
2763
|
+
* Toggle voice-to-text capture. First press spawns `voicetools`, streams
|
|
2764
|
+
* decoded segments into the editor via bracketed paste, and reports state
|
|
2765
|
+
* through the status line. Pressing the shortcut again stops early.
|
|
2766
|
+
*/
|
|
2767
|
+
toggleVoiceTranscribe() {
|
|
2768
|
+
if (this.voiceSession?.running) {
|
|
2769
|
+
this.voiceSession.stop();
|
|
2770
|
+
this.voiceSession = undefined;
|
|
2771
|
+
this.showStatus("Voice input cancelled");
|
|
2772
|
+
return;
|
|
2773
|
+
}
|
|
2774
|
+
const statusLabels = {
|
|
2775
|
+
recording: "Recording... speak now (press again to cancel)",
|
|
2776
|
+
transcribing: "Transcribing...",
|
|
2777
|
+
done: "Voice input done",
|
|
2778
|
+
};
|
|
2779
|
+
this.voiceSession = startVoiceTranscribe(resolveVoicetoolsBin(), {
|
|
2780
|
+
onStatus: (status) => {
|
|
2781
|
+
this.showStatus(statusLabels[status] ?? status);
|
|
2782
|
+
if (status === "done") {
|
|
2783
|
+
this.voiceSession = undefined;
|
|
2784
|
+
}
|
|
2785
|
+
},
|
|
2786
|
+
onSegment: (text) => {
|
|
2787
|
+
// Inject via bracketed paste so the editor treats it as pasted text.
|
|
2788
|
+
this.editor.handleInput(`\x1b[200~${text} \x1b[201~`);
|
|
2789
|
+
},
|
|
2790
|
+
onError: (message) => {
|
|
2791
|
+
this.voiceSession = undefined;
|
|
2792
|
+
this.showError(`Voice input failed: ${message}`);
|
|
2793
|
+
},
|
|
2794
|
+
});
|
|
2795
|
+
}
|
|
2759
2796
|
showStatus(message) {
|
|
2760
2797
|
const children = this.chatContainer.children;
|
|
2761
2798
|
const last = children.length > 0 ? children[children.length - 1] : undefined;
|
|
@@ -4430,6 +4467,10 @@ export class InteractiveMode {
|
|
|
4430
4467
|
}
|
|
4431
4468
|
stop() {
|
|
4432
4469
|
this.unregisterSignalHandlers();
|
|
4470
|
+
if (this.voiceSession?.running) {
|
|
4471
|
+
this.voiceSession.stop();
|
|
4472
|
+
this.voiceSession = undefined;
|
|
4473
|
+
}
|
|
4433
4474
|
if (this.settingsManager.getShowTerminalProgress()) {
|
|
4434
4475
|
this.ui.terminal.setProgress(false);
|
|
4435
4476
|
}
|