picoclaw/pkg/agent
DimonB 6c0798ca3f
feat(channels): make Channel.Send return delivered message IDs (#2190)
* feat(channels): Channel.Send and MediaSender.SendMedia return delivered message IDs

Change Channel.Send signature from (ctx, msg) error to (ctx, msg) ([]string, error)
and MediaSender.SendMedia similarly, so callers can capture platform message IDs
for threading, reactions, and history annotation.

Adapters that return real IDs: Telegram (per-chunk MessageID), Discord (Message.ID),
Slack Send (ts), QQ (sentMsg.ID), Matrix (EventID). Slack SendMedia returns nil
because UploadFileV2 does not expose the posted message timestamp in its response.
All other adapters return nil IDs.

preSend and sendWithRetry in manager.go updated to propagate ([]string, bool).
README examples updated for both English and Chinese docs.

* style: apply golangci-lint fixes (golines)

* docs: fix Send migration guide — restore old error-only signature in before/after example
2026-03-31 11:07:32 +08:00
..
context.go add pid file for gateway running and auth token for /reload and pico channel 2026-03-29 01:14:39 +08:00
context_budget.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
context_budget_test.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
context_cache_test.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
context_test.go fix(provider): deduplicate tool results and merge consecutive tool_result blocks for Anthropic API (#1793) 2026-03-23 17:24:46 +08:00
definition.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
definition_test.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
eventbus.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
eventbus_test.go Merge branch 'main' into version 2026-03-23 10:54:08 +08:00
events.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
hook_mount.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
hook_mount_test.go Merge branch 'main' into version 2026-03-23 10:54:08 +08:00
hook_process.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
hook_process_test.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
hooks.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
hooks_test.go Merge branch 'main' into version 2026-03-23 10:54:08 +08:00
instance.go fix(agent): use light provider for routed model calls (#2038) 2026-03-28 15:25:23 +08:00
instance_test.go feat(tools): add exec tool enhancement with background execution and PTY support (#1752) 2026-03-25 21:02:49 +08:00
loop.go feat(tools): add reaction tool and reply-aware message sends (#2156) 2026-03-30 16:31:34 +08:00
loop_mcp.go feat(mcp): per server deferred mode (#1654) 2026-03-19 17:03:17 +08:00
loop_mcp_test.go feat(mcp): per server deferred mode (#1654) 2026-03-19 17:03:17 +08:00
loop_media.go resolve conflicts 2026-03-22 23:36:25 +01:00
loop_test.go feat(channels): make Channel.Send return delivered message IDs (#2190) 2026-03-31 11:07:32 +08:00
memory.go refactor(modernize): apply safe modernize fixes 2026-02-27 16:35:07 +08:00
mock_provider_test.go feat(fmt): Fix formatting 2026-02-19 22:05:15 +02:00
model_resolution.go fix(agent): rebind provider after /switch model to (#1769) 2026-03-19 21:44:01 +08:00
registry.go feat(session): integrate JSONL persistence into agent loop (#1170) 2026-03-10 15:14:09 +08:00
registry_test.go refactor Config to add Version and migratable 2026-03-12 13:52:55 +08:00
steering.go fix(agent): fix subturn panic result, hard abort rollback, and drain bus exit 2026-03-22 20:35:14 +08:00
steering_test.go Merge branch 'main' into version 2026-03-23 10:54:08 +08:00
subturn.go fix(agent): fix subturn panic result, hard abort rollback, and drain bus exit 2026-03-22 20:35:14 +08:00
subturn_test.go Merge branch 'main' into version 2026-03-23 10:54:08 +08:00
thinking.go feat: add extended thinking support for Anthropic models (#1076) 2026-03-05 09:51:18 +08:00
thinking_test.go feat: add extended thinking support for Anthropic models (#1076) 2026-03-05 09:51:18 +08:00
turn.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00