feat: add IsLark field to FeishuConfig to switch between Feishu and Lark domains (#1753)

* feat(feishu): add Lark (international) support via IsLark config field

Add IsLark field to FeishuConfig to switch between Feishu and Lark
domains. Also fix domain inconsistency where WS client defaulted to
LarkBaseUrl while HTTP client used FeishuBaseUrl.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update documentation and web UI for Lark support

Add is_lark field to config example, feishu docs, i18n translations,
and web frontend form.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Liqiang Lau
2026-03-19 00:29:55 +08:00
committed by GitHub
parent eb86e10e5c
commit 08f305d712
7 changed files with 41 additions and 14 deletions
@@ -2,7 +2,7 @@ import { useTranslation } from "react-i18next"
import type { ChannelConfig } from "@/api/channels"
import { maskedSecretPlaceholder } from "@/components/secret-placeholder"
import { Field, KeyInput } from "@/components/shared-form"
import { Field, KeyInput, SwitchCardField } from "@/components/shared-form"
import { Input } from "@/components/ui/input"
interface FeishuFormProps {
@@ -16,6 +16,10 @@ function asString(value: unknown): string {
return typeof value === "string" ? value : ""
}
function asBool(value: unknown): boolean {
return typeof value === "boolean" ? value : false
}
function asStringArray(value: unknown): string[] {
if (!Array.isArray(value)) return []
return value.filter((item): item is string => typeof item === "string")
@@ -98,6 +102,12 @@ export function FeishuForm({
)}
/>
</Field>
<SwitchCardField
label={t("channels.field.isLark")}
hint={t("channels.form.desc.isLark")}
checked={asBool(config.is_lark)}
onCheckedChange={(checked) => onChange("is_lark", checked)}
/>
<Field
label={t("channels.field.allowFrom")}
hint={t("channels.form.desc.allowFrom")}
+2
View File
@@ -259,6 +259,7 @@
"placeholderText": "Placeholder Text",
"groupTriggerMentionOnly": "Group Mention Only",
"groupTriggerPrefixes": "Group Trigger Prefixes",
"isLark": "Lark (International)",
"allowFrom": "Allow From",
"allowFromPlaceholder": "e.g. 123456, 789012",
"allowOrigins": "Allow Origins",
@@ -290,6 +291,7 @@
"placeholderEnabled": "Enable temporary placeholder messages before the final reply is sent.",
"groupTriggerMentionOnly": "In group chats, respond only when the bot is mentioned.",
"groupTriggerPrefixes": "Custom group-chat trigger prefixes, separated by commas.",
"isLark": "Use Lark international domain (open.larksuite.com) instead of Feishu domain (open.feishu.cn).",
"allowFrom": "Allowed user or group IDs, separated by commas.",
"allowOrigins": "Allowed origin domains, separated by commas.",
"wsUrl": "WebSocket service URL.",
+2
View File
@@ -259,6 +259,7 @@
"placeholderText": "占位文案",
"groupTriggerMentionOnly": "群聊仅提及时响应",
"groupTriggerPrefixes": "群聊触发前缀",
"isLark": "Lark(国际版)",
"allowFrom": "允许来源",
"allowFromPlaceholder": "例如 123456, 789012",
"allowOrigins": "允许来源域名",
@@ -290,6 +291,7 @@
"placeholderEnabled": "在最终回复发送前,先发送临时占位消息。",
"groupTriggerMentionOnly": "在群聊中仅当提及机器人时才响应。",
"groupTriggerPrefixes": "群聊触发前缀,多个值用逗号分隔。",
"isLark": "使用 Lark 国际版域名(open.larksuite.com)替代飞书域名(open.feishu.cn)。",
"allowFrom": "允许访问的用户或群组 ID,多个值用逗号分隔。",
"allowOrigins": "允许访问的来源域名,多个值用逗号分隔。",
"wsUrl": "WebSocket 服务地址。",