diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 000000000..41b338ba3 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,8 @@ +# Claude Hooks + +## after_edit +Run linting after making code changes to ensure code quality and style consistency. + +```bash +npm run lint +``` \ No newline at end of file diff --git a/app/src/mailsync-process.ts b/app/src/mailsync-process.ts index 6ce50d536..df51dddf3 100644 --- a/app/src/mailsync-process.ts +++ b/app/src/mailsync-process.ts @@ -305,7 +305,16 @@ export class MailsyncProcess extends EventEmitter { let error = null; let lastJSON = null; try { - lastJSON = outBuffer.length && JSON.parse(outBuffer); + if (outBuffer.length) { + // Skip debug output that starts with 'dbg::' prefix + if (outBuffer.startsWith('dbg::')) { + console.log('Skipping debug output from mailsync:', outBuffer); + } else { + lastJSON = JSON.parse(outBuffer); + } + } + } catch (parseError) { + console.warn('Failed to parse mailsync output as JSON:', outBuffer); } finally { if (lastJSON) { if (lastJSON.error) {