@nanhara/hara 0.122.7 → 0.123.1
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 +40 -0
- package/README.md +22 -6
- package/dist/agent/loop.js +3 -2
- package/dist/config.js +70 -11
- package/dist/context/workspace-scope.js +4 -4
- package/dist/index.js +206 -44
- package/dist/org-fleet/enroll.js +30 -4
- package/dist/security/guardian.js +13 -5
- package/dist/security/private-state.js +3 -1
- package/dist/serve/protocol.js +2 -1
- package/dist/serve/server.js +125 -50
- package/dist/serve/sessions.js +12 -7
- package/dist/session/store.js +32 -3
- package/dist/session/task.js +161 -0
- package/dist/tui/App.js +21 -9
- package/dist/tui/InputBox.js +61 -18
- package/dist/tui/bracketed-paste.js +273 -0
- package/dist/tui/run.js +8 -2
- package/package.json +1 -1
package/dist/tui/run.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { render, Box, Text, useApp, useInput } from "ink";
|
|
5
5
|
import { createElement } from "react";
|
|
6
6
|
import { App } from "./App.js";
|
|
7
|
+
import { BracketedPasteInput, enableBracketedPaste } from "./bracketed-paste.js";
|
|
7
8
|
/** Ink 6.8 clears before repainting when a terminal gets narrower, but not when it gets wider. Install a
|
|
8
9
|
* complementary WIDTH-only clear ahead of Ink's own resize listener so Ink's normal layout pass redraws
|
|
9
10
|
* the frame immediately afterwards. Never clear on a rows-only resize: `instance.clear()` erases the
|
|
@@ -29,14 +30,19 @@ export function installResizeRepaint(out, instance) {
|
|
|
29
30
|
return () => out.off("resize", onResize);
|
|
30
31
|
}
|
|
31
32
|
export async function runTui(props) {
|
|
32
|
-
const instance = render(createElement(App, props));
|
|
33
33
|
const out = process.stdout;
|
|
34
|
-
const
|
|
34
|
+
const input = new BracketedPasteInput(process.stdin);
|
|
35
|
+
const disableBracketedPaste = enableBracketedPaste(out);
|
|
36
|
+
let removeResizeRepaint = () => { };
|
|
35
37
|
try {
|
|
38
|
+
const instance = render(createElement(App, props), { stdin: input });
|
|
39
|
+
removeResizeRepaint = installResizeRepaint(out, instance);
|
|
36
40
|
await instance.waitUntilExit();
|
|
37
41
|
}
|
|
38
42
|
finally {
|
|
39
43
|
removeResizeRepaint();
|
|
44
|
+
input.dispose();
|
|
45
|
+
disableBracketedPaste();
|
|
40
46
|
}
|
|
41
47
|
}
|
|
42
48
|
// A tiny ink yes/no prompt for pre-TUI confirms (e.g. the first-run "create AGENTS.md?" offer).
|