fix: keep dave chat responsive on llm failures
Some checks failed
Codex Template Compliance / template-compliance (pull_request) Successful in 52s
Build / test-and-image (pull_request) Failing after 1m31s

This commit is contained in:
2026-07-11 18:27:12 +02:00
parent 74579375b3
commit 429114f272
7 changed files with 194 additions and 20 deletions

View File

@@ -611,10 +611,14 @@ export class TelegramAlerter {
});
} catch (err) {
console.error('[Telegram] AI chat error:', err.message);
await this.sendMessage('AI chat failed. Please try again or use /status to check the LLM configuration.', {
await this.sendConversation([
'Dave bekommt gerade keine stabile Antwort vom Modell.',
'Ich bleibe erreichbar. Frag kurz nach Status, Quellen, Briefing, Maerkten, Websuche oder starte einen Sweep nach Bestaetigung.',
], {
chatId: replyChatId,
replyToMessageId: msg.message_id,
parseMode: null,
maxChunkChars: 360,
});
} finally {
stopTyping();
@@ -978,7 +982,7 @@ Respond with ONLY valid JSON:
const signals = Array.isArray(evaluation.signals) ? evaluation.signals.map(compactLine).filter(Boolean).slice(0, 2) : [];
const messages = [
`[DAVE // ${tierLabel}]\n${headline}`,
german ? `Kurzer Hinweis: ${headline}` : `${tierLabel}: ${headline}`,
];
if (reason && reason !== headline) {