feat(chat): add Mermaid diagram zoom controls (#2100)

* feat(chat): add mermaid diagram zoom controls

* fix(chat): handle malformed mermaid data urls

* fix(chat): preserve mermaid load error stack

---------

Co-authored-by: Bohdan Triapitsyn <artmore@protonmail.com>
This commit is contained in:
Carson
2026-07-08 20:43:23 +03:00
committed by GitHub
co-authored by Bohdan Triapitsyn
parent dfed121bf1
commit 3d32ac7989
18 changed files with 1069 additions and 115 deletions
+10
View File
@@ -1928,6 +1928,11 @@ export const dict: Record<I18nKey, string> = {
"chat.toolOutputDialog.image.closeAria": "Закрити попередній перегляд зображення",
"chat.toolOutputDialog.mermaid.missingSource": "Відсутнє джерело Mermaid URL.",
"chat.toolOutputDialog.mermaid.loadFailed": "Не вдалося завантажити діаграму Mermaid.",
"chat.toolOutputDialog.mermaid.dataUrlMalformed": "URL даних Mermaid має неправильний формат.",
"chat.toolOutputDialog.mermaid.invalidLocalPath": "Локальний шлях до файлу Mermaid недійсний.",
"chat.toolOutputDialog.mermaid.readFileFailedWithStatus": "Не вдалося прочитати файл Mermaid. Статус: {status}.",
"chat.toolOutputDialog.mermaid.unsupportedUrlProtocol": "Протокол URL Mermaid не підтримується.",
"chat.toolOutputDialog.mermaid.loadFailedWithStatus": "Не вдалося завантажити діаграму Mermaid. Статус: {status}.",
"chat.toolOutputDialog.mermaid.closeAria": "Закрити попередній перегляд діаграми",
"chat.toolOutputDialog.mermaid.loading": "Завантаження діаграми...",
"chat.toolOutputDialog.mermaid.renderFailed": "Неможливо відобразити діаграму Mermaid.",
@@ -2635,6 +2640,8 @@ export const dict: Record<I18nKey, string> = {
"mainLayout.mobile.closeDrawerAria": "Закрити панель",
"sortableTabsStrip.aria.tabs": "Вкладки",
"openChamberLogo.aria.logo": "Логотип OpenChamber",
"markdownRenderer.code.actions.copyTitle": "Скопіювати код",
"markdownRenderer.code.actions.copiedTitle": "Скопійовано",
"markdownRenderer.table.actions.copyTitle": "Скопіювати таблицю",
"markdownRenderer.code.actions.enableWrapTitle": "Увімкнути перенесення рядків",
"markdownRenderer.code.actions.disableWrapTitle": "Вимкнути перенесення рядків",
@@ -2643,6 +2650,9 @@ export const dict: Record<I18nKey, string> = {
"markdownRenderer.mermaid.actions.copyTitle": "Копіювати",
"markdownRenderer.mermaid.actions.copySourceTitle": "Копіювати джерело",
"markdownRenderer.mermaid.actions.downloadSvgTitle": "Завантажити SVG",
"markdownRenderer.mermaid.actions.zoomInTitle": "Збільшити",
"markdownRenderer.mermaid.actions.zoomOutTitle": "Зменшити",
"markdownRenderer.mermaid.actions.resetViewTitle": "Скинути вигляд",
"markdownRenderer.mermaid.toast.downloadFailed": "Не вдалося завантажити діаграму",
"contextPanel.preview.title": "Попередній перегляд",
"contextPanel.preview.description": "Використайте дії проєкту або кнопку Preview у терміналі, щоб відкрити перегляд.",