hermes-agent/gateway
nick 5e413166dc feat(feishu): add FEISHU_AUTO_THREAD for automatic thread replies
When FEISHU_AUTO_THREAD=true, all Feishu replies are sent with
reply_in_thread=true, causing Feishu to automatically create a
thread for each new conversation. This isolates session context
per thread, preventing unrelated conversations from mixing and
exhausting the context window.

Implementation:
- Track last inbound message_id per chat_id in FeishuAdapter
- When auto_thread is on and no reply_to is provided, use the
  tracked message_id so the reply API (which supports
  reply_in_thread) is used instead of the create API
- Pass initial reply_to to GatewayStreamConsumer for streaming
  replies to also land in threads
- Env var defaults to false for backward compatibility

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 12:52:42 +08:00
..
builtin_hooks refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
platforms feat(feishu): add FEISHU_AUTO_THREAD for automatic thread replies 2026-04-17 12:52:42 +08:00
__init__.py Enhance CLI with multi-platform messaging integration and configuration management 2026-02-02 19:01:51 -08:00
channel_directory.py fix(gateway): derive channel directory platforms from enum instead of hardcoded list (#7450) 2026-04-10 17:27:32 -07:00
config.py feat(gateway): add ignored_threads config for Telegram 2026-04-14 01:40:32 -07:00
delivery.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
display_config.py fix(gateway): fix regression causing display.streaming to override root streaming key 2026-04-14 10:52:23 -07:00
hooks.py feat: built-in boot-md hook — run BOOT.md on gateway startup (#3733) 2026-03-29 10:19:54 -07:00
mirror.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
pairing.py fix: multiple platform adaptors concurrency 2026-04-06 16:49:54 -07:00
restart.py fix(gateway): address restart review feedback 2026-04-10 21:18:34 -07:00
run.py feat(feishu): add FEISHU_AUTO_THREAD for automatic thread replies 2026-04-17 12:52:42 +08:00
session.py refactor: remove dead code — 1,784 lines across 77 files (#9180) 2026-04-13 16:32:04 -07:00
session_context.py fix(gateway): add HERMES_SESSION_KEY to session_context contextvars 2026-04-11 15:35:04 -07:00
status.py fix: gateway auto-recovers from unexpected SIGTERM via systemd (#5646) 2026-04-14 15:35:58 -07:00
sticker_cache.py chore: remove ~100 unused imports across 55 files (#3016) 2026-03-25 15:02:03 -07:00
stream_consumer.py feat(feishu): add FEISHU_AUTO_THREAD for automatic thread replies 2026-04-17 12:52:42 +08:00