feat(hermes): render providers: dict overlays as read-only cards

ProviderCard now detects Hermes provider entries sourced from the
v12+ `providers:` dict via the `_cc_source` marker that the backend
injects, and renders a "Hermes Managed" badge beside the title.
ProviderActions receives an `isReadOnly` prop that disables the Edit
and Delete buttons (with a tooltip pointing the user at Hermes Web
UI) while keeping Switch and Duplicate enabled — switching only
touches `model.*`, and duplicate lets users fork the overlay into
their own `custom_providers:` list.

Three-locale i18n keys `provider.managedByHermes` /
`provider.managedByHermesHint` added.
This commit is contained in:
Jason
2026-04-20 10:36:09 +08:00
parent 3f4739365e
commit abb305a82f
5 changed files with 42 additions and 5 deletions
+2
View File
@@ -141,6 +141,8 @@
"sortUpdateFailed": "Failed to update sort order",
"configureUsage": "Configure usage query",
"officialPartner": "Official Partner",
"managedByHermes": "Hermes Managed",
"managedByHermesHint": "Defined in Hermes' providers: dict. Edit or remove it via Hermes Web UI.",
"openTerminal": "Open Terminal",
"terminalOpened": "Terminal opened",
"terminalOpenFailed": "Failed to open terminal",
+2
View File
@@ -141,6 +141,8 @@
"sortUpdateFailed": "並び順の更新に失敗しました",
"configureUsage": "利用状況を設定",
"officialPartner": "公式パートナー",
"managedByHermes": "Hermes 管理",
"managedByHermesHint": "Hermes の providers: dict で定義されています。Hermes Web UI で編集または削除してください。",
"openTerminal": "ターミナルを開く",
"terminalOpened": "ターミナルを開きました",
"terminalOpenFailed": "ターミナルを開けませんでした",
+2
View File
@@ -141,6 +141,8 @@
"sortUpdateFailed": "排序更新失败",
"configureUsage": "配置用量查询",
"officialPartner": "官方合作伙伴",
"managedByHermes": "Hermes 托管",
"managedByHermesHint": "该条目定义在 Hermes 的 providers: dict,请在 Hermes Web UI 中编辑或删除。",
"openTerminal": "打开终端",
"terminalOpened": "终端已打开",
"terminalOpenFailed": "打开终端失败",