@wix/ditto-codegen-public 1.0.348 → 1.0.350
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 +20 -19
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -12141,7 +12141,14 @@ IMPORTANT INSTRUCTIONS:
|
|
|
12141
12141
|
2. Do NOT run any bash commands.
|
|
12142
12142
|
3. READ the codebase to understand the code structure and find answers.
|
|
12143
12143
|
4. Use MCP tools to look up Wix documentation when the question involves Wix APIs, SDKs, or platform features.
|
|
12144
|
-
5. If you cannot find a definitive answer, say so clearly and explain what you found
|
|
12144
|
+
5. If you cannot find a definitive answer, say so clearly and explain what you found.
|
|
12145
|
+
|
|
12146
|
+
DEBUGGING GUIDANCE:
|
|
12147
|
+
- A preview/dev server is ALREADY running in this environment. NEVER recommend \`wix dev\`, \`wix preview\`, \`npx wix dev\`, or \`npx wix preview\`. Starting another server conflicts with and breaks the one already running, costing the user their work.
|
|
12148
|
+
- When asked how to debug the app, view logs, or inspect errors/network requests, recommend ONLY approaches that are safe alongside the running server:
|
|
12149
|
+
- Browser DevTools: the Console, Network, and Sources tabs.
|
|
12150
|
+
- \`console.log\` statements, then read the output in the already-running server logs.
|
|
12151
|
+
- Inspecting network requests in the browser, without starting a new server.`;
|
|
12145
12152
|
}
|
|
12146
12153
|
});
|
|
12147
12154
|
|
|
@@ -12565,13 +12572,6 @@ var require_parser = __commonJS({
|
|
|
12565
12572
|
if (filePath) {
|
|
12566
12573
|
addFileChange(filePath, operation);
|
|
12567
12574
|
}
|
|
12568
|
-
if (metadata?.diagnostics) {
|
|
12569
|
-
for (const diagPath of Object.keys(metadata.diagnostics)) {
|
|
12570
|
-
if (diagPath && !diagPath.includes("node_modules")) {
|
|
12571
|
-
addFileChange(diagPath, ditto_codegen_types_12.ExtensionGenerationOperation.INSERT);
|
|
12572
|
-
}
|
|
12573
|
-
}
|
|
12574
|
-
}
|
|
12575
12575
|
}
|
|
12576
12576
|
if (tool === "task" && event.part.state.metadata?.summary) {
|
|
12577
12577
|
for (const item of event.part.state.metadata.summary) {
|
|
@@ -12987,16 +12987,11 @@ var require_result_builder = __commonJS({
|
|
|
12987
12987
|
"dist/opencode-integration/result-builder.js"(exports2) {
|
|
12988
12988
|
"use strict";
|
|
12989
12989
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12990
|
-
exports2.isCorruptedSessionError = isCorruptedSessionError;
|
|
12991
12990
|
exports2.createTimeoutResult = createTimeoutResult;
|
|
12992
12991
|
exports2.createSuccessResult = createSuccessResult;
|
|
12993
12992
|
exports2.createSpawnErrorResult = createSpawnErrorResult;
|
|
12994
12993
|
var ditto_codegen_types_12 = require_dist4();
|
|
12995
12994
|
var parser_1 = require_parser();
|
|
12996
|
-
function isCorruptedSessionError(result) {
|
|
12997
|
-
const combined = `${result.stderr} ${result.stdout} ${result.error?.message || ""}`;
|
|
12998
|
-
return !result.success && combined.includes("tool_use") && combined.includes("tool_result");
|
|
12999
|
-
}
|
|
13000
12995
|
function createTimeoutResult(message, stdout, stderr, startTime) {
|
|
13001
12996
|
return {
|
|
13002
12997
|
success: false,
|
|
@@ -13163,13 +13158,15 @@ var require_executor = __commonJS({
|
|
|
13163
13158
|
let accumulatedUsage = (0, parser_1.createEmptyUsageStats)();
|
|
13164
13159
|
const accumulatedSkills = [];
|
|
13165
13160
|
let currentPrompt = options.prompt;
|
|
13161
|
+
let continueSession = options.continueSession ?? false;
|
|
13166
13162
|
for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) {
|
|
13167
13163
|
if (attempt > 1) {
|
|
13168
13164
|
logger_12.logger.info(`[OpenCode] Retry attempt ${attempt}/${MAX_RETRIES} - starting fresh session with recovery context`);
|
|
13169
13165
|
const filesChanged = (0, parser_1.parseFilesChanged)(accumulatedStdout);
|
|
13170
13166
|
currentPrompt = (0, prompts_1.buildRecoveryPrompt)(options.prompt, filesChanged, lastResult?.error?.message || lastResult?.stderr || "Process timed out");
|
|
13167
|
+
continueSession = false;
|
|
13171
13168
|
}
|
|
13172
|
-
const result = await executeOpenCodeOnce({ ...options, prompt: currentPrompt }, attempt);
|
|
13169
|
+
const result = await executeOpenCodeOnce({ ...options, prompt: currentPrompt, continueSession }, attempt);
|
|
13173
13170
|
accumulatedStdout += result.stdout;
|
|
13174
13171
|
accumulatedUsage = (0, parser_1.mergeUsageStats)(accumulatedUsage, result.usage);
|
|
13175
13172
|
accumulatedSkills.push(...result.skillsUsed);
|
|
@@ -13217,11 +13214,12 @@ var require_executor = __commonJS({
|
|
|
13217
13214
|
logger_12.logger.debug("[OpenCode] Stats", { stats });
|
|
13218
13215
|
}
|
|
13219
13216
|
}
|
|
13220
|
-
function buildArgs(prompt) {
|
|
13221
|
-
|
|
13217
|
+
function buildArgs(prompt, continueSession) {
|
|
13218
|
+
const sessionArgs = continueSession ? ["--continue"] : [];
|
|
13219
|
+
return ["run", ...sessionArgs, "--format", "json", prompt];
|
|
13222
13220
|
}
|
|
13223
13221
|
async function executeOpenCodeOnce(options, attempt) {
|
|
13224
|
-
const { prompt, outputPath, projectId, onStdout, onStderr } = options;
|
|
13222
|
+
const { prompt, outputPath, projectId, onStdout, onStderr, continueSession = false } = options;
|
|
13225
13223
|
const startTime = Date.now();
|
|
13226
13224
|
const taskTracker = new task_tracker_1.OpenCodeTaskTracker(outputPath);
|
|
13227
13225
|
return new Promise((resolve) => {
|
|
@@ -13253,11 +13251,12 @@ var require_executor = __commonJS({
|
|
|
13253
13251
|
finalize
|
|
13254
13252
|
};
|
|
13255
13253
|
try {
|
|
13256
|
-
const args = buildArgs(prompt);
|
|
13254
|
+
const args = buildArgs(prompt, continueSession);
|
|
13257
13255
|
logger_12.logger.info("[OpenCode] Executing opencode run", {
|
|
13258
13256
|
attempt,
|
|
13259
13257
|
maxRetries: MAX_RETRIES,
|
|
13260
|
-
workingDirectory: outputPath
|
|
13258
|
+
workingDirectory: outputPath,
|
|
13259
|
+
continueSession
|
|
13261
13260
|
});
|
|
13262
13261
|
logger_12.logger.debug("[OpenCode] Full prompt", { prompt });
|
|
13263
13262
|
const isAsk = job_context_storage_12.jobContextStorage.getStore()?.kind === ditto_codegen_types_12.TaskKind.ASK_CODEGEN;
|
|
@@ -13319,6 +13318,7 @@ var require_opencode_runner = __commonJS({
|
|
|
13319
13318
|
prompt,
|
|
13320
13319
|
outputPath,
|
|
13321
13320
|
projectId,
|
|
13321
|
+
continueSession: true,
|
|
13322
13322
|
onStdout,
|
|
13323
13323
|
onStderr
|
|
13324
13324
|
});
|
|
@@ -13330,6 +13330,7 @@ var require_opencode_runner = __commonJS({
|
|
|
13330
13330
|
prompt,
|
|
13331
13331
|
outputPath,
|
|
13332
13332
|
projectId,
|
|
13333
|
+
continueSession: true,
|
|
13333
13334
|
onStdout,
|
|
13334
13335
|
onStderr
|
|
13335
13336
|
});
|
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.350",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"esbuild": "^0.27.2",
|
|
30
30
|
"vitest": "^4.0.16"
|
|
31
31
|
},
|
|
32
|
-
"falconPackageHash": "
|
|
32
|
+
"falconPackageHash": "7b2e53264eacac128859b81385968e6717dcc2aa010583e57495c189"
|
|
33
33
|
}
|