UNPKG

@mantisware/peepit-mcp

Version:

Give your AI agents super-vision: blazing-fast macOS screenshots, smart window targeting, and local or cloud AI image analysis—all via a friendly Node.js MCP server.

33 lines • 1.5 kB
export function buildImageSummary(input, data, question) { if (!data.saved_files || data.saved_files.length === 0) { return "Image capture completed but no files were saved or available for analysis."; } // Determine mode and target from app_target (removed since we're not using them anymore) // The summary now just shows the count of images captured // Generate summary matching the expected format const imageCount = data.saved_files.length; let summary = `Captured ${imageCount} image${imageCount > 1 ? "s" : ""}`; if (data.saved_files.length === 1) { if (!question || (question && input.path)) { // Show path if no question or if question with explicit path summary += `\nImage saved to: ${data.saved_files[0].path}`; } } else if (data.saved_files.length > 1) { summary += `\n${data.saved_files.length} images saved:`; data.saved_files.forEach((file, index) => { summary += `\n${index + 1}. ${file.path}`; if (file.item_label) { summary += ` (${file.item_label})`; } }); } else if (input.question && input.path && data.saved_files?.length) { summary += `\nImage saved to: ${data.saved_files[0].path}`; } else if (input.question && data.saved_files?.length) { summary += "\nImage captured to temporary location for analysis."; } return summary; } //# sourceMappingURL=image-summary.js.map