#23261: fix(feishu): bitable tools fail to register with accounts config pattern
channel: feishu
size: XS
Cluster:
Feishu Integration Enhancements
## Problem
`registerFeishuBitableTools` directly reads `config.channels.feishu.appId/appSecret`, which returns `undefined` when users configure Feishu credentials via the `accounts` sub-object pattern (e.g. `channels.feishu.accounts.myapp.appId`).
This means bitable tools silently skip registration for any user using the accounts-based configuration.
## Fix
Replace the direct config read with `listEnabledFeishuAccounts(api.config)`, using `accounts[0]` to create the client — matching the pattern already used by `docx.ts`, `drive.ts`, and `wiki.ts`.
### Changes
- `extensions/feishu/src/bitable.ts`: Import `listEnabledFeishuAccounts` from `./accounts.js`, remove unused `FeishuConfig` type import, rewrite credential resolution to use the accounts helper.
Fixes #23243
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Fixes bitable tool registration for users with accounts-based Feishu configuration by replacing direct config read with `listEnabledFeishuAccounts()` helper.
**Key changes:**
- Replaced direct `config.channels.feishu.appId/appSecret` access with `listEnabledFeishuAccounts(api.config)`
- Uses `accounts[0]` to create the client, matching the pattern in `docx.ts`, `drive.ts`, and `wiki.ts`
- Removed unused `FeishuConfig` type import, added `listEnabledFeishuAccounts` import
The fix ensures bitable tools register correctly for both legacy (top-level credentials) and new (accounts sub-object) configuration patterns.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with no risk
- The change is a straightforward refactor that aligns bitable.ts with the established pattern used across docx.ts, drive.ts, and wiki.ts. The implementation correctly uses the accounts helper, properly handles the case when no accounts are configured, and maintains backward compatibility via the listEnabledFeishuAccounts function which handles both legacy and new config patterns.
- No files require special attention
<sub>Last reviewed commit: b1c3116</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#19871: fix(feishu): support multi-account config in bitable tools
by linbojin · 2026-02-18
92.9%
#23255: fix(feishu): use listEnabledFeishuAccounts for bitable tool registr...
by SidQin-cyber · 2026-02-22
89.5%
#15671: fix(feishu): Credentials check bug of Feishu bitable tools when usi...
by zxh0916 · 2026-02-13
86.8%
#16284: fix(feishu): route tool credentials by account parameter
by Yaxuan42 · 2026-02-14
84.7%
#16337: feat(feishu): sync community plugin updates from clawdbot-feishu v0...
by graydawnc · 2026-02-14
75.9%
#14674: feat(feishu): add feishu_chat tool for chat info/member queries
by liuweifly · 2026-02-12
74.9%
#9268: Fix: Register feishu as official channel in CHAT_CHANNEL_ORDER
by vishaltandale00 · 2026-02-05
71.0%
#10513: feat(feishu): add quota optimization flags
by BigUncle · 2026-02-06
70.8%
#20973: Fix: Feishu duplicate plugin ID, Docker pairing docs, broken formal...
by neipor · 2026-02-19
70.5%
#14037: docs: improved permission configuration instructions
by LHB6540 · 2026-02-11
69.1%