@polka-codes/cli 0.9.70 → 0.9.71
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 +14 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37660,7 +37660,7 @@ var {
|
|
|
37660
37660
|
Help
|
|
37661
37661
|
} = import__.default;
|
|
37662
37662
|
// package.json
|
|
37663
|
-
var version = "0.9.
|
|
37663
|
+
var version = "0.9.71";
|
|
37664
37664
|
|
|
37665
37665
|
// src/commands/code.ts
|
|
37666
37666
|
import { readFile as readFile4 } from "node:fs/promises";
|
|
@@ -63995,7 +63995,7 @@ var agentWorkflow = async (input, { step, tools, logger }) => {
|
|
|
63995
63995
|
for (let i = 0;i < maxToolRoundTrips; i++) {
|
|
63996
63996
|
messages.push(...nextMessage);
|
|
63997
63997
|
await event(`start-round-${i}`, { kind: "StartRequest" /* StartRequest */, userMessage: nextMessage });
|
|
63998
|
-
const assistantMessage = await step(`agent-round-${i}`, async () => {
|
|
63998
|
+
const assistantMessage = await step(`agent-round-${i}`, { retry: 2 }, async () => {
|
|
63999
63999
|
return await tools.generateText({
|
|
64000
64000
|
messages,
|
|
64001
64001
|
tools: toolSet,
|
|
@@ -64201,14 +64201,23 @@ var fromJsonModelMessage = (msg) => {
|
|
|
64201
64201
|
var makeStepFn = () => {
|
|
64202
64202
|
const results = new Map;
|
|
64203
64203
|
const callStack = [];
|
|
64204
|
-
return async (name17,
|
|
64204
|
+
return async (name17, arg2, arg3) => {
|
|
64205
|
+
let fn;
|
|
64206
|
+
let options;
|
|
64207
|
+
if (typeof arg2 === "function") {
|
|
64208
|
+
fn = arg2;
|
|
64209
|
+
options = arg3;
|
|
64210
|
+
} else {
|
|
64211
|
+
options = arg2;
|
|
64212
|
+
fn = arg3;
|
|
64213
|
+
}
|
|
64205
64214
|
callStack.push(name17);
|
|
64206
64215
|
const key = callStack.join(">");
|
|
64207
64216
|
try {
|
|
64208
64217
|
if (results.has(key)) {
|
|
64209
64218
|
return results.get(key);
|
|
64210
64219
|
}
|
|
64211
|
-
const maxRetryCount = options?.retry ??
|
|
64220
|
+
const maxRetryCount = options?.retry ?? 0;
|
|
64212
64221
|
let lastError;
|
|
64213
64222
|
for (let retryCount = 0;retryCount <= maxRetryCount; retryCount++) {
|
|
64214
64223
|
try {
|
|
@@ -83710,6 +83719,7 @@ var googleModelPrices = {
|
|
|
83710
83719
|
};
|
|
83711
83720
|
var prices_default = {
|
|
83712
83721
|
["anthropic" /* Anthropic */]: {
|
|
83722
|
+
"claude-opus-4-5-20251101": { inputPrice: 5, outputPrice: 25, cacheWritesPrice: 6.25, cacheReadsPrice: 0.5, supportsThinking: true },
|
|
83713
83723
|
"claude-sonnet-4-5-20250929": { inputPrice: 3, outputPrice: 15, cacheWritesPrice: 3.75, cacheReadsPrice: 0.3, supportsThinking: true },
|
|
83714
83724
|
"claude-opus-4-20250514": { inputPrice: 15, outputPrice: 75, cacheWritesPrice: 18.75, cacheReadsPrice: 1.5, supportsThinking: true },
|
|
83715
83725
|
"claude-opus-4-1-20250805": { inputPrice: 15, outputPrice: 75, cacheWritesPrice: 18.75, cacheReadsPrice: 1.5, supportsThinking: true },
|