stashes 0.1.55 → 0.1.56
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
CHANGED
|
@@ -596,7 +596,7 @@ function startAiProcess(idOrOpts, prompt, cwd, resumeSessionId, model) {
|
|
|
596
596
|
});
|
|
597
597
|
const cmd = [CLAUDE_BIN, "-p", opts.prompt, "--output-format=stream-json", "--verbose", "--dangerously-skip-permissions"];
|
|
598
598
|
if (restricted) {
|
|
599
|
-
cmd.push("--tools", opts.tools.length > 0 ? opts.tools.join(",") :
|
|
599
|
+
cmd.push("--tools", opts.tools.length > 0 ? opts.tools.join(",") : "");
|
|
600
600
|
cmd.push("--disallowedTools", OVERHEAD_TOOLS.join(","));
|
|
601
601
|
cmd.push("--strict-mcp-config");
|
|
602
602
|
if (opts.mcpConfigPath) {
|
|
@@ -931,6 +931,15 @@ async function captureSmartScreenshots(opts) {
|
|
|
931
931
|
}
|
|
932
932
|
const result = parseAiResult(textOutput);
|
|
933
933
|
if (!result || !result.screenshots || result.screenshots.length === 0) {
|
|
934
|
+
const expectedPath = join6(screenshotDir, `${stashId}.png`);
|
|
935
|
+
if (existsSync6(expectedPath)) {
|
|
936
|
+
logger.info("smart-screenshot", `AI saved screenshot for ${stashId} via browser_run_code (no JSON response)`);
|
|
937
|
+
const url = `/api/screenshots/${stashId}.png`;
|
|
938
|
+
return {
|
|
939
|
+
primary: url,
|
|
940
|
+
screenshots: [{ url, label: "AI screenshot", route: "/", isPrimary: true }]
|
|
941
|
+
};
|
|
942
|
+
}
|
|
934
943
|
logger.info("smart-screenshot", `AI returned no screenshots for ${stashId} (timedOut=${timedOut}), falling back`);
|
|
935
944
|
return fallbackScreenshot(port, projectPath, stashId);
|
|
936
945
|
}
|
package/dist/mcp.js
CHANGED
|
@@ -581,7 +581,7 @@ function startAiProcess(idOrOpts, prompt, cwd, resumeSessionId, model) {
|
|
|
581
581
|
});
|
|
582
582
|
const cmd = [CLAUDE_BIN, "-p", opts.prompt, "--output-format=stream-json", "--verbose", "--dangerously-skip-permissions"];
|
|
583
583
|
if (restricted) {
|
|
584
|
-
cmd.push("--tools", opts.tools.length > 0 ? opts.tools.join(",") :
|
|
584
|
+
cmd.push("--tools", opts.tools.length > 0 ? opts.tools.join(",") : "");
|
|
585
585
|
cmd.push("--disallowedTools", OVERHEAD_TOOLS.join(","));
|
|
586
586
|
cmd.push("--strict-mcp-config");
|
|
587
587
|
if (opts.mcpConfigPath) {
|
|
@@ -916,6 +916,15 @@ async function captureSmartScreenshots(opts) {
|
|
|
916
916
|
}
|
|
917
917
|
const result = parseAiResult(textOutput);
|
|
918
918
|
if (!result || !result.screenshots || result.screenshots.length === 0) {
|
|
919
|
+
const expectedPath = join6(screenshotDir, `${stashId}.png`);
|
|
920
|
+
if (existsSync6(expectedPath)) {
|
|
921
|
+
logger.info("smart-screenshot", `AI saved screenshot for ${stashId} via browser_run_code (no JSON response)`);
|
|
922
|
+
const url = `/api/screenshots/${stashId}.png`;
|
|
923
|
+
return {
|
|
924
|
+
primary: url,
|
|
925
|
+
screenshots: [{ url, label: "AI screenshot", route: "/", isPrimary: true }]
|
|
926
|
+
};
|
|
927
|
+
}
|
|
919
928
|
logger.info("smart-screenshot", `AI returned no screenshots for ${stashId} (timedOut=${timedOut}), falling back`);
|
|
920
929
|
return fallbackScreenshot(port, projectPath, stashId);
|
|
921
930
|
}
|