fix: remove duplicate bare URL/path appended to PPTX tool result

Python stdout already includes the correct markdown download link.
Appending extra bare URL and absolute path caused the model to generate
two download links in its response. Keep only Python's stdout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
kim
2026-05-01 18:04:32 +09:00
co-authored by Claude Sonnet 4.6
parent 07f2ae7e2d
commit e8c825992f
-9
View File
@@ -170,20 +170,11 @@ async function generateWithPython(spec: PresentationSpec, workspacePath: string)
return { success: false, error: result.error || 'Unknown Python PPTX error' };
}
// Build a richer stdout that includes both markdown link and bare URL for reliable display
const filePath = result.path || '';
const downloadLink = result.download_url || '';
let stdout = result.stdout || '';
if (!stdout && downloadLink) {
stdout = `Presentation created: [${result.filename}](${downloadLink}) (${result.slides} slides)`;
}
// Append bare URL on its own line so the frontend can auto-link it even if LLM strips markdown
if (downloadLink && !stdout.includes(downloadLink)) {
stdout += `\n${downloadLink}`;
}
if (filePath && !stdout.includes(filePath)) {
stdout += `\nFile: ${filePath}`;
}
return {
success: true,