mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-07-14 12:48:03 +00:00
Clarify empty AI reply errors
This commit is contained in:
@@ -3753,7 +3753,11 @@ import { bindMenuDismiss, dismissOrRemove } from './escMenuStack.js';
|
||||
await _streamEmailBodyText(textarea, newBody);
|
||||
if (uiModule) uiModule.showToast(`AI draft inserted (${data.model_used || 'AI'})`);
|
||||
} else {
|
||||
if (uiModule) uiModule.showError(data.error || 'Failed to generate reply');
|
||||
const rawMsg = data.error || 'Failed to generate reply';
|
||||
const msg = /empty response/i.test(rawMsg)
|
||||
? 'AI reply failed: AI returned empty response.'
|
||||
: rawMsg;
|
||||
if (uiModule) uiModule.showError(msg);
|
||||
}
|
||||
} catch (e) {
|
||||
if (uiModule) uiModule.showError('Failed to generate AI reply');
|
||||
|
||||
Reference in New Issue
Block a user