mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-16 01:21:31 +00:00
* feat(telegram): expose forum topic names in agent context
Telegram Bot API does not provide a method to look up forum topic names
by thread ID. This adds an in-memory LRU cache that learns topic names
from service messages (forum_topic_created, forum_topic_edited,
forum_topic_closed, forum_topic_reopened) and seeds from
reply_to_message.forum_topic_created as a fallback for pre-existing
topics.
The resolved topic name is surfaced as:
- TopicName in MsgContext (available to {{TopicName}} in templates)
- topic_name in the agent prompt metadata block
- topicName in plugin hook event metadata
Includes unit tests for the topic-name-cache module (11 tests including
eviction and read-recency).
Known limitation: cache is in-memory only; after a restart it falls back
to the creation-time name until a rename event is observed.
* refactor(telegram): distill topic name flow
* fix: expose telegram topic names in agent context (#65973) (thanks @ptahdunbar)
---------
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
|
||
|---|---|---|
| .. | ||
| src | ||
| allow-from.ts | ||
| api.ts | ||
| channel-config-api.test.ts | ||
| channel-config-api.ts | ||
| channel-plugin-api.ts | ||
| config-api.ts | ||
| configured-state.ts | ||
| contract-api.ts | ||
| index.test.ts | ||
| index.ts | ||
| openclaw.plugin.json | ||
| package.json | ||
| runtime-api.ts | ||
| secret-contract-api.ts | ||
| session-key-api.ts | ||
| setup-entry.ts | ||
| setup-plugin-api.ts | ||
| test-api.ts | ||
| test-support.ts | ||
| tsconfig.json | ||
| update-offset-runtime-api.ts | ||