@robota-sdk/agent-cli 3.0.0-beta.36 → 3.0.0-beta.37
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/node/bin.cjs +40 -17
- package/dist/node/bin.js +1 -1
- package/dist/node/{chunk-ERF646KY.js → chunk-P323ORQX.js} +41 -18
- package/dist/node/index.cjs +40 -17
- package/dist/node/index.js +1 -1
- package/package.json +3 -3
package/dist/node/bin.cjs
CHANGED
|
@@ -1938,7 +1938,12 @@ function useAutocomplete(value, registry) {
|
|
|
1938
1938
|
}
|
|
1939
1939
|
};
|
|
1940
1940
|
}
|
|
1941
|
-
function InputArea({
|
|
1941
|
+
function InputArea({
|
|
1942
|
+
onSubmit,
|
|
1943
|
+
isDisabled,
|
|
1944
|
+
isAborting,
|
|
1945
|
+
registry
|
|
1946
|
+
}) {
|
|
1942
1947
|
const [value, setValue] = (0, import_react10.useState)("");
|
|
1943
1948
|
const pasteStore = (0, import_react10.useRef)(/* @__PURE__ */ new Map());
|
|
1944
1949
|
const pasteIdRef = (0, import_react10.useRef)(0);
|
|
@@ -2019,19 +2024,27 @@ function InputArea({ onSubmit, isDisabled, registry }) {
|
|
|
2019
2024
|
isSubcommandMode
|
|
2020
2025
|
}
|
|
2021
2026
|
),
|
|
2022
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2027
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2028
|
+
import_ink7.Box,
|
|
2029
|
+
{
|
|
2030
|
+
borderStyle: "single",
|
|
2031
|
+
borderColor: isAborting ? "yellow" : isDisabled ? "gray" : "green",
|
|
2032
|
+
paddingLeft: 1,
|
|
2033
|
+
children: isDisabled ? isAborting ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ink7.Text, { color: "yellow", children: " Interrupting..." }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(WaveText, { text: " Waiting for response... (ESC to interrupt)" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ink7.Box, { children: [
|
|
2034
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ink7.Text, { color: "green", bold: true, children: "> " }),
|
|
2035
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2036
|
+
CjkTextInput,
|
|
2037
|
+
{
|
|
2038
|
+
value,
|
|
2039
|
+
onChange: setValue,
|
|
2040
|
+
onSubmit: handleSubmit,
|
|
2041
|
+
onPaste: handlePaste,
|
|
2042
|
+
placeholder: "Type a message or /help"
|
|
2043
|
+
}
|
|
2044
|
+
)
|
|
2045
|
+
] })
|
|
2046
|
+
}
|
|
2047
|
+
)
|
|
2035
2048
|
] });
|
|
2036
2049
|
}
|
|
2037
2050
|
|
|
@@ -2679,6 +2692,7 @@ function App(props) {
|
|
|
2679
2692
|
const pendingModelChangeRef = (0, import_react16.useRef)(null);
|
|
2680
2693
|
const [pendingModelId, setPendingModelId] = (0, import_react16.useState)(null);
|
|
2681
2694
|
const [showPluginTUI, setShowPluginTUI] = (0, import_react16.useState)(false);
|
|
2695
|
+
const [isAborting, setIsAborting] = (0, import_react16.useState)(false);
|
|
2682
2696
|
const pluginCallbacks = usePluginCallbacks(props.cwd ?? process.cwd());
|
|
2683
2697
|
const handleSlashCommand = useSlashCommands(
|
|
2684
2698
|
session,
|
|
@@ -2702,11 +2716,16 @@ function App(props) {
|
|
|
2702
2716
|
);
|
|
2703
2717
|
(0, import_ink13.useInput)(
|
|
2704
2718
|
(_input, key) => {
|
|
2705
|
-
if (key.
|
|
2706
|
-
|
|
2719
|
+
if (key.escape && isThinking) {
|
|
2720
|
+
setIsAborting(true);
|
|
2721
|
+
session.abort();
|
|
2722
|
+
}
|
|
2707
2723
|
},
|
|
2708
2724
|
{ isActive: !permissionRequest && !showPluginTUI }
|
|
2709
2725
|
);
|
|
2726
|
+
(0, import_react16.useEffect)(() => {
|
|
2727
|
+
if (!isThinking) setIsAborting(false);
|
|
2728
|
+
}, [isThinking]);
|
|
2710
2729
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_ink13.Box, { flexDirection: "column", children: [
|
|
2711
2730
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_ink13.Box, { flexDirection: "column", paddingX: 1, marginBottom: 1, children: [
|
|
2712
2731
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ink13.Text, { color: "cyan", bold: true, children: `
|
|
@@ -2782,6 +2801,7 @@ function App(props) {
|
|
|
2782
2801
|
{
|
|
2783
2802
|
onSubmit: handleSubmit,
|
|
2784
2803
|
isDisabled: isThinking || !!permissionRequest || showPluginTUI,
|
|
2804
|
+
isAborting,
|
|
2785
2805
|
registry
|
|
2786
2806
|
}
|
|
2787
2807
|
),
|
|
@@ -2804,12 +2824,15 @@ function renderApp(options) {
|
|
|
2804
2824
|
const instance = (0, import_ink14.render)(/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(App, { ...options }), {
|
|
2805
2825
|
exitOnCtrlC: true
|
|
2806
2826
|
});
|
|
2807
|
-
instance.waitUntilExit().
|
|
2827
|
+
instance.waitUntilExit().then(() => {
|
|
2828
|
+
process.exit(0);
|
|
2829
|
+
}).catch((err) => {
|
|
2808
2830
|
if (err) {
|
|
2809
2831
|
process.stderr.write(`
|
|
2810
2832
|
[EXIT ERROR] ${err}
|
|
2811
2833
|
`);
|
|
2812
2834
|
}
|
|
2835
|
+
process.exit(1);
|
|
2813
2836
|
});
|
|
2814
2837
|
}
|
|
2815
2838
|
|
package/dist/node/bin.js
CHANGED
|
@@ -149,7 +149,7 @@ var PrintTerminal = class {
|
|
|
149
149
|
import { render } from "ink";
|
|
150
150
|
|
|
151
151
|
// src/ui/App.tsx
|
|
152
|
-
import { useState as useState10, useRef as useRef8 } from "react";
|
|
152
|
+
import { useState as useState10, useRef as useRef8, useEffect as useEffect3 } from "react";
|
|
153
153
|
import { Box as Box11, Text as Text13, useApp, useInput as useInput7 } from "ink";
|
|
154
154
|
import { getModelName } from "@robota-sdk/agent-core";
|
|
155
155
|
import { createSystemMessage as createSystemMessage3 } from "@robota-sdk/agent-core";
|
|
@@ -1935,7 +1935,12 @@ function useAutocomplete(value, registry) {
|
|
|
1935
1935
|
}
|
|
1936
1936
|
};
|
|
1937
1937
|
}
|
|
1938
|
-
function InputArea({
|
|
1938
|
+
function InputArea({
|
|
1939
|
+
onSubmit,
|
|
1940
|
+
isDisabled,
|
|
1941
|
+
isAborting,
|
|
1942
|
+
registry
|
|
1943
|
+
}) {
|
|
1939
1944
|
const [value, setValue] = useState5("");
|
|
1940
1945
|
const pasteStore = useRef4(/* @__PURE__ */ new Map());
|
|
1941
1946
|
const pasteIdRef = useRef4(0);
|
|
@@ -2016,19 +2021,27 @@ function InputArea({ onSubmit, isDisabled, registry }) {
|
|
|
2016
2021
|
isSubcommandMode
|
|
2017
2022
|
}
|
|
2018
2023
|
),
|
|
2019
|
-
/* @__PURE__ */ jsx6(
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2024
|
+
/* @__PURE__ */ jsx6(
|
|
2025
|
+
Box5,
|
|
2026
|
+
{
|
|
2027
|
+
borderStyle: "single",
|
|
2028
|
+
borderColor: isAborting ? "yellow" : isDisabled ? "gray" : "green",
|
|
2029
|
+
paddingLeft: 1,
|
|
2030
|
+
children: isDisabled ? isAborting ? /* @__PURE__ */ jsx6(Text7, { color: "yellow", children: " Interrupting..." }) : /* @__PURE__ */ jsx6(WaveText, { text: " Waiting for response... (ESC to interrupt)" }) : /* @__PURE__ */ jsxs5(Box5, { children: [
|
|
2031
|
+
/* @__PURE__ */ jsx6(Text7, { color: "green", bold: true, children: "> " }),
|
|
2032
|
+
/* @__PURE__ */ jsx6(
|
|
2033
|
+
CjkTextInput,
|
|
2034
|
+
{
|
|
2035
|
+
value,
|
|
2036
|
+
onChange: setValue,
|
|
2037
|
+
onSubmit: handleSubmit,
|
|
2038
|
+
onPaste: handlePaste,
|
|
2039
|
+
placeholder: "Type a message or /help"
|
|
2040
|
+
}
|
|
2041
|
+
)
|
|
2042
|
+
] })
|
|
2043
|
+
}
|
|
2044
|
+
)
|
|
2032
2045
|
] });
|
|
2033
2046
|
}
|
|
2034
2047
|
|
|
@@ -2676,6 +2689,7 @@ function App(props) {
|
|
|
2676
2689
|
const pendingModelChangeRef = useRef8(null);
|
|
2677
2690
|
const [pendingModelId, setPendingModelId] = useState10(null);
|
|
2678
2691
|
const [showPluginTUI, setShowPluginTUI] = useState10(false);
|
|
2692
|
+
const [isAborting, setIsAborting] = useState10(false);
|
|
2679
2693
|
const pluginCallbacks = usePluginCallbacks(props.cwd ?? process.cwd());
|
|
2680
2694
|
const handleSlashCommand = useSlashCommands(
|
|
2681
2695
|
session,
|
|
@@ -2699,11 +2713,16 @@ function App(props) {
|
|
|
2699
2713
|
);
|
|
2700
2714
|
useInput7(
|
|
2701
2715
|
(_input, key) => {
|
|
2702
|
-
if (key.
|
|
2703
|
-
|
|
2716
|
+
if (key.escape && isThinking) {
|
|
2717
|
+
setIsAborting(true);
|
|
2718
|
+
session.abort();
|
|
2719
|
+
}
|
|
2704
2720
|
},
|
|
2705
2721
|
{ isActive: !permissionRequest && !showPluginTUI }
|
|
2706
2722
|
);
|
|
2723
|
+
useEffect3(() => {
|
|
2724
|
+
if (!isThinking) setIsAborting(false);
|
|
2725
|
+
}, [isThinking]);
|
|
2707
2726
|
return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
|
|
2708
2727
|
/* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", paddingX: 1, marginBottom: 1, children: [
|
|
2709
2728
|
/* @__PURE__ */ jsx13(Text13, { color: "cyan", bold: true, children: `
|
|
@@ -2779,6 +2798,7 @@ function App(props) {
|
|
|
2779
2798
|
{
|
|
2780
2799
|
onSubmit: handleSubmit,
|
|
2781
2800
|
isDisabled: isThinking || !!permissionRequest || showPluginTUI,
|
|
2801
|
+
isAborting,
|
|
2782
2802
|
registry
|
|
2783
2803
|
}
|
|
2784
2804
|
),
|
|
@@ -2801,12 +2821,15 @@ function renderApp(options) {
|
|
|
2801
2821
|
const instance = render(/* @__PURE__ */ jsx14(App, { ...options }), {
|
|
2802
2822
|
exitOnCtrlC: true
|
|
2803
2823
|
});
|
|
2804
|
-
instance.waitUntilExit().
|
|
2824
|
+
instance.waitUntilExit().then(() => {
|
|
2825
|
+
process.exit(0);
|
|
2826
|
+
}).catch((err) => {
|
|
2805
2827
|
if (err) {
|
|
2806
2828
|
process.stderr.write(`
|
|
2807
2829
|
[EXIT ERROR] ${err}
|
|
2808
2830
|
`);
|
|
2809
2831
|
}
|
|
2832
|
+
process.exit(1);
|
|
2810
2833
|
});
|
|
2811
2834
|
}
|
|
2812
2835
|
|
package/dist/node/index.cjs
CHANGED
|
@@ -1954,7 +1954,12 @@ function useAutocomplete(value, registry) {
|
|
|
1954
1954
|
}
|
|
1955
1955
|
};
|
|
1956
1956
|
}
|
|
1957
|
-
function InputArea({
|
|
1957
|
+
function InputArea({
|
|
1958
|
+
onSubmit,
|
|
1959
|
+
isDisabled,
|
|
1960
|
+
isAborting,
|
|
1961
|
+
registry
|
|
1962
|
+
}) {
|
|
1958
1963
|
const [value, setValue] = (0, import_react10.useState)("");
|
|
1959
1964
|
const pasteStore = (0, import_react10.useRef)(/* @__PURE__ */ new Map());
|
|
1960
1965
|
const pasteIdRef = (0, import_react10.useRef)(0);
|
|
@@ -2035,19 +2040,27 @@ function InputArea({ onSubmit, isDisabled, registry }) {
|
|
|
2035
2040
|
isSubcommandMode
|
|
2036
2041
|
}
|
|
2037
2042
|
),
|
|
2038
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2043
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2044
|
+
import_ink7.Box,
|
|
2045
|
+
{
|
|
2046
|
+
borderStyle: "single",
|
|
2047
|
+
borderColor: isAborting ? "yellow" : isDisabled ? "gray" : "green",
|
|
2048
|
+
paddingLeft: 1,
|
|
2049
|
+
children: isDisabled ? isAborting ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ink7.Text, { color: "yellow", children: " Interrupting..." }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(WaveText, { text: " Waiting for response... (ESC to interrupt)" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_ink7.Box, { children: [
|
|
2050
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_ink7.Text, { color: "green", bold: true, children: "> " }),
|
|
2051
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2052
|
+
CjkTextInput,
|
|
2053
|
+
{
|
|
2054
|
+
value,
|
|
2055
|
+
onChange: setValue,
|
|
2056
|
+
onSubmit: handleSubmit,
|
|
2057
|
+
onPaste: handlePaste,
|
|
2058
|
+
placeholder: "Type a message or /help"
|
|
2059
|
+
}
|
|
2060
|
+
)
|
|
2061
|
+
] })
|
|
2062
|
+
}
|
|
2063
|
+
)
|
|
2051
2064
|
] });
|
|
2052
2065
|
}
|
|
2053
2066
|
|
|
@@ -2695,6 +2708,7 @@ function App(props) {
|
|
|
2695
2708
|
const pendingModelChangeRef = (0, import_react16.useRef)(null);
|
|
2696
2709
|
const [pendingModelId, setPendingModelId] = (0, import_react16.useState)(null);
|
|
2697
2710
|
const [showPluginTUI, setShowPluginTUI] = (0, import_react16.useState)(false);
|
|
2711
|
+
const [isAborting, setIsAborting] = (0, import_react16.useState)(false);
|
|
2698
2712
|
const pluginCallbacks = usePluginCallbacks(props.cwd ?? process.cwd());
|
|
2699
2713
|
const handleSlashCommand = useSlashCommands(
|
|
2700
2714
|
session,
|
|
@@ -2718,11 +2732,16 @@ function App(props) {
|
|
|
2718
2732
|
);
|
|
2719
2733
|
(0, import_ink13.useInput)(
|
|
2720
2734
|
(_input, key) => {
|
|
2721
|
-
if (key.
|
|
2722
|
-
|
|
2735
|
+
if (key.escape && isThinking) {
|
|
2736
|
+
setIsAborting(true);
|
|
2737
|
+
session.abort();
|
|
2738
|
+
}
|
|
2723
2739
|
},
|
|
2724
2740
|
{ isActive: !permissionRequest && !showPluginTUI }
|
|
2725
2741
|
);
|
|
2742
|
+
(0, import_react16.useEffect)(() => {
|
|
2743
|
+
if (!isThinking) setIsAborting(false);
|
|
2744
|
+
}, [isThinking]);
|
|
2726
2745
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_ink13.Box, { flexDirection: "column", children: [
|
|
2727
2746
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_ink13.Box, { flexDirection: "column", paddingX: 1, marginBottom: 1, children: [
|
|
2728
2747
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_ink13.Text, { color: "cyan", bold: true, children: `
|
|
@@ -2798,6 +2817,7 @@ function App(props) {
|
|
|
2798
2817
|
{
|
|
2799
2818
|
onSubmit: handleSubmit,
|
|
2800
2819
|
isDisabled: isThinking || !!permissionRequest || showPluginTUI,
|
|
2820
|
+
isAborting,
|
|
2801
2821
|
registry
|
|
2802
2822
|
}
|
|
2803
2823
|
),
|
|
@@ -2820,12 +2840,15 @@ function renderApp(options) {
|
|
|
2820
2840
|
const instance = (0, import_ink14.render)(/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(App, { ...options }), {
|
|
2821
2841
|
exitOnCtrlC: true
|
|
2822
2842
|
});
|
|
2823
|
-
instance.waitUntilExit().
|
|
2843
|
+
instance.waitUntilExit().then(() => {
|
|
2844
|
+
process.exit(0);
|
|
2845
|
+
}).catch((err) => {
|
|
2824
2846
|
if (err) {
|
|
2825
2847
|
process.stderr.write(`
|
|
2826
2848
|
[EXIT ERROR] ${err}
|
|
2827
2849
|
`);
|
|
2828
2850
|
}
|
|
2851
|
+
process.exit(1);
|
|
2829
2852
|
});
|
|
2830
2853
|
}
|
|
2831
2854
|
|
package/dist/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robota-sdk/agent-cli",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.37",
|
|
4
4
|
"description": "AI coding assistant CLI built on Robota SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"marked-terminal": "^7.3.0",
|
|
36
36
|
"react": "19.2.4",
|
|
37
37
|
"string-width": "^8.2.0",
|
|
38
|
-
"@robota-sdk/agent-
|
|
39
|
-
"@robota-sdk/agent-
|
|
38
|
+
"@robota-sdk/agent-sdk": "3.0.0-beta.33",
|
|
39
|
+
"@robota-sdk/agent-core": "3.0.0-beta.33"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/marked": "^6.0.0",
|