fix: AI toolbar créée hors try/catch + simplifié imports circulaires
This commit is contained in:
+3
-6
@@ -57,9 +57,9 @@ function replaceSelection(editorView, newText, mode = 'replace') {
|
||||
|
||||
// ── Show toast notification ──
|
||||
function showToast(msg, type = 'info') {
|
||||
// Use the global showToast if available (from ui.js)
|
||||
if (typeof window._showToast === 'function') {
|
||||
window._showToast(msg, type);
|
||||
// Use global showToast if available, otherwise console
|
||||
if (typeof window._obsigateShowToast === 'function') {
|
||||
window._obsigateShowToast(msg, type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,6 +357,3 @@ function createSeparator() {
|
||||
sep.style.cssText = 'width:1px;height:16px;background:var(--border-color);margin:0 2px';
|
||||
return sep;
|
||||
}
|
||||
|
||||
// Export showToast for the module
|
||||
export function setToast(fn) { window._showToast = fn; }
|
||||
|
||||
Reference in New Issue
Block a user