ClawSkills logoClawSkills

Telegram CTA Button

使用具备上下文感知功能的动态 CTA 按钮(Smart Launcher UI)增强 Telegram 回复。在 Telegram 上回复用户以提供相关的、时效性强的内容时使用,

介绍

# Telegram Smart Launcher (Smart Launcher UI)

此技能使代理能够通过在回复中附加上下文感知的 CTA(Call to Action,行动号召)按钮,在 Telegram 上提供高效且互动的用户体验。

## 使用指南

在 Telegram 上回复用户时,请始终考虑提供快速操作按钮是否能提高效率。

### 按钮选择逻辑

1. **时间段感知**: - **早晨 (07:00 - 10:00)**:专注于每日简报、通勤状态和日程检查。 - **工作时间 (10:00 - 16:00)**:专注于任务进度、深度研究和项目特定操作。 - **收尾阶段 (16:00 - 18:00)**:专注于每日总结、回家路线状态和明日准备。 - **夜间 (20:00 - 23:00)**:专注于反思、心情检查和次日规划。

2. **上下文感知**: - 如果用户正在处理行政或规划任务,提供文档起草或数据查询按钮。 - 如果用户正在处理创意或设计任务,提供工具链接或资源管理按钮。 - 如果刚完成任务,提供“下一步”或“总结”按钮。

3. **“自由文本”回退**: - 始终包含自由文本输入选项(例如“⌨️ 手动输入”),以确保用户感到掌控自如。

## 实现模式

使用带有 `buttons` 参数的 `message` 工具。`buttons` 数组是一个包含按钮对象 `[{text, callback_data}]` 数组(行)的数组。

### 示例(收尾阶段)

```javascript message({ action: "send", target: "USER_ID", message: "I've prepared the daily report for you.", buttons: [ [ { text: "📝 Daily Recap", callback_data: "/update" }, { text: "🏠 Route Home", callback_data: "Check route home" } ], [ { text: "⏭️ Tomorrow's Agenda", callback_data: "What is the agenda for tomorrow?" }, { text: "⌨️ Manual Input", callback_data: "keyboard_manual" } ] ] }) ```

## 参考资料

- 有关基于时间的详细按钮预设,请参阅 [references/time_logic.md](references/time_logic.md)。

更多产品