Skip to content

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

Merged
yinwm merged 2 commits intosipeed:mainfrom
liuliqiang:feat/add-lark-support
Mar 18, 2026
Merged

feat: add IsLark field to FeishuConfig to switch between Feishu and Lark domains#1753
yinwm merged 2 commits intosipeed:mainfrom
liuliqiang:feat/add-lark-support

Conversation

@liuliqiang
Copy link
Contributor

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.

📝 Description

Lark 是飞书的国际化版本,API 完全一致,唯一区别是域名:

  • 飞书: https://open.feishu.cn (lark.FeishuBaseUrl)
  • Lark: https://open.larksuite.com (lark.LarkBaseUrl)

本 PR 在 FeishuConfig 中新增 is_lark 字段(环境变量 PICOCLAW_CHANNELS_FEISHU_IS_LARK),设为 true
时自动将 HTTP client 和 WS client 的域名切换为 Lark 国际版。

同时修复了原有代码中 WS client 默认使用 LarkBaseUrl 而 HTTP client 使用 FeishuBaseUrl
的域名不一致问题,统一默认为 FeishuBaseUrl

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

N/A

📚 Technical Context (Skip for Docs)

🧪 Test Environment

  • Hardware: Mac (Apple Silicon)
  • OS: macOS
  • Model/Provider: N/A
  • Channels: Feishu / Lark

📸 Evidence (Optional)

Click to view Logs/Screenshots

N/A(环境 Go 版本不匹配,未能本地运行完整构建,代码变更已通过人工审查确认正确性)

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

liuliqiang and others added 2 commits March 18, 2026 22:00
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>
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>
@CLAassistant
Copy link

CLAassistant commented Mar 18, 2026

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@yinwm yinwm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! The core functionality is correctly implemented:

  • API client correctly switches base URL using lark.WithOpenBaseUrl()
  • WebSocket client correctly sets domain via larkws.WithDomain()
  • Frontend form, i18n, and docs are complete

Two minor informational findings (non-blocking):

  1. Log message shows "Feishu" regardless of IsLark config - cosmetic only
  2. .env.example missing IS_LARK example - not affecting functionality

These can be addressed in a follow-up if desired.

@yinwm yinwm merged commit 08f305d into sipeed:main Mar 18, 2026
4 checks passed
@yinwm
Copy link
Collaborator

yinwm commented Mar 18, 2026

thanks for the pr

@liuliqiang liuliqiang deleted the feat/add-lark-support branch March 19, 2026 02:37
@Orgmar
Copy link
Contributor

Orgmar commented Mar 19, 2026

@liuliqiang 飞书和Lark域名切换这个功能很实用,通过一个 is_lark 字段就搞定了,同时还修复了 WS client 和 HTTP client 域名不一致的问题,考虑得很周全。

我们正在组建 PicoClaw Dev Group,方便贡献者们在 Discord 上交流协作。如果感兴趣的话,发封邮件到 support@sipeed.com,主题写 [Join PicoClaw Dev Group] liuliqiang,我们会把 Discord 邀请链接发给你!

j0904 pushed a commit to j0904/picoclaw that referenced this pull request Mar 22, 2026
…ark domains (sipeed#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>
renato0307 pushed a commit to renato0307/picoclaw that referenced this pull request Mar 26, 2026
…ark domains (sipeed#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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants