Skip to content

feat(channels): enhance DingTalk status cards - #11429

Draft
qqqys wants to merge 2 commits into
QwenLM:mainfrom
qqqys:codex/new-status-card-local-20260908
Draft

qqqys wants to merge 2 commits into
QwenLM:mainfrom
qqqys:codex/new-status-card-local-20260908

Conversation

@qqqys

@qqqys qqqys commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does

This PR refreshes DingTalk's streaming status card while keeping the interaction surface intentionally small. The card includes the originating request, shows the owning session's model and reasoning effort when configured, removes the provider suffix from display, and offers only start-new-session and compress-context actions after completion.

Tool permission requests continue to use the dedicated native permission card introduced by #10457. This PR does not duplicate permission controls inside the status card.

The callback path accepts DingTalk-generated numeric component suffixes only for known status-card actions. Existing question-card and permission-card callback behavior remains unchanged.

Why it's needed

The previous status card did not preserve enough context once a conversation became busy. Showing the original request and authoritative session metadata makes each result easier to identify, while two owner-bound terminal actions cover the common follow-up operations without turning the card into a control panel.

Reviewer Test Plan

How to verify

Enable DingTalk interactive status cards and send a request that produces streamed output. Confirm that the card shows the original request, updates through the task lifecycle, and displays the active model and non-default reasoning effort. Disable either metadata setting and confirm only the selected field is hidden.

After a task finishes, confirm the only quick actions are starting a new session and compressing context. Verify that only the task owner can use them, actions from an old card cannot target a replaced or active session, and generated callback IDs with numeric suffixes still resolve to the intended action.

Trigger a tool permission request and confirm it uses the dedicated permission card from #10457 rather than adding approval controls to the status card.

Evidence (Before & After)

Before: the status card did not include the originating request or authoritative per-session model metadata and did not provide concise terminal session actions.

After: the status card contains the request, lifecycle output, optional session metadata, and two terminal quick actions. Permission handling remains independently owned by the native permission-card flow already merged into main.

Tested on

OS Status
🍏 macOS ✅
🪟 Windows ⚠️
🐧 Linux ⚠️

Environment (optional)

Local macOS build plus an isolated DingTalk channel using the copied online card template.

Risk & Scope

  • Main risk or tradeoff: the rendered layout depends on the separately managed DingTalk template continuing to expose the documented runtime fields and action IDs.
  • Not validated / out of scope: message-level jump links, model or reasoning-effort switching controls, multi-session terminal quick actions, Windows/Linux runtime E2E, and changes to question-card or permission-card behavior.
  • Breaking changes / migration notes: none. Model and reasoning-effort display default to enabled and can be disabled independently in channel settings.

Linked Issues

N/A

中文说明

本 PR 做了什么

本 PR 更新了钉钉流式状态卡,同时保持简洁的交互范围。卡片会展示原始请求,在配置允许时展示当前会话的模型和思考强度,隐藏模型名中的 provider 后缀,并在完成后只提供开始新会话和压缩上下文两个操作。

工具授权请求继续使用 #10457 已引入的独立原生权限卡。本 PR 不再在状态卡中重复实现审批控件。

回调处理仅对已知状态卡动作兼容钉钉生成的数字后缀。现有问答卡和权限卡的回调行为保持不变。

为什么需要

原状态卡在会话变长后缺少足够的识别信息。展示原始请求和会话实际元数据后,每个结果更容易辨认;两个限定所有者的终态操作覆盖常用后续动作,同时避免把状态卡做成复杂控制面板。

Reviewer Test Plan

如何验证

开启钉钉交互式状态卡,发送一个会产生流式输出的请求。确认卡片展示原始请求,按任务生命周期更新,并展示当前模型和非默认思考强度。分别关闭元数据展示设置,确认只隐藏被关闭的字段。

任务完成后,确认快捷操作只包含开始新会话和压缩上下文。验证只有任务发起者可以操作,旧卡片不能操作已替换或正在执行的会话,同时验证带数字后缀的回调 ID 仍能被正确识别。

触发一次工具授权请求,确认它使用 #10457 的独立权限卡,而不会在状态卡中增加审批控件。

验证证据(前后对比)

修改前:状态卡不包含原始请求或会话实际模型元数据,也没有简洁的终态会话操作。

修改后:状态卡包含请求、生命周期输出、可选的会话元数据和两个终态快捷操作;权限处理继续由已经合入 main 的原生权限卡独立负责。

已测试环境

操作系统 状态
🍏 macOS ✅
🪟 Windows ⚠️
🐧 Linux ⚠️

环境(可选)

本地 macOS 构建,并使用复制后的线上卡片模板在独立钉钉 channel 中验证。

风险和范围

  • 主要风险或取舍:最终布局依赖独立管理的钉钉模板继续提供已约定的运行时字段和操作 ID。
  • 未验证 / 不在范围:消息级跳转、模型或思考强度切换控件、多会话终态快捷操作、Windows/Linux 运行时 E2E,以及问答卡或权限卡行为变更。
  • 破坏性变更 / 迁移说明:无。模型和思考强度默认展示,也可以在 channel settings 中分别关闭。

关联 Issue

无

@qqqys
qqqys force-pushed the codex/new-status-card-local-20260908 branch from 0aa11aa to 35ebc74 Compare September 9, 2026 03:57
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration.

中文

请勿对活跃的 PR 执行 rebase 或 force-push,因为这会使已有的评审评论失效。另外,供日后参考:作为集成流程的一部分,机器人始终会自动将所有改动压缩(squash)为单个提交。

@qqqys
qqqys force-pushed the codex/new-status-card-local-20260908 branch from 35ebc74 to ca3cd76 Compare September 9, 2026 04:24
…rd-local-20260908

# Conflicts:
#	packages/channels/base/src/ChannelBase.test.ts
#	packages/channels/base/src/ChannelBase.ts
#	packages/channels/base/src/types.ts
#	packages/channels/dingtalk/src/DingtalkAdapter.test.ts
#	packages/channels/dingtalk/src/DingtalkAdapter.ts
#	packages/channels/dingtalk/src/interaction-presenter.test.ts
#	packages/channels/dingtalk/src/interaction-presenter.ts
#	packages/channels/dingtalk/src/interactive-card-types.test.ts

This branch has not been deployed

No deployments
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.

1 participant