@wix/ditto-codegen-public 1.0.281 → 1.0.282
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/out.js +33 -3
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -12072,6 +12072,7 @@ var require_parser = __commonJS({
|
|
|
12072
12072
|
exports2.createEmptyUsageStats = createEmptyUsageStats;
|
|
12073
12073
|
exports2.parseUsageStats = parseUsageStats;
|
|
12074
12074
|
exports2.mergeUsageStats = mergeUsageStats;
|
|
12075
|
+
exports2.hasSessionError = hasSessionError;
|
|
12075
12076
|
exports2.formatUsageStats = formatUsageStats;
|
|
12076
12077
|
var ditto_codegen_types_12 = require_dist4();
|
|
12077
12078
|
var types_1 = require_types4();
|
|
@@ -12199,6 +12200,32 @@ var require_parser = __commonJS({
|
|
|
12199
12200
|
stepCount: a.stepCount + b.stepCount
|
|
12200
12201
|
};
|
|
12201
12202
|
}
|
|
12203
|
+
function hasSessionError(output) {
|
|
12204
|
+
const lines = output.split("\n");
|
|
12205
|
+
let foundError = false;
|
|
12206
|
+
let lastStepFinishReason;
|
|
12207
|
+
for (const line of lines) {
|
|
12208
|
+
if (!line.trim())
|
|
12209
|
+
continue;
|
|
12210
|
+
const event = (0, types_1.tryParseJson)(line);
|
|
12211
|
+
if (!event)
|
|
12212
|
+
continue;
|
|
12213
|
+
if (event.type === "error") {
|
|
12214
|
+
foundError = true;
|
|
12215
|
+
} else if (event.type === "tool_use") {
|
|
12216
|
+
const toolEvent = event;
|
|
12217
|
+
if (toolEvent.part?.state?.status === "error") {
|
|
12218
|
+
foundError = true;
|
|
12219
|
+
}
|
|
12220
|
+
} else if (event.type === "step_finish") {
|
|
12221
|
+
const stepEvent = event;
|
|
12222
|
+
lastStepFinishReason = stepEvent.part?.reason;
|
|
12223
|
+
}
|
|
12224
|
+
}
|
|
12225
|
+
if (lastStepFinishReason === "stop")
|
|
12226
|
+
return false;
|
|
12227
|
+
return foundError;
|
|
12228
|
+
}
|
|
12202
12229
|
function formatUsageStats(stats) {
|
|
12203
12230
|
const lines = [
|
|
12204
12231
|
`\u{1F4CA} Usage Summary:`,
|
|
@@ -12816,8 +12843,10 @@ var require_executor = __commonJS({
|
|
|
12816
12843
|
accumulatedSkills.push(...result.skillsUsed);
|
|
12817
12844
|
accumulatedExtensions.push(...result.extensionsCreated);
|
|
12818
12845
|
const errorMsg = result.error?.message.toLowerCase() ?? "";
|
|
12819
|
-
const
|
|
12820
|
-
|
|
12846
|
+
const isIdleTimeout = !result.success && errorMsg.includes("idle timeout");
|
|
12847
|
+
const isSessionError = (0, parser_1.hasSessionError)(result.stdout);
|
|
12848
|
+
const isRetryableFailure = isIdleTimeout || isSessionError;
|
|
12849
|
+
if (!isRetryableFailure) {
|
|
12821
12850
|
const finalResult2 = {
|
|
12822
12851
|
...result,
|
|
12823
12852
|
filesChanged: (0, parser_1.parseFilesChanged)(accumulatedStdout),
|
|
@@ -12830,7 +12859,8 @@ var require_executor = __commonJS({
|
|
|
12830
12859
|
return finalResult2;
|
|
12831
12860
|
}
|
|
12832
12861
|
lastResult = result;
|
|
12833
|
-
|
|
12862
|
+
const reason = isSessionError ? "session error" : "idle timeout";
|
|
12863
|
+
logger_12.logger.warn(`[OpenCode] Attempt failed due to ${reason}, will retry`, {
|
|
12834
12864
|
attempt,
|
|
12835
12865
|
maxRetries: MAX_RETRIES
|
|
12836
12866
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/ditto-codegen-public",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.282",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"@wix/ditto-codegen": "1.0.0",
|
|
28
28
|
"esbuild": "^0.27.2"
|
|
29
29
|
},
|
|
30
|
-
"falconPackageHash": "
|
|
30
|
+
"falconPackageHash": "dfa51d2033ad05b1debde0dbd9a4970eab5e3a9a5507fc31abbf2a36"
|
|
31
31
|
}
|