mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-11 04:03:16 +08:00
feat(feishu): interactive approval and question cards with buttons
Render Harness approval and single-choice question interactions as interactive Feishu cards with approve/reject and answer buttons, matching the already-available interactionCards behaviour. Cards are now the default; set DSH_IM_INTERACTION_CARDS=0 (or interactionCards=false) to keep the plain-text reply flow. - bridge.mjs: approve:/reject:/answer: card actions, interactionCards option, gated approval render hook, interactive question presentation, and operationArguments/printableText helpers; refactor the inline question answer into #submitQuestionAnswer so both text replies and card buttons share one path. - feishu-cards.mjs: approvalCard (approve/reject) and questionCard (option buttons) templates. - feishu-runtime.mjs: default interactionCards from env (on). - harness-approval.mjs: optional channel render hook + submitByApprovalId. - i18n-en: add the new card t() keys. - Tests: pin the plain-text reply flow in state-machine suites that drive it, and add dedicated card tests for the default approve/reject, answer buttons, and the text fallback. Full suite shows no new failures versus upstream.
This commit is contained in:
parent
c2be2389b0
commit
0b42ea9889
8 changed files with 778 additions and 212 deletions
394
lib/index.js
394
lib/index.js
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue