Commit Graph

611 Commits

Author SHA1 Message Date
coldxiangyu
98ef57e370 feat(feishu): add multimedia download support for images, audio and files
Add download functionality for multimedia messages in Feishu channel,
enabling agents to process images, audio recordings, and file attachments
sent through Feishu.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:56:57 +08:00
themavik
33396a522a fix(tools): provide detailed error messages in edit_file when old_text not found
Uses difflib to find the best match and shows a helpful diff,
making it easier to debug edit_file failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 23:52:40 -05:00
Re-bin
9a31571b6d fix: don't append interim assistant message before retry to avoid prefill errors 2026-02-20 16:51:37 +00:00
Xubin Ren
21dd9e4112 Merge pull request #908 to route CLI interactive mode through message bus
refactor: route CLI interactive mode through message bus
2026-02-21 00:46:06 +08:00
Re-bin
7279ff0167 refactor: route CLI interactive mode through message bus for subagent support 2026-02-20 16:45:21 +00:00
Re-bin
f8ffff98a5 Merge PR #892: fix MCP connection retry and concurrent connection guard 2026-02-20 16:09:13 +00:00
Re-bin
80b5e6cea0 Merge branch 'main' into pr-892 2026-02-20 16:06:17 +00:00
Re-bin
5ba3ee97a4 Merge PR #832: avoid duplicate reply when message tool already sent 2026-02-20 15:56:13 +00:00
Re-bin
132807a3fb refactor: simplify message tool turn tracking to a single boolean flag 2026-02-20 15:55:30 +00:00
Re-bin
c8682512c9 Merge branch 'main' into pr-832 2026-02-20 15:47:16 +00:00
Re-bin
b6610721f9 Merge PR #902: store session key in JSONL metadata to avoid lossy filename reconstruction 2026-02-20 15:43:06 +00:00
Re-bin
d9cc144575 style: remove redundant comment in list_sessions 2026-02-20 15:42:24 +00:00
Re-bin
40867bff86 Merge branch 'main' into pr-902 2026-02-20 15:27:05 +00:00
Re-bin
5110b070dd Merge PR #900: split Discord messages exceeding 2000-character limit 2026-02-20 15:26:15 +00:00
Re-bin
b853222c87 style: trim _send_payload docstring 2026-02-20 15:26:12 +00:00
Re-bin
9643b477da Merge branch 'main' into pr-900 2026-02-20 15:23:22 +00:00
Re-bin
44c2de2283 Merge PR #903: convert remaining f-string logger calls to loguru native format 2026-02-20 15:21:43 +00:00
Re-bin
a33cb3e2dc Merge branch 'main' into pr-903 2026-02-20 15:21:11 +00:00
Re-bin
ff0003de3f Merge PR #904: add media file upload support to Slack channel 2026-02-20 15:19:23 +00:00
Re-bin
6bcfbd9610 style: remove redundant comments and use loguru native format 2026-02-20 15:19:18 +00:00
Re-bin
fe089abe5b Merge branch 'main' into pr-904 2026-02-20 15:17:04 +00:00
Re-bin
1d41dcd99a Merge PR #905: enable prompt caching for OpenRouter 2026-02-20 15:15:44 +00:00
Re-bin
cc04bc4dd1 fix: check gateway's supports_prompt_caching instead of always returning False 2026-02-20 15:14:45 +00:00
tercerapersona
b286457c85 add Openrouter prompt caching via cache_control 2026-02-20 11:34:50 -03:00
Nikolas de Hor
4cbd857250 fix: handle edge cases in message splitting and send failure
- _split_message: return empty list for empty/None content instead
  of a list with one empty string (Discord rejects empty content)
- _split_message: use pos <= 0 fallback to prevent empty chunks
  when content starts with a newline or space
- _send_payload: return bool to indicate success/failure
- send: abort remaining chunks when a chunk fails to send,
  preventing partial/corrupted message delivery
2026-02-20 10:09:04 -03:00
Nikolas de Hor
f19baa8fc4 fix: convert remaining f-string logger calls to loguru native format
Follow-up to #864. Three f-string logger calls in base.py and dingtalk.py
were missed in the original sweep. These can cause KeyError if interpolated
values contain curly braces, since loguru interprets them as format placeholders.
2026-02-20 10:01:38 -03:00
Alexander Minges
426ef71ce7 style(loop): drop formatting-only churn against upstream main 2026-02-20 13:57:39 +01:00
Nikolas de Hor
73530d51ac fix: store session key in JSONL metadata to avoid lossy filename reconstruction
list_sessions() previously reconstructed the session key by replacing all
underscores in the filename with colons. This is lossy: a key like
'cli:user_name' became 'cli:user:name' after round-tripping.

Now the actual key is persisted in the metadata line during save() and read
back in list_sessions(). Legacy files without the key field fall back to
replacing only the first underscore, which handles the common channel:chat_id
pattern correctly.

Closes #899
2026-02-20 09:57:11 -03:00
Nikolas de Hor
4c75e1673f fix: split Discord messages exceeding 2000-character limit
Discord's API rejects messages longer than 2000 characters with HTTP 400.
Previously, long agent responses were silently lost after retries exhausted.

Adds _split_message() (matching Telegram's approach) to chunk content at
line boundaries before sending. Only the first chunk carries the reply
reference. Retry logic extracted to _send_payload() for reuse across chunks.

Closes #898
2026-02-20 09:55:22 -03:00
Nikolas de Hor
37222f9c0a fix: add connecting guard to prevent concurrent MCP connection attempts
Addresses Codex review: concurrent callers could both pass the
_mcp_connected guard and race through _connect_mcp(). Added
_mcp_connecting flag set immediately to serialize attempts.
2026-02-20 09:38:22 -03:00
Nikolas de Hor
45f33853cf fix: only apply interim fallback when no tools were used
Addresses Codex review: if the model sent interim text then used tools,
the interim text should not be used as fallback for the final response.
2026-02-20 09:37:42 -03:00
Alexander Minges
df022febaf refactor(loop): drop redundant Any typing in /new snapshot 2026-02-20 13:33:51 +01:00
Alexander Minges
c1b5e8c8d2 fix(loop): lock /new snapshot and prune stale consolidation locks 2026-02-20 13:32:57 +01:00
Kim
8cc54b188d style(logging): use loguru parameterized formatting in suppression log 2026-02-20 20:25:46 +08:00
Nikolas de Hor
44f44b305a fix: move MCP connected flag after successful connection to allow retry
The flag was set before the connection attempt, so if any MCP server
was temporarily unavailable, the flag stayed True and MCP tools were
permanently lost for the session.

Closes #889
2026-02-20 09:24:48 -03:00
Nikolas de Hor
4eb07c44b9 fix: preserve interim content as fallback when retry produces empty response
Fixes regression from #825 where models that respond with final text
directly (no tools) had their answer discarded by the retry mechanism.

Closes #878
2026-02-20 09:21:27 -03:00
Kim
ddae3e9d5f fix(agent): avoid duplicate final send when message tool already replied 2026-02-20 20:16:45 +08:00
Alexander Minges
9ada8e6854 fix(loop): require successful archival before /new clear 2026-02-20 13:06:07 +01:00
Alexander Minges
5f9eca4664 style(loop): remove formatting-only changes from upstream PR 881 2026-02-20 12:46:11 +01:00
Alexander Minges
755e424127 fix(loop): serialize /new consolidation and track task refs 2026-02-20 12:40:59 +01:00
Re-bin
c8089021a5 Merge PR #795: sanitize messages and ensure content key for strict LLM providers 2026-02-20 11:27:28 +00:00
Re-bin
5cc019bf1a style: trim verbose comments in _sanitize_messages 2026-02-20 11:27:21 +00:00
Re-bin
0c2fea6d33 Merge branch 'main' into pr-795 2026-02-20 11:25:51 +00:00
Re-bin
ddf7f92275 Merge PR #833: always send tool hint even when model has preceding text 2026-02-20 11:19:00 +00:00
Re-bin
8db91f59e2 style: remove trailing space 2026-02-20 11:18:57 +00:00
Re-bin
b73e847e89 Merge branch 'main' into pr-833 2026-02-20 11:16:49 +00:00
Xubin Ren
cd0a5affd5 Merge pull request #879 to make Telegram reply-to-message behavior configurable (default false)
feat: make Telegram reply-to-message behavior configurable, default false
2026-02-20 19:14:15 +08:00
Re-bin
e1854c4373 feat: make Telegram reply-to-message behavior configurable, default false 2026-02-20 11:13:10 +00:00
Paul
e39bbaa9be feat(slack): add media file upload support
Use files_upload_v2 API to upload media attachments in Slack messages.
This enables the message tool's media parameter to work correctly
when sending images or other files through the Slack channel.

Requires files:write OAuth scope.
2026-02-20 09:54:21 +00:00
Re-bin
792f80ce0c Merge PR #821: make cron run command actually execute the agent 2026-02-20 09:04:41 +00:00