Telegram Context — Telegram 上下文
v1.0.1Toggle-enabled 技能 that fetches Telegram message 历史 at 会话 启动 for conversational continuity. MAIntAIns 上下文 across 会话s without relying solely on memory files.
运行时依赖
安装命令
点击复制技能文档
Telegram 上下文
Provides conversational continuity by fetching recent Telegram messages at 会话 启动. When enabled, the 代理 automatically retrieves message 历史 to mAIntAIn 上下文 across disconnected 会话s.
Credits
创建d by @fourthdensity
Commands /telegram-上下文 on — Enable automatic 历史 fetching /telegram-上下文 off — Disable automatic fetching /telegram-上下文 状态 — Show current 设置tings /telegram-上下文 fetch [n] — Manually fetch last n messages (default: 20) 设置up The 技能 auto-检测s Telegram channels — no configuration needed 状态 is stored in memory/telegram-上下文.json Only activates when the current channel is Telegram How It Works
When a 会话 启动s in Telegram:
检查 memory/telegram-上下文.json for enabled 状态 If enabled, fetch recent messages via message 工具 Provide 历史 as 上下文 for the conversation 更新 lastFetch timestamp 状态 File
memory/telegram-上下文.json:
{ "enabled": true, "fetchCount": 20, "lastFetch": "2025-01-15T10:30:00Z" }
Implementation Notes Command 处理器s
Enable/disable:
// Read current 状态 read: memory/telegram-上下文.json
// 更新 状态 write: memory/telegram-上下文.json { "enabled": true/false, "fetchCount": 20, "lastFetch": "2025-01-15T10:30:00Z" }
Manual fetch:
message: { action: "列出", limit: 20 // or user-specified count } // Provide 结果s as 上下文 summary
会话 启动 Behavior
At the 启动 of each Telegram 会话:
检查 if memory/telegram-上下文.json exists If enabled, call message 工具 with action: "列出" Summarize recent messages for 上下文 window Acknowledge continuity to user (optional) Implementation Scope
The 技能 uses OpenClaw's built-in message 工具 with:
action: "列出" — limited to the current Telegram chat only No 访问 to other chats, channels, or external Telegram accounts Requires the OpenClaw gateway to have Telegram channel 权限s already 配置d 隐私 & Security
Data Handling:
Only fetches from the current chat (never cross-chats or other Telegram conversations) Message content is included in the 代理's 上下文 window and sent to the 配置d LLM 提供者 No message content is stored in telegram-上下文.json — only 设置tings and timestamps Message content may 应用ear in OpenClaw 会话 记录s (depends on your 记录ging configuration)
Recommendations for Sensitive Conversations:
Use manual fetch (/telegram-上下文 fetch) instead of auto-fetch 设置 low fetchCount (5-10) to minimize 上下文 exposure Disable the 技能 entirely when discussing sensitive topics: /telegram-上下文 off Be aware that fetched messages become part of the conversation 历史 sent to AI 模型s
User Control:
Full toggle on/off anytime — no persistence beyond your control No external 凭证s or API keys required No binaries 安装ed — pure instruction-based 技能 Limitations Telegram-only (other channels not supported) Requires 应用ropriate message 权限s via OpenClaw gateway Large 历史 may need summarization to fit 上下文 window Fetched messages are sent to your 配置d LLM 提供者 — review your threat 模型 for sensitive conversations Tips 设置 fetchCount to 10-30 for most use cases (balance 上下文 vs. 令牌s) Use /telegram-上下文 fetch 50 when you need deep 上下文 for a specific task Works best alongside MEMORY.md for long-term persistence