openkitt 0.2.7 → 0.2.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/dist/cli.js +19 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -257956,7 +257956,17 @@ function formatToolError(error4) {
|
|
|
257956
257956
|
}
|
|
257957
257957
|
return String(error4);
|
|
257958
257958
|
}
|
|
257959
|
-
function toAssistantHistoryEntry(response) {
|
|
257959
|
+
function toAssistantHistoryEntry(response, provider) {
|
|
257960
|
+
if (provider === "anthropic") {
|
|
257961
|
+
const contentBlocks = [];
|
|
257962
|
+
if (response.content) {
|
|
257963
|
+
contentBlocks.push({ type: "text", text: response.content });
|
|
257964
|
+
}
|
|
257965
|
+
for (const call of response.toolCalls) {
|
|
257966
|
+
contentBlocks.push({ type: "tool_use", id: call.id, name: call.name, input: call.arguments });
|
|
257967
|
+
}
|
|
257968
|
+
return { role: "assistant", content: contentBlocks };
|
|
257969
|
+
}
|
|
257960
257970
|
const entry = {
|
|
257961
257971
|
role: "assistant",
|
|
257962
257972
|
content: response.content
|
|
@@ -258039,7 +258049,7 @@ async function executeOperations(options) {
|
|
|
258039
258049
|
if (!hasToolCalls && expectsToolCalls) {
|
|
258040
258050
|
return response.content;
|
|
258041
258051
|
}
|
|
258042
|
-
conversationHistory.push(toAssistantHistoryEntry(response));
|
|
258052
|
+
conversationHistory.push(toAssistantHistoryEntry(response, llmClient.getProvider()));
|
|
258043
258053
|
const toolResults = [];
|
|
258044
258054
|
for (const toolCall of response.toolCalls) {
|
|
258045
258055
|
const result = await executeToolCall({
|
|
@@ -265582,7 +265592,7 @@ async function helpCommand(_context, _args) {
|
|
|
265582
265592
|
// package.json
|
|
265583
265593
|
var package_default = {
|
|
265584
265594
|
name: "openkitt",
|
|
265585
|
-
version: "0.2.
|
|
265595
|
+
version: "0.2.9",
|
|
265586
265596
|
description: "AI-powered monorepo scaffolding CLI",
|
|
265587
265597
|
keywords: [
|
|
265588
265598
|
"cli",
|
|
@@ -265830,6 +265840,8 @@ async function dispatchCommand(commandLine, context) {
|
|
|
265830
265840
|
try {
|
|
265831
265841
|
await resolveAndRunHandler(route, context, parsed.args, parsed.key);
|
|
265832
265842
|
} finally {
|
|
265843
|
+
if (!process.stdin.destroyed)
|
|
265844
|
+
process.stdin.resume();
|
|
265833
265845
|
if (process.stdin.isTTY)
|
|
265834
265846
|
process.stdin.setRawMode(true);
|
|
265835
265847
|
}
|
|
@@ -265966,8 +265978,11 @@ async function startRepl(context) {
|
|
|
265966
265978
|
rl.on("close", () => {
|
|
265967
265979
|
if (intentionalClose)
|
|
265968
265980
|
process.exit(0);
|
|
265969
|
-
else
|
|
265981
|
+
else {
|
|
265982
|
+
if (!process.stdin.destroyed)
|
|
265983
|
+
process.stdin.resume();
|
|
265970
265984
|
rl.prompt();
|
|
265985
|
+
}
|
|
265971
265986
|
});
|
|
265972
265987
|
rl.prompt();
|
|
265973
265988
|
rl.on("line", async (line) => {
|