@larksuite/openclaw-lark 2026.4.10-beta.0 → 2026.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
*
|
|
15
15
|
* 所有卡片统一使用 form 容器,交互组件在本地缓存值,
|
|
16
16
|
* 提交时通过 form_value 一次性回调,避免独立回调导致的 loading 闪烁。
|
|
17
|
+
*
|
|
18
|
+
* 注意:提交按钮必须设置 value 字段。飞书客户端会校验交互组件是否携带 value,
|
|
19
|
+
* 缺失时直接报 200340 错误,回调不会发送到服务端。虽然 form_submit 场景下
|
|
20
|
+
* form_value 是主要数据载体,但 value 作为按钮的合法性标记仍需存在。
|
|
17
21
|
*/
|
|
18
22
|
import type { ClawdbotConfig, OpenClawPluginApi } from 'openclaw/plugin-sdk';
|
|
19
23
|
/**
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
*
|
|
16
16
|
* 所有卡片统一使用 form 容器,交互组件在本地缓存值,
|
|
17
17
|
* 提交时通过 form_value 一次性回调,避免独立回调导致的 loading 闪烁。
|
|
18
|
+
*
|
|
19
|
+
* 注意:提交按钮必须设置 value 字段。飞书客户端会校验交互组件是否携带 value,
|
|
20
|
+
* 缺失时直接报 200340 错误,回调不会发送到服务端。虽然 form_submit 场景下
|
|
21
|
+
* form_value 是主要数据载体,但 value 作为按钮的合法性标记仍需存在。
|
|
18
22
|
*/
|
|
19
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
24
|
exports.handleAskUserAction = handleAskUserAction;
|
|
@@ -537,12 +541,19 @@ function buildAskUserCard(questions, questionId) {
|
|
|
537
541
|
}
|
|
538
542
|
formElements.push(...buildQuestionFormElements(questions[i], i));
|
|
539
543
|
}
|
|
540
|
-
// Submit button
|
|
544
|
+
// Submit button.
|
|
545
|
+
// questionId is encoded in both button name and value for resilience:
|
|
546
|
+
// - `value` is the primary carrier and is included in card.action.trigger
|
|
547
|
+
// callbacks per Feishu's documented event structure.
|
|
548
|
+
// - `name` acts as a fallback in case the SDK version strips value
|
|
549
|
+
// from form_submit events.
|
|
550
|
+
// Both are needed because a button without a `value` field fails
|
|
551
|
+
// Feishu's client-side interactive-component validation with code 200340.
|
|
541
552
|
formElements.push({ tag: 'hr' });
|
|
542
553
|
formElements.push({
|
|
543
554
|
tag: 'button',
|
|
544
|
-
// Encode questionId in button name — value does NOT propagate for form submit buttons
|
|
545
555
|
name: `${SUBMIT_BUTTON_PREFIX}${questionId}`,
|
|
556
|
+
value: { action: 'ask_user_submit', operation_id: questionId },
|
|
546
557
|
text: {
|
|
547
558
|
tag: 'plain_text',
|
|
548
559
|
content: '📮 提交',
|