picoclaw/pkg
ywj 8b3e502690
fix(feishu): enrich reply context for card and file replies (#2144)
* fix(feishu): enrich reply context for card and file replies

* refactor(feishu): extract reply functions to feishu_reply.go

- Move reply-related functions to new feishu_reply.go
- Move corresponding tests to feishu_reply_test.go
- Extract magic number 600 to maxReplyContextLen constant
- Unify replyTargetID/replyTargetFromMessage (prefer parent_id, fallback root_id)
- Add source comment for containsFeishuUpgradePlaceholder

* fix(feishu): skip API fallback for non-thread messages, prepend replied media refs

- resolveReplyTargetMessageID: only call fetchMessageByID fallback when
  ThreadId is set, avoiding unnecessary API calls for non-reply messages
- prependReplyContext: prepend replied media refs before current media refs
  to maintain correct ordering

* fix(feishu): add message cache for fetchMessageByID to avoid repeated downloads

- Add messageCache (sync.Map) to FeishuChannel struct
- Cache fetched messages with 30s TTL to avoid re-downloading attachments
  when multiple users reply to the same parent message in a thread
- Cleanup expired entries on read access (no background goroutine needed)

* fix(feishu): early-return for non-reply messages, add cache and fetchMessageByID comment

* fix: remove duplicate test and fix gci import order

* fix(feishu): remove duplicate prependReplyContext call
2026-04-08 14:26:17 +08:00
..
agent fix(gateway): validate PID ownership and clean stale pid files (#2422) 2026-04-08 14:23:21 +08:00
audio Refactor/asr tts (#1939) 2026-04-01 12:21:21 +08:00
auth Merge branch 'main' into t3 2026-03-29 01:25:20 +08:00
bus Refactor/asr tts (#1939) 2026-04-01 12:21:21 +08:00
channels fix(feishu): enrich reply context for card and file replies (#2144) 2026-04-08 14:26:17 +08:00
commands Merge branch 'main' into feat/skill-channel-commands 2026-03-22 20:51:16 +01:00
config feat(channels): add teams_webhook output-only channel (#2244) 2026-04-07 19:24:27 +08:00
constants refactor: replace bool map with set-style map for internal channels (#472) 2026-02-19 11:48:17 +01:00
credential refactor config and security to simplified the structure (#2068) 2026-03-28 00:03:34 +08:00
cron refactor(cron): remove deliver and type params, unify agent execution path (#2147) 2026-03-29 22:52:34 +08:00
devices fix: address PR #662 review comments (bus drain, context timeouts, onebot leak) 2026-02-23 21:34:37 +08:00
fileutil Merge pull request #1829 from perhapzz/test/add-fileutil-health-tests 2026-03-26 10:42:13 +01:00
gateway feat(channels): add teams_webhook output-only channel (#2244) 2026-04-07 19:24:27 +08:00
health fix(gateway): validate PID ownership and clean stale pid files (#2422) 2026-04-08 14:23:21 +08:00
heartbeat fix(heartbeat): ignore untouched default template 2026-03-15 21:58:21 +08:00
identity fix(identity): support negative integers in isNumeric for Telegram group IDs 2026-03-21 17:09:02 +07:00
logger unify all panic event to panic log file (#2250) 2026-04-01 23:26:49 +08:00
mcp feat(mcp): support DisableStandaloneSSE for HTTP transport (#2108) 2026-03-29 14:37:22 +08:00
media Fix 1886 media cleanup policy (#1887) 2026-03-23 12:13:59 +08:00
memory feat(seahorse): implement short-term memory engine (LCM) (#2285) 2026-04-05 09:05:16 +08:00
migrate add pid file for gateway running and auth token for /reload and pico channel 2026-03-29 01:14:39 +08:00
pid fix(gateway): validate PID ownership and clean stale pid files (#2422) 2026-04-08 14:23:21 +08:00
providers feat(provider): support custom headers injection for HTTP providers (#2402) 2026-04-07 16:05:21 +08:00
routing refactor Config to add Version and migratable 2026-03-12 13:52:55 +08:00
seahorse fix(gateway): validate PID ownership and clean stale pid files (#2422) 2026-04-08 14:23:21 +08:00
session feat(seahorse): implement short-term memory engine (LCM) (#2285) 2026-04-05 09:05:16 +08:00
skills enhance skill installer (#1252) 2026-03-13 14:04:02 +08:00
state fix(security): harden unauthenticated tool-exec paths (#1360) 2026-03-11 19:22:20 +08:00
tokenizer feat(seahorse): implement short-term memory engine (LCM) (#2285) 2026-04-05 09:05:16 +08:00
tools fix(tool): clarify write_file nested-JSON escape semantics and add tests (#2320) 2026-04-04 17:56:49 +08:00
updater feat(updater): robust self-update selection & extraction (nightly default) (#2201) 2026-04-01 23:41:32 +08:00
utils Merge pull request #2176 from Alix-007/fix/issue-2135-retry-after 2026-03-30 16:27:46 +02:00
env.go Merge branch 'main' into version 2026-03-19 18:04:58 +08:00