feat(mcp): add custom headers functionality to MCP service dialog

Introduce a new feature allowing users to add custom HTTP headers for MCP requests. This includes:

- A user interface for adding and managing custom headers within the MCP service dialog.
- Localization support for custom headers in English, Korean, Russian, and Chinese.
- Updates to the form submission process to include custom headers, ensuring they are serialized correctly.
- Removal of warnings for ignored headers, as all headers are now captured in the custom headers editor.

This enhancement improves the flexibility and usability of the MCP service configuration.
This commit is contained in:
wizardchen
2026-06-22 21:03:42 +08:00
committed by lyingbug
parent 518add2641
commit 94ce8fedb1
5 changed files with 141 additions and 15 deletions
+8 -2
View File
@@ -4037,6 +4037,13 @@ export default {
createFailed: 'Не удалось создать сервис MCP',
updateFailed: 'Не удалось обновить сервис MCP'
},
customHeaders: {
label: 'Пользовательские заголовки (необязательно)',
desc: 'HTTP-заголовки, добавляемые к каждому запросу MCP; обычно используются для аутентификации на корпоративном шлюзе, трассировки и т. п.',
add: 'Добавить заголовок',
keyPlaceholder: 'Имя заголовка',
valuePlaceholder: 'Значение заголовка'
},
codeImport: {
toggle: 'Импорт из кода',
hint: 'Вставьте стандартную JSON-конфигурацию mcpServers для автозаполнения формы',
@@ -4053,8 +4060,7 @@ export default {
},
toasts: {
filled: 'Форма заполнена, проверьте и сохраните',
multipleServers: 'Обнаружено несколько сервисов, импортирован первый: {name}',
ignoredHeaders: 'Следующие заголовки не импортированы: {headers}'
multipleServers: 'Обнаружено несколько сервисов, импортирован первый: {name}'
}
}
},