chore: remove screenshot saving from Playwright MCP instances
Remove unnecessary screenshot storage to reduce file I/O and disk usage: - Removed screenshot directory creation - Removed --output-dir flag from Playwright MCP setup - Agents can still take screenshots, but they won't persist to disk Screenshots were not being used by any part of Shannon for analysis or reporting, making their storage unnecessary overhead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -21,21 +21,16 @@ export async function setupMCP(sourceDir) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure screenshot directories exist
|
|
||||||
await fs.ensureDir(path.join(sourceDir, 'screenshots'));
|
|
||||||
|
|
||||||
// Create 5 isolated instances sequentially to avoid config conflicts
|
// Create 5 isolated instances sequentially to avoid config conflicts
|
||||||
for (let i = 1; i <= 5; i++) {
|
for (let i = 1; i <= 5; i++) {
|
||||||
const instanceName = `playwright-agent${i}`;
|
const instanceName = `playwright-agent${i}`;
|
||||||
const screenshotDir = path.join(sourceDir, 'screenshots', instanceName);
|
|
||||||
const userDataDir = `/tmp/${instanceName}`;
|
const userDataDir = `/tmp/${instanceName}`;
|
||||||
|
|
||||||
// Ensure both directories exist
|
// Ensure user data directory exists
|
||||||
await fs.ensureDir(screenshotDir);
|
|
||||||
await fs.ensureDir(userDataDir);
|
await fs.ensureDir(userDataDir);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await $`claude mcp add ${instanceName} --scope user -- npx @playwright/mcp@latest --isolated --user-data-dir ${userDataDir} --output-dir ${screenshotDir}`;
|
await $`claude mcp add ${instanceName} --scope user -- npx @playwright/mcp@latest --isolated --user-data-dir ${userDataDir}`;
|
||||||
console.log(chalk.green(` ✅ ${instanceName} configured`));
|
console.log(chalk.green(` ✅ ${instanceName} configured`));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.message?.includes('already exists')) {
|
if (error.message?.includes('already exists')) {
|
||||||
|
|||||||
Reference in New Issue
Block a user