fix: loading AI toast + flash vert auto-save + refresh doc après close editor
This commit is contained in:
+2
-1
@@ -343,10 +343,11 @@ export async function createAIToolbar(container, getEditorView) {
|
||||
showToast('AI: sélectionnez du texte à traiter', 'warning');
|
||||
return;
|
||||
}
|
||||
showToast('⏳ AI: traitement en cours...', 'info');
|
||||
try {
|
||||
const result = await aiAction(endpoint, text, extra);
|
||||
replaceSelection(v, result, mode);
|
||||
showToast('AI: texte traité', 'success');
|
||||
showToast('AI: texte traité ✓', 'success');
|
||||
} catch (e) {
|
||||
const msg = String(e.message || e);
|
||||
if (msg.includes('401')) {
|
||||
|
||||
Reference in New Issue
Block a user