@robota-sdk/agent-cli 3.0.0-beta.5 → 3.0.0-beta.7
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
CHANGED
|
@@ -879,9 +879,32 @@ function StreamingIndicator({ text }) {
|
|
|
879
879
|
async function runSessionPrompt(prompt, session, addMessage, clearStreamingText, setIsThinking, setContextPercentage) {
|
|
880
880
|
setIsThinking(true);
|
|
881
881
|
clearStreamingText();
|
|
882
|
+
const historyBefore = session.getHistory().length;
|
|
882
883
|
try {
|
|
883
884
|
const response = await session.run(prompt);
|
|
884
885
|
clearStreamingText();
|
|
886
|
+
const history = session.getHistory();
|
|
887
|
+
const toolLines = [];
|
|
888
|
+
for (let i = historyBefore; i < history.length; i++) {
|
|
889
|
+
const msg = history[i];
|
|
890
|
+
if (msg.role === "assistant" && msg.toolCalls) {
|
|
891
|
+
for (const tc of msg.toolCalls) {
|
|
892
|
+
let value = "";
|
|
893
|
+
try {
|
|
894
|
+
const parsed = JSON.parse(tc.function.arguments);
|
|
895
|
+
const firstVal = Object.values(parsed)[0];
|
|
896
|
+
value = typeof firstVal === "string" ? firstVal : JSON.stringify(firstVal);
|
|
897
|
+
} catch {
|
|
898
|
+
value = tc.function.arguments;
|
|
899
|
+
}
|
|
900
|
+
const truncated = value.length > 80 ? value.slice(0, 77) + "..." : value;
|
|
901
|
+
toolLines.push(`${tc.function.name}(${truncated})`);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
if (toolLines.length > 0) {
|
|
906
|
+
addMessage({ role: "tool", content: toolLines.join("\n"), toolName: `${toolLines.length} tools` });
|
|
907
|
+
}
|
|
885
908
|
addMessage({ role: "assistant", content: response || "(empty response)" });
|
|
886
909
|
setContextPercentage(session.getContextState().usedPercentage);
|
|
887
910
|
} catch (err) {
|
package/dist/node/bin.js
CHANGED
|
@@ -862,9 +862,32 @@ function StreamingIndicator({ text }) {
|
|
|
862
862
|
async function runSessionPrompt(prompt, session, addMessage, clearStreamingText, setIsThinking, setContextPercentage) {
|
|
863
863
|
setIsThinking(true);
|
|
864
864
|
clearStreamingText();
|
|
865
|
+
const historyBefore = session.getHistory().length;
|
|
865
866
|
try {
|
|
866
867
|
const response = await session.run(prompt);
|
|
867
868
|
clearStreamingText();
|
|
869
|
+
const history = session.getHistory();
|
|
870
|
+
const toolLines = [];
|
|
871
|
+
for (let i = historyBefore; i < history.length; i++) {
|
|
872
|
+
const msg = history[i];
|
|
873
|
+
if (msg.role === "assistant" && msg.toolCalls) {
|
|
874
|
+
for (const tc of msg.toolCalls) {
|
|
875
|
+
let value = "";
|
|
876
|
+
try {
|
|
877
|
+
const parsed = JSON.parse(tc.function.arguments);
|
|
878
|
+
const firstVal = Object.values(parsed)[0];
|
|
879
|
+
value = typeof firstVal === "string" ? firstVal : JSON.stringify(firstVal);
|
|
880
|
+
} catch {
|
|
881
|
+
value = tc.function.arguments;
|
|
882
|
+
}
|
|
883
|
+
const truncated = value.length > 80 ? value.slice(0, 77) + "..." : value;
|
|
884
|
+
toolLines.push(`${tc.function.name}(${truncated})`);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
if (toolLines.length > 0) {
|
|
889
|
+
addMessage({ role: "tool", content: toolLines.join("\n"), toolName: `${toolLines.length} tools` });
|
|
890
|
+
}
|
|
868
891
|
addMessage({ role: "assistant", content: response || "(empty response)" });
|
|
869
892
|
setContextPercentage(session.getContextState().usedPercentage);
|
|
870
893
|
} catch (err) {
|
package/dist/node/index.cjs
CHANGED
|
@@ -895,9 +895,32 @@ function StreamingIndicator({ text }) {
|
|
|
895
895
|
async function runSessionPrompt(prompt, session, addMessage, clearStreamingText, setIsThinking, setContextPercentage) {
|
|
896
896
|
setIsThinking(true);
|
|
897
897
|
clearStreamingText();
|
|
898
|
+
const historyBefore = session.getHistory().length;
|
|
898
899
|
try {
|
|
899
900
|
const response = await session.run(prompt);
|
|
900
901
|
clearStreamingText();
|
|
902
|
+
const history = session.getHistory();
|
|
903
|
+
const toolLines = [];
|
|
904
|
+
for (let i = historyBefore; i < history.length; i++) {
|
|
905
|
+
const msg = history[i];
|
|
906
|
+
if (msg.role === "assistant" && msg.toolCalls) {
|
|
907
|
+
for (const tc of msg.toolCalls) {
|
|
908
|
+
let value = "";
|
|
909
|
+
try {
|
|
910
|
+
const parsed = JSON.parse(tc.function.arguments);
|
|
911
|
+
const firstVal = Object.values(parsed)[0];
|
|
912
|
+
value = typeof firstVal === "string" ? firstVal : JSON.stringify(firstVal);
|
|
913
|
+
} catch {
|
|
914
|
+
value = tc.function.arguments;
|
|
915
|
+
}
|
|
916
|
+
const truncated = value.length > 80 ? value.slice(0, 77) + "..." : value;
|
|
917
|
+
toolLines.push(`${tc.function.name}(${truncated})`);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
if (toolLines.length > 0) {
|
|
922
|
+
addMessage({ role: "tool", content: toolLines.join("\n"), toolName: `${toolLines.length} tools` });
|
|
923
|
+
}
|
|
901
924
|
addMessage({ role: "assistant", content: response || "(empty response)" });
|
|
902
925
|
setContextPercentage(session.getContextState().usedPercentage);
|
|
903
926
|
} catch (err) {
|
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.7",
|
|
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-core": "3.0.0-beta.
|
|
39
|
-
"@robota-sdk/agent-sdk": "3.0.0-beta.
|
|
38
|
+
"@robota-sdk/agent-core": "3.0.0-beta.7",
|
|
39
|
+
"@robota-sdk/agent-sdk": "3.0.0-beta.7"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/marked": "^6.0.0",
|