From fb8f4d68e1696978e645293b46f4563375d2d814 Mon Sep 17 00:00:00 2001 From: lingyun14 Date: Wed, 10 Jun 2026 16:51:29 +0800 Subject: [PATCH] feat: backup skills directory (#8700) * feat: include skills directory in backup * Update settings.json * Update settings.json * Update settings.json * Update settings.json * Update settings.json --- astrbot/core/backup/constants.py | 2 ++ dashboard/src/i18n/locales/en-US/features/settings.json | 6 +++--- dashboard/src/i18n/locales/ru-RU/features/settings.json | 8 ++++---- dashboard/src/i18n/locales/zh-CN/features/settings.json | 6 +++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/astrbot/core/backup/constants.py b/astrbot/core/backup/constants.py index 493d2670c..041fa407b 100644 --- a/astrbot/core/backup/constants.py +++ b/astrbot/core/backup/constants.py @@ -29,6 +29,7 @@ from astrbot.core.utils.astrbot_path import ( get_astrbot_config_path, get_astrbot_plugin_data_path, get_astrbot_plugin_path, + get_astrbot_skills_path, get_astrbot_t2i_templates_path, get_astrbot_temp_path, get_astrbot_webchat_path, @@ -78,6 +79,7 @@ def get_backup_directories() -> dict[str, str]: "t2i_templates": get_astrbot_t2i_templates_path(), # T2I 模板 "webchat": get_astrbot_webchat_path(), # WebChat 数据 "temp": get_astrbot_temp_path(), # 临时文件 + "skills": get_astrbot_skills_path(), # Skills } diff --git a/dashboard/src/i18n/locales/en-US/features/settings.json b/dashboard/src/i18n/locales/en-US/features/settings.json index b497659ee..c561e9d8c 100644 --- a/dashboard/src/i18n/locales/en-US/features/settings.json +++ b/dashboard/src/i18n/locales/en-US/features/settings.json @@ -99,8 +99,8 @@ }, "export": { "title": "Create Backup", - "description": "Export all data as a ZIP backup file, including database, knowledge base, config and attachments.", - "includes": "Backup includes: Main database, Knowledge bases (metadata + vector index + documents), Config files, Attachment files", + "description": "Export all data as a ZIP backup file, including database, knowledge base, config, attachments and skills.", + "includes": "Backup includes: Main database, Knowledge bases (metadata + vector index + documents), Config files, Attachment files, Skills", "button": "Start Export", "processing": "Exporting...", "wait": "Please wait, packaging data...", @@ -140,7 +140,7 @@ "currentVersion": "Current Version", "backupTime": "Backup Time", "matchTitle": "✅ Version Match", - "matchMessage": "Import will clear and overwrite all existing data, including:\n• Main database (conversations, settings, etc.)\n• Knowledge bases\n• Plugins and plugin data\n• Configuration files\n\nThis action cannot be undone! Do you want to continue?", + "matchMessage": "Import will clear and overwrite all existing data, including:\n• Main database (conversations, settings, etc.)\n• Knowledge bases\n• Plugins and plugin data\n• Configuration files\n• Skills\n\nThis action cannot be undone! Do you want to continue?", "minorDiffTitle": "⚠️ Version Difference Warning", "minorDiffMessage": "Minor version differences are usually compatible, but there may be some data structure changes.\nImport will clear and overwrite all existing data!\n\nDo you want to continue?", "majorDiffTitle": "⛔ Cannot Import", diff --git a/dashboard/src/i18n/locales/ru-RU/features/settings.json b/dashboard/src/i18n/locales/ru-RU/features/settings.json index d1100435f..eb78ec687 100644 --- a/dashboard/src/i18n/locales/ru-RU/features/settings.json +++ b/dashboard/src/i18n/locales/ru-RU/features/settings.json @@ -1,4 +1,4 @@ -{ +{ "network": { "title": "Сеть", "githubProxy": { @@ -99,8 +99,8 @@ }, "export": { "title": "Создать резервную копию", - "description": "Экспорт всех данных в ZIP-архив, включая базы данных, базу знаний, конфигурации и вложения.", - "includes": "Включает: основную БД, векторные индексы знаний, файлы конфигурации, медиа-вложения.", + "description": "Экспорт всех данных в ZIP-архив, включая базы данных, базу знаний, конфигурации, вложения и Skills.", + "includes": "Включает: основную БД, векторные индексы знаний, файлы конфигурации, медиа-вложения, Skills.", "button": "Начать экспорт", "processing": "Экспорт...", "wait": "Пожалуйста, подождите, мы упаковываем данные...", @@ -140,7 +140,7 @@ "currentVersion": "Текущая версия", "backupTime": "Дата создания", "matchTitle": "✅ Версии совпадают", - "matchMessage": "Импорт перезапишет все текущие данные, включая:\n• Основную БД (чаты, настройки)\n• Базы знаний\n• Плагины и их данные\n• Файлы конфигурации\n\nЭто действие необратимо! Продолжить?", + "matchMessage": "Импорт перезапишет все текущие данные, включая:\n• Основную БД (чаты, настройки)\n• Базы знаний\n• Плагины и их данные\n• Файлы конфигурации\n• Skills\n\nЭто действие необратимо! Продолжить?", "minorDiffTitle": "⚠️ Разница в минорной версии", "minorDiffMessage": "Разница в минорных версиях обычно допустима, но структура данных могла немного измениться. Все текущие данные будут удалены!\n\nПродолжить импорт?", "majorDiffTitle": "⛔ Импорт невозможен", diff --git a/dashboard/src/i18n/locales/zh-CN/features/settings.json b/dashboard/src/i18n/locales/zh-CN/features/settings.json index 092b4a5d9..de5748f2c 100644 --- a/dashboard/src/i18n/locales/zh-CN/features/settings.json +++ b/dashboard/src/i18n/locales/zh-CN/features/settings.json @@ -99,8 +99,8 @@ }, "export": { "title": "创建备份", - "description": "将所有数据导出为 ZIP 备份文件,包括数据库、知识库、配置和附件。", - "includes": "备份包含:主数据库、知识库(元数据+向量索引+文档)、配置文件、附件文件", + "description": "将所有数据导出为 ZIP 备份文件,包括数据库、知识库、配置、附件和 Skills。", + "includes": "备份包含:主数据库、知识库(元数据+向量索引+文档)、配置文件、附件文件、Skills", "button": "开始导出", "processing": "正在导出...", "wait": "请稍候,正在打包数据...", @@ -140,7 +140,7 @@ "currentVersion": "当前版本", "backupTime": "备份时间", "matchTitle": "✅ 版本匹配", - "matchMessage": "导入将会清空并覆盖现有的所有数据,包括:\n• 主数据库(对话记录、配置等)\n• 知识库数据\n• 插件及插件数据\n• 配置文件\n\n此操作不可撤销!是否确认继续?", + "matchMessage": "导入将会清空并覆盖现有的所有数据,包括:\n• 主数据库(对话记录、配置等)\n• 知识库数据\n• 插件及插件数据\n• 配置文件\n• Skills\n\n此操作不可撤销!是否确认继续?", "minorDiffTitle": "⚠️ 版本差异警告", "minorDiffMessage": "小版本差异通常是兼容的,但可能存在少量数据结构变化。\n导入将会清空并覆盖现有的所有数据!\n\n是否确认继续导入?", "majorDiffTitle": "⛔ 无法导入",