@agent-api/cli 0.4.15 → 0.4.16
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/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/tui/ink/app.js +13 -0
- package/package.json +1 -1
package/dist/runtime.d.ts
CHANGED
package/dist/runtime.js
CHANGED
package/dist/tui/ink/app.js
CHANGED
|
@@ -10,6 +10,7 @@ export function ChatApp({ options }) {
|
|
|
10
10
|
}
|
|
11
11
|
function AuthenticatedChatApp({ options }) {
|
|
12
12
|
const app = useApp();
|
|
13
|
+
const { stdout } = useStdout();
|
|
13
14
|
const busyRef = useRef(false);
|
|
14
15
|
const authControllerRef = useRef(null);
|
|
15
16
|
const authGateControllerRef = useRef(null);
|
|
@@ -28,6 +29,10 @@ function AuthenticatedChatApp({ options }) {
|
|
|
28
29
|
baseURL: process.env.AGENT_API_BASE_URL || defaultBaseURL,
|
|
29
30
|
profile: options.profile || "default",
|
|
30
31
|
}));
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
hideTerminalCursor(stdout);
|
|
34
|
+
return () => showTerminalCursor(stdout);
|
|
35
|
+
}, [stdout]);
|
|
31
36
|
useEffect(() => {
|
|
32
37
|
let mounted = true;
|
|
33
38
|
authGateController.check(options.profile)
|
|
@@ -97,6 +102,14 @@ function AuthenticatedChatApp({ options }) {
|
|
|
97
102
|
}
|
|
98
103
|
return _jsx(InkAuthGate, { cursorVisible: authCursorVisible, state: auth });
|
|
99
104
|
}
|
|
105
|
+
function hideTerminalCursor(stdout) {
|
|
106
|
+
if (stdout.isTTY)
|
|
107
|
+
stdout.write("\x1b[?25l");
|
|
108
|
+
}
|
|
109
|
+
function showTerminalCursor(stdout) {
|
|
110
|
+
if (stdout.isTTY)
|
|
111
|
+
stdout.write("\x1b[?25h");
|
|
112
|
+
}
|
|
100
113
|
function isAuthInputStatus(status) {
|
|
101
114
|
return status === "api_profile"
|
|
102
115
|
|| status === "api_base_url"
|