claudish 3.3.5 → 3.3.6
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/index.js +16 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -57078,28 +57078,32 @@ class OpenAIHandler {
|
|
|
57078
57078
|
continue;
|
|
57079
57079
|
}
|
|
57080
57080
|
if (msg.role === "assistant" && msg.tool_calls) {
|
|
57081
|
-
const content = [];
|
|
57082
57081
|
if (msg.content) {
|
|
57083
57082
|
const textContent = typeof msg.content === "string" ? msg.content : JSON.stringify(msg.content);
|
|
57084
57083
|
if (textContent) {
|
|
57085
|
-
|
|
57084
|
+
result.push({
|
|
57085
|
+
type: "message",
|
|
57086
|
+
role: "assistant",
|
|
57087
|
+
content: [{ type: "output_text", text: textContent }]
|
|
57088
|
+
});
|
|
57086
57089
|
}
|
|
57087
57090
|
}
|
|
57088
57091
|
for (const toolCall of msg.tool_calls) {
|
|
57089
57092
|
if (toolCall.type === "function") {
|
|
57090
|
-
|
|
57093
|
+
result.push({
|
|
57091
57094
|
type: "function_call",
|
|
57092
57095
|
call_id: toolCall.id,
|
|
57093
57096
|
name: toolCall.function.name,
|
|
57094
|
-
arguments: toolCall.function.arguments
|
|
57097
|
+
arguments: toolCall.function.arguments,
|
|
57098
|
+
status: "completed"
|
|
57095
57099
|
});
|
|
57096
57100
|
}
|
|
57097
57101
|
}
|
|
57098
|
-
result.push({ role: "assistant", content });
|
|
57099
57102
|
continue;
|
|
57100
57103
|
}
|
|
57101
57104
|
if (typeof msg.content === "string") {
|
|
57102
57105
|
result.push({
|
|
57106
|
+
type: "message",
|
|
57103
57107
|
role: msg.role,
|
|
57104
57108
|
content: [
|
|
57105
57109
|
{
|
|
@@ -57128,12 +57132,17 @@ class OpenAIHandler {
|
|
|
57128
57132
|
return block;
|
|
57129
57133
|
});
|
|
57130
57134
|
result.push({
|
|
57135
|
+
type: "message",
|
|
57131
57136
|
role: msg.role,
|
|
57132
57137
|
content: convertedContent
|
|
57133
57138
|
});
|
|
57134
57139
|
continue;
|
|
57135
57140
|
}
|
|
57136
|
-
|
|
57141
|
+
if (msg.role) {
|
|
57142
|
+
result.push({ type: "message", ...msg });
|
|
57143
|
+
} else {
|
|
57144
|
+
result.push(msg);
|
|
57145
|
+
}
|
|
57137
57146
|
}
|
|
57138
57147
|
return result;
|
|
57139
57148
|
}
|
|
@@ -59438,7 +59447,7 @@ function printAvailableModelsJSON() {
|
|
|
59438
59447
|
console.log(JSON.stringify(output, null, 2));
|
|
59439
59448
|
}
|
|
59440
59449
|
}
|
|
59441
|
-
var __filename6, __dirname6, VERSION = "3.3.
|
|
59450
|
+
var __filename6, __dirname6, VERSION = "3.3.5", CACHE_MAX_AGE_DAYS3 = 2, MODELS_JSON_PATH, ALL_MODELS_JSON_PATH2;
|
|
59442
59451
|
var init_cli = __esm(() => {
|
|
59443
59452
|
init_dist11();
|
|
59444
59453
|
init_model_loader2();
|