diff --git a/lib/form_filler.mjs b/lib/form_filler.mjs index 59b6797..c666f70 100644 --- a/lib/form_filler.mjs +++ b/lib/form_filler.mjs @@ -607,9 +607,10 @@ Answer:`; let formatHint = field.placeholder ? `(format: ${field.placeholder})` : ''; if (field.type === 'number') formatHint = '(must be a number, no text or units)'; let answer = this.answerFor(lbl); + // answerFor returns null (no match) vs '' (intentionally blank — skip AI, leave empty) // For number fields, always try AI if no answer — LinkedIn validates them even if not marked required const needsAnswer = field.required || field.type === 'number'; - if (!answer && needsAnswer) { + if (answer === null && needsAnswer) { answer = await this.aiAnswerFor(formatHint ? `${lbl} ${formatHint}` : lbl); if (answer) this.saveAnswer(lbl, answer); } @@ -618,6 +619,10 @@ Answer:`; const num = String(answer).replace(/[^\d.]/g, ''); if (num) answer = num; } + if (answer === '') { + // Intentionally blank (e.g. street address) — skip without reporting unknown + continue; + } if (answer && answer !== this.profile.cover_letter) { const el = await byTag(field.tag); if (!el) continue; diff --git a/status.mjs b/status.mjs index c19b10d..70be026 100644 --- a/status.mjs +++ b/status.mjs @@ -267,9 +267,11 @@ if (jsonMode) { } else { const report = formatReport(status); const settings = loadConfig(resolve(__dir, 'config/settings.json')); - // Always send via Telegram directly if configured (so markdown renders) + // Send via Telegram directly if configured (so markdown renders) if (settings.notifications?.bot_token && settings.notifications?.telegram_user_id) { await sendTelegram(settings, report); + // Don't also print to stdout — OpenClaw would relay it as a duplicate plain-text message + } else { + console.log(report); } - console.log(report); }