← Back to PRs

#14674: feat(feishu): add feishu_chat tool for chat info/member queries

by liuweifly open 2026-02-12 13:31 View on GitHub →
channel: feishu stale size: S
## Summary - add new `feishu_chat` tool with actions: - `members`: query chat member list with pagination and member id type - `info`: fetch chat metadata - register `feishu_chat` in the Feishu extension plugin startup - extend Feishu tools config/types/schema with `tools.chat?: boolean` - default `tools.chat` to `true` in `resolveToolsConfig` - add unit coverage for default chat enablement and schema acceptance ## Files changed - `extensions/feishu/src/chat.ts` - `extensions/feishu/src/chat-schema.ts` - `extensions/feishu/index.ts` - `extensions/feishu/src/types.ts` - `extensions/feishu/src/tools-config.ts` - `extensions/feishu/src/config-schema.ts` - `extensions/feishu/src/tools-config.test.ts` ## Validation Executed locally: ```bash pnpm -C /Users/nereo/.openclaw/workspace-nereo/openclaw exec tsc -p tsconfig.json --noEmit pnpm -C /Users/nereo/.openclaw/workspace-nereo/openclaw exec vitest run \ extensions/feishu/src/tools-config.test.ts \ extensions/feishu/src/channel.test.ts \ extensions/feishu/src/bot.checkBotMentioned.test.ts ``` Result: all checks passed (typecheck clean, 3 test files / 8 tests passing). <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds a new Feishu tool (`feishu_chat`) with two actions (`members` with pagination and `info` for chat metadata), registers it in the Feishu plugin startup, and extends Feishu tool configuration/types/schema to include a `tools.chat` toggle (defaulting to enabled). It also adds unit tests covering the default enablement and config schema acceptance. The implementation follows the existing Feishu tool patterns: it resolves the first enabled+configured account, checks the per-account tool config before registering, uses the shared `json()` response shape (`content` + `details`), and calls the Feishu SDK for `im.chat.get` and `im.chatMembers.get`. <h3>Confidence Score: 5/5</h3> - This PR appears safe to merge with minimal risk. - Changes are additive and follow established Feishu tool patterns; config/schema/types are updated consistently and tests cover the new default config behavior. No merge-blocking issues were found in the diff after tracing the surrounding account/tool registration codepaths. - No files require special attention <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs