Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions astrbot/core/config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -3207,9 +3207,9 @@ def get_local_permission_defaults(system: str | None = None) -> dict:
"type": "string",
},
"disable_metrics": {
"description": "禁用匿名使用统计",
"description": "禁用用户体验改进计划",
"type": "bool",
"hint": "禁用后,AstrBot 将不再上传匿名使用统计数据。",
"hint": "开启后,AstrBot 将不再上传用户体验改进计划所需的匿名使用数据。",
},
"log_level": {
"type": "string",
Expand Down Expand Up @@ -4830,6 +4830,11 @@ def get_local_permission_defaults(system: str | None = None) -> dict:
"type": "list",
"items": {"type": "string"},
},
"disable_metrics": {
"description": "禁用用户体验改进计划",
"type": "bool",
"hint": "开启后,AstrBot 将不再上传用户体验改进计划所需的匿名使用数据。",
},
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1257,8 +1257,8 @@
"hint": "External services may access AstrBot's backend through callback links generated by AstrBot (such as file download links). Since AstrBot cannot automatically determine the externally accessible host address in the deployment environment, this configuration item is needed to explicitly specify how external services should access AstrBot's address. Examples: [http://localhost:6185](http://localhost:6185), [https://example.com](https://example.com), etc."
},
"disable_metrics": {
"description": "Disable Anonymous Usage Statistics",
"hint": "When disabled, AstrBot will not upload anonymous usage statistics."
"description": "Disable User Experience Improvement Program",
"hint": "When enabled, AstrBot stops uploading the anonymous usage data used by the User Experience Improvement Program."
},
"dashboard": {
"trust_proxy_headers": {
Expand Down
4 changes: 4 additions & 0 deletions dashboard/src/i18n/locales/en-US/features/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
"t2iRendering": {
"title": "Text-to-Image",
"subtitle": "Rendering strategy, endpoint, and custom templates for text-to-image."
},
"telemetry": {
"title": "User Experience Improvement Program",
"subtitle": "When enabled, anonymous usage data is collected to help improve AstrBot."
}
},
"timePreview": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1354,8 +1354,8 @@
"hint": "外部サービスは、AstrBot が生成したコールバックリンク(ファイルダウンロードリンクなど)を通じて AstrBot バックエンドへアクセスする場合があります。AstrBot はデプロイ環境で外部から到達可能なホストアドレス(ホスト)を自動判定できないため、この設定で外部サービスから AstrBot へアクセスするアドレスを明示的に指定します。例: [http://localhost:6185](http://localhost:6185)、[https://example.com](https://example.com)。"
},
"disable_metrics": {
"description": "匿名利用統計を無効化",
"hint": "この設定を有効にすると、AstrBot は匿名の利用統計データをアップロードしません。"
"description": "ユーザー体験改善プログラムを無効化",
"hint": "有効にすると、AstrBot はユーザー体験改善プログラムで使用する匿名の利用データを送信しなくなります。"
},
"dashboard": {
"trust_proxy_headers": {
Expand Down
4 changes: 4 additions & 0 deletions dashboard/src/i18n/locales/ja-JP/features/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
"t2iRendering": {
"title": "長文の画像化",
"subtitle": "長文を画像としてレンダリングする際の方式、エンドポイント、カスタムテンプレート。"
},
"telemetry": {
"title": "ユーザー体験改善プログラム",
"subtitle": "有効にすると、AstrBot の改善のため匿名の利用データを収集します。"
}
},
"timePreview": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1410,8 +1410,8 @@
"hint": "Используется для сервисов, требующих обратных выливов (например, в песочнице)."
},
"disable_metrics": {
"description": "Отключить анонимную статистику",
"hint": "После отключения AstrBot не будет отправлять анонимные данные об использовании."
"description": "Отключить программу улучшения пользовательского опыта",
"hint": "После включения AstrBot перестанет отправлять анонимные данные об использовании, собираемые в рамках программы улучшения пользовательского опыта."
},
"dashboard": {
"trust_proxy_headers": {
Expand Down
4 changes: 4 additions & 0 deletions dashboard/src/i18n/locales/ru-RU/features/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
"t2iRendering": {
"title": "Текст в изображение",
"subtitle": "Стратегия, endpoint и пользовательские шаблоны для рендеринга."
},
"telemetry": {
"title": "Программа улучшения пользовательского опыта",
"subtitle": "При включении собираются анонимные данные об использовании для улучшения AstrBot."
}
},
"timePreview": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1278,8 +1278,8 @@
"hint": "外部服务可能会通过 AstrBot 生成的回调链接(如文件下载链接)访问 AstrBot 后端。由于 AstrBot 无法自动判断部署环境中对外可达的主机地址(host),因此需要通过此配置项显式指定外部服务如何访问 AstrBot 的地址。如 [http://localhost:6185](http://localhost:6185),[https://example.com](https://example.com) 等。"
},
"disable_metrics": {
"description": "禁用匿名使用统计",
"hint": "禁用后,AstrBot 将不再上传匿名使用统计数据。"
"description": "禁用用户体验改进计划",
"hint": "开启后,AstrBot 将不再上传用户体验改进计划所需的匿名使用数据。"
},
"dashboard": {
"trust_proxy_headers": {
Expand Down
4 changes: 4 additions & 0 deletions dashboard/src/i18n/locales/zh-CN/features/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
"t2iRendering": {
"title": "文本转图像",
"subtitle": "文本转图像渲染策略、端点和自定义模板。"
},
"telemetry": {
"title": "用户体验改进计划",
"subtitle": "启用后将上报匿名使用数据,用于改进 AstrBot。"
}
},
"timePreview": {
Expand Down
41 changes: 35 additions & 6 deletions dashboard/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@
@focusout.capture="scheduleSystemConfigAutoSave"
>
<div class="system-config-group__heading">
<div class="system-config-group__title">{{ group.title }}</div>
<div>
<div class="system-config-group__title">{{ group.title }}</div>
<div class="system-config-group__subtitle">{{ group.subtitle }}</div>
</div>
<div
v-if="group.key === 'runtime' && timezoneTimePreview"
class="timezone-time-preview"
Expand Down Expand Up @@ -147,7 +150,12 @@
class="system-config-group"
@focusout.capture="scheduleSystemConfigAutoSave"
>
<div class="system-config-group__title">{{ group.title }}</div>
<div class="system-config-group__heading">
<div>
<div class="system-config-group__title">{{ group.title }}</div>
<div class="system-config-group__subtitle">{{ group.subtitle }}</div>
</div>
</div>
<AstrBotConfigV4
:metadata="group.metadata"
:iterable="systemConfigData"
Expand All @@ -170,7 +178,12 @@
class="system-config-group"
@focusout.capture="scheduleSystemConfigAutoSave"
>
<div class="system-config-group__title">{{ group.title }}</div>
<div class="system-config-group__heading">
<div>
<div class="system-config-group__title">{{ group.title }}</div>
<div class="system-config-group__subtitle">{{ group.subtitle }}</div>
</div>
</div>
<AstrBotConfigV4
:metadata="group.metadata"
:iterable="systemConfigData"
Expand Down Expand Up @@ -205,7 +218,12 @@
class="system-config-group"
@focusout.capture="scheduleSystemConfigAutoSave"
>
<div class="system-config-group__title">{{ group.title }}</div>
<div class="system-config-group__heading">
<div>
<div class="system-config-group__title">{{ group.title }}</div>
<div class="system-config-group__subtitle">{{ group.subtitle }}</div>
</div>
</div>
<AstrBotConfigV4
:metadata="group.metadata"
:iterable="systemConfigData"
Expand Down Expand Up @@ -743,6 +761,7 @@ const systemConfigGroups = computed(() => {
return {
key,
title: tm(`systemConfig.groups.${key}.title`),
subtitle: tm(`systemConfig.groups.${key}.subtitle`),
metadata: {
[key]: {
type: 'object',
Expand Down Expand Up @@ -785,12 +804,13 @@ const systemConfigGroups = computed(() => {
't2i_endpoint',
't2i_template',
't2i_active_template'
])
]),
createGroup('telemetry', ['disable_metrics'])
].filter((group) => Object.keys(group.metadata[group.key].items).length > 0);
});

const generalSystemConfigGroups = computed(() => systemConfigGroups.value.filter((group) => (
group.key === 'runtime' || group.key === 'logs' || group.key === 'tempStorage'
group.key === 'runtime' || group.key === 'logs' || group.key === 'tempStorage' || group.key === 'telemetry'
)));
const appearanceSystemConfigGroups = computed(() => systemConfigGroups.value.filter((group) => (
group.key === 't2iRendering'
Expand Down Expand Up @@ -1423,6 +1443,15 @@ onUnmounted(() => {
line-height: 1.32;
}

.system-config-group__subtitle {
margin-top: 2px;
color: rgba(var(--v-theme-on-surface), 0.68);
font-size: 0.8rem;
font-weight: 500;
letter-spacing: 0;
line-height: 1.45;
}

.timezone-time-preview {
display: flex;
flex-wrap: wrap;
Expand Down
Loading