u-foo 2.5.8 → 2.5.9
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/README.md +2 -0
- package/README.zh-CN.md +3 -1
- package/bin/ufoo.js +6 -1
- package/bin/ukimi.js +70 -0
- package/package.json +2 -1
- package/src/agents/activity/activityDetector.js +7 -0
- package/src/agents/launch/launcher.js +6 -5
- package/src/agents/launch/readyDetector.js +21 -0
- package/src/agents/prompts/defaultBootstrap.js +20 -3
- package/src/agents/providers/credentials/index.js +7 -0
- package/src/agents/providers/credentials/kimi.js +342 -0
- package/src/agents/providers/directAuthStatus.js +94 -0
- package/src/app/chat/commandExecutor.js +10 -5
- package/src/app/chat/commands.js +1 -0
- package/src/app/chat/dashboardView.js +1 -0
- package/src/app/chat/multiWindow/index.js +88 -46
- package/src/app/chat/multiWindow/renderer.js +57 -8
- package/src/app/cli/run.js +5 -3
- package/src/code/nativeRunner.js +57 -6
- package/src/config.js +8 -0
- package/src/orchestration/groups/validateTemplate.js +1 -1
- package/src/runtime/daemon/groupOrchestrator.js +6 -0
- package/src/runtime/daemon/index.js +12 -3
- package/src/runtime/daemon/ops.js +7 -1
- package/src/runtime/daemon/providerSessions.js +41 -2
- package/src/tools/schemaFixtures.js +1 -1
- package/src/ui/format/index.js +14 -2
- package/src/ui/ink/ChatApp.js +321 -64
- package/src/ui/ink/chatReducer.js +32 -8
- package/src/ui/runInk.js +18 -9
package/src/ui/runInk.js
CHANGED
|
@@ -18,19 +18,28 @@
|
|
|
18
18
|
* await handle.waitUntilExit();
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
// Resolve the ink.render options. patchConsole defaults ON so stray
|
|
22
|
+
// console.log/warn output is routed through Ink (rendered above the live
|
|
23
|
+
// frame) instead of punching holes through the repainted frame — direct
|
|
24
|
+
// stdout writes mid-frame are a classic cause of visible flicker/tearing.
|
|
25
|
+
function resolveInkRenderOptions(options = {}) {
|
|
26
|
+
return {
|
|
27
|
+
stdin: options.stdin || process.stdin,
|
|
28
|
+
stdout: options.stdout || process.stdout,
|
|
29
|
+
stderr: options.stderr || process.stderr,
|
|
30
|
+
exitOnCtrlC: options.exitOnCtrlC !== false,
|
|
31
|
+
patchConsole: options.patchConsole !== false,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
21
35
|
async function runInk(createRoot, options = {}) {
|
|
22
36
|
const ink = await import("ink");
|
|
23
37
|
const React = require("react");
|
|
24
38
|
const element = createRoot(React, ink);
|
|
25
39
|
if (!element) throw new Error("runInk: createRoot returned no element");
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
stdout,
|
|
30
|
-
stderr: options.stderr || process.stderr,
|
|
31
|
-
exitOnCtrlC: options.exitOnCtrlC !== false,
|
|
32
|
-
patchConsole: options.patchConsole === true,
|
|
33
|
-
});
|
|
40
|
+
const renderOptions = resolveInkRenderOptions(options);
|
|
41
|
+
const stdout = renderOptions.stdout;
|
|
42
|
+
const inst = ink.render(element, renderOptions);
|
|
34
43
|
// ink keeps the final rendered frame on screen when it unmounts (it writes
|
|
35
44
|
// the frame as plain stdout output), which leaves the TUI lingering after
|
|
36
45
|
// Ctrl+C. Clear and home the cursor on every clean exit so the shell prompt
|
|
@@ -54,4 +63,4 @@ async function runInk(createRoot, options = {}) {
|
|
|
54
63
|
};
|
|
55
64
|
}
|
|
56
65
|
|
|
57
|
-
module.exports = { runInk };
|
|
66
|
+
module.exports = { runInk, resolveInkRenderOptions };
|