mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-13 09:16:04 +00:00
feat(platform): show deployment outbound IPs on adapter config forms
Cloud/NAT deployments couldn't complete WeCom-family / Official Account / QQ Official setup because the trusted-IP (IP whitelist) value — the server's egress IPs — was nowhere visible in LangBot. - config.yaml: new system.outbound_ips list (env: SYSTEM__OUTBOUND_IPS, comma-separated), exposed via GET /api/v1/system/info - dynamic form: generic __system.*-named display-only fields resolved from systemContext (same namespace as show_if), one read-only row per value with a copy button, excluded from form state and emitted values; hidden entirely when the deployment provides no IPs - manifests: trusted-IP display field for wecom, wecomcs, wecombot, officialaccount, qqofficial Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
DynamicFormItemType,
|
||||
IDynamicFormItemOption,
|
||||
IShowIfCondition,
|
||||
SYSTEM_FIELD_PREFIX,
|
||||
} from '@/app/infra/entities/form/dynamic';
|
||||
import { I18nObject } from '@/app/infra/entities/common';
|
||||
|
||||
@@ -50,6 +51,11 @@ export function getDefaultValues(
|
||||
): Record<string, any> {
|
||||
return itemConfigList.reduce(
|
||||
(acc, item) => {
|
||||
// `__system.*` fields are display-only (resolved from systemContext);
|
||||
// their placeholder defaults must not leak into the config values.
|
||||
if (item.name.startsWith(SYSTEM_FIELD_PREFIX)) {
|
||||
return acc;
|
||||
}
|
||||
acc[item.name] = item.default;
|
||||
return acc;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user