Commit Graph

195 Commits

Author SHA1 Message Date
Tony
87ab980bd1 refactor(feishu): extract tool hint card sending into dedicated method
- Extract card creation logic into _send_tool_hint_card() helper
- Improves code organization and testability
- Update tests to use pytest.mark.asyncio for cleaner async testing
- Remove redundant asyncio.run() calls in favor of native async test functions
2026-03-13 14:52:15 +08:00
Tony
82064efe51 feat(feishu): improve tool call card formatting for multiple tools
- Format multiple tool calls each on their own line
- Change title from 'Tool Call' to 'Tool Calls' (plural)
- Add explicit 'text' language for code block
- Improves readability and supports displaying longer content
- Update tests to match new formatting
2026-03-13 14:48:36 +08:00
Tony
7261bd8c3f feat(feishu): display tool calls in code block messages
- Tool hint messages with _tool_hint metadata now render as formatted code blocks
- Uses Feishu interactive card message type with markdown code fences
- Shows "Tool Call" header followed by code in a monospace block
- Adds comprehensive unit tests for the new functionality

Co-Authorship-Bot: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:43:47 +08:00
Tony
df89bd2dfa feat(feishu): display tool calls in code block messages
- Add special handling for tool hint messages (_tool_hint metadata)
- Send tool calls using Feishu's "code" message type with formatting
- Tool calls now appear as formatted code snippets in Feishu chat
- Add unit tests for the new functionality

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:41:54 +08:00
Tony
da740c871d test 2026-03-13 14:06:22 +08:00
Xubin Ren
ca5047b602 feat(web): multi-provider web search + Jina Reader fetch 2026-03-13 05:44:16 +00:00
Xubin Ren
84b107cf6c fix(ci): upgrade setup-python, add system deps, simplify test assertions 2026-03-13 04:05:08 +00:00
Xubin Ren
4b50a7b6c0 Merge branch 'main' into pr-1916 2026-03-13 03:57:09 +00:00
Xubin Ren
6d3a0ab6c9 fix(memory): validate save_memory payload and raw-archive on repeated failure
- Require both history_entry and memory_update, reject null/empty values
- Fallback to tool_choice=auto when provider rejects forced function call
- After 3 consecutive consolidation failures, raw-archive messages to
  HISTORY.md without LLM summarization to prevent context window overflow
2026-03-13 03:53:50 +00:00
Hua
83826f3904 Add persona and language command localization 2026-03-13 11:32:06 +08:00
Xubin Ren
60c29702cc Merge branch 'main' into pr-1810
# Conflicts:
#	nanobot/agent/memory.py
#	tests/test_memory_consolidation_types.py
2026-03-13 03:29:16 +00:00
Hua
b2584dd2cf Merge remote-tracking branch 'origin/main' 2026-03-13 11:24:46 +08:00
Xubin Ren
4f77b9385c fix(memory): fallback to tool_choice=auto when provider rejects forced function call
Some providers (e.g. Dashscope in thinking mode) reject object-style
tool_choice with "does not support being set to required or object".
Retry once with tool_choice="auto" instead of failing silently.

Made-with: Cursor
2026-03-13 03:18:08 +00:00
Hua
f4018dcce5 Merge remote-tracking branch 'origin/main' 2026-03-13 09:39:01 +08:00
Frank
a09245e919 fix(qq): restore plain text replies for legacy clients 2026-03-12 12:48:25 -07:00
Re-bin
3467a7faa6 fix: improve local provider auto-selection and update docs for VolcEngine/BytePlus 2026-03-12 15:22:15 +00:00
Jiajun Xie
ec6e099393 feat(ci): add GitHub Actions workflow for test directory
- nanobot/channels/matrix.py: Add keyword-only parameters restrict_to_workspace/workspace to MatrixChannel.__init__ and assign them to _restrict_to_workspace/_workspace with proper type conversion and path resolution
- tests/test_commands.py: Add _strip_ansi() function to remove ANSI escape codes, use regex assertions for --workspace/--config parameters to allow 1 or 2 dashes
2026-03-12 21:54:22 +08:00
Hua
cf3c88014f fix: searxng搜索引擎支持 2026-03-12 14:44:19 +08:00
Hua
4de0bf9c4a Merge remote-tracking branch 'origin/main' 2026-03-12 14:40:14 +08:00
Re-bin
64888b4b09 Simplify reply context extraction, fix slash commands broken by reply injection, attach reply media regardless of caption 2026-03-12 06:16:57 +00:00
Re-bin
869149ef1e Merge branch 'main' into pr-1900 2026-03-12 06:06:26 +00:00
Hua
10cd9bf228 Merge remote-tracking branch 'origin/main' 2026-03-12 13:43:37 +08:00
Hua
7f1e42c3fd fix: searxng搜索引擎支持 2026-03-12 12:38:01 +08:00
Re-bin
64aeeceed0 Add /restart command: restart the bot process from any channel 2026-03-12 04:33:51 +00:00
Re-bin
35260ca157 fix: raise persisted tool result limit to 16k 2026-03-12 02:50:28 +00:00
John Doe
3f799531cc Add media download functionality 2026-03-12 06:43:59 +07:00
John Doe
1eedee0c40 add reply context extraction for Telegram messages 2026-03-12 06:23:02 +07:00
Re-bin
0d94211a93 enhance: improve filesystem & shell tools with pagination, fallback matching, and smarter output 2026-03-11 16:20:11 +00:00
Re-bin
9d0db072a3 fix: guard quoted home paths in shell tool 2026-03-11 15:43:04 +00:00
Re-bin
85609c99b3 Merge remote-tracking branch 'origin/main' into pr-1827 2026-03-11 15:32:52 +00:00
Re-bin
9fc74bde9a Merge remote-tracking branch 'origin/main' into pr-1874 2026-03-11 15:26:39 +00:00
Re-bin
c72c2ce7e2 refactor: move generation settings to provider level, eliminate parameter passthrough 2026-03-11 09:47:04 +00:00
Re-bin
a180e84536 Merge remote-tracking branch 'origin/main' into pr-1868 2026-03-11 09:10:29 +00:00
Re-bin
4478838424 fix(pr-1863): complete Ollama provider routing and README docs 2026-03-11 08:42:12 +00:00
WhalerO
6ef7ab53d0 refactor: centralize tool call serialization in ToolCallRequest 2026-03-11 15:32:43 +08:00
WhalerO
ed82f95f0c fix: preserve provider-specific tool call metadata for Gemini 2026-03-11 15:32:26 +08:00
ethanclaw
b75222d952 Merge remote main to fix branch 2026-03-11 13:12:26 +08:00
ethanclaw
c7e2622ee1 fix(subagent): pass reasoning_content and thinking_blocks in subagent messages
Fix issue #1834: Spawn/subagent tool fails with Deepseek Reasoner
due to missing reasoning_content field when using thinking mode.

The subagent was not including reasoning_content and thinking_blocks
in assistant messages with tool calls, causing the Deepseek API to
reject subsequent requests.

- Add reasoning_content to assistant message when subagent makes tool calls
- Add thinking_blocks to assistant message for Anthropic extended thinking
- Add tests to verify both fields are properly passed

Fixes #1834
2026-03-11 12:25:28 +08:00
Re-bin
ddccf25bb1 fix(subagent): preserve reasoning fields across tool turns
Share assistant message construction between the main agent and subagents, and add a regression test to keep reasoning_content and thinking_blocks in follow-up tool rounds.
2026-03-11 03:47:24 +00:00
Re-bin
91f17cad00 feat(dingtalk): support voice recognition text fallback
Read DingTalk recognition text when text.content is empty, and add a handler-level regression test for voice transcript delivery.
2026-03-11 03:40:33 +00:00
Re-bin
62ccda43b9 refactor(memory): switch consolidation to token-based context windows
Move consolidation policy into MemoryConsolidator, keep backward compatibility for legacy config, and compress history by token budget instead of message count.
2026-03-10 19:55:06 +00:00
Re-bin
b0a5435b87 refactor(llm): share transient retry across agent paths 2026-03-10 10:10:37 +00:00
Re-bin
b7ecc94c9b fix(skill-creator): restore validation and align packaging docs 2026-03-10 09:16:23 +00:00
suger-m
6c70154fee fix(exec): enforce workspace guard for home-expanded paths 2026-03-10 15:55:04 +08:00
Re-bin
4f9857f85f feat(telegram): add configurable group mention policy 2026-03-10 04:34:15 +00:00
Re-bin
0ecfb0a9d6 Merge branch 'main' into pr-1785 2026-03-10 04:07:53 +00:00
shenchengtsi
b24d6ffc94 fix(memory): validate save_memory payload before persisting 2026-03-10 11:32:11 +08:00
Protocol Zero
1284c7217e fix(cli): let gateway use config port by default
Respect config.gateway.port when --port is omitted, while keeping CLI flags as the highest-precedence override.
2026-03-09 20:12:11 +00:00
Protocol Zero
0104a2253a fix(telegram): avoid media filename collisions
Use file_unique_id when storing downloaded Telegram media so different uploads do not silently overwrite each other on disk.
2026-03-09 20:11:16 +00:00
Re-bin
28330940d0 fix(slack): skip thread_ts for direct messages 2026-03-09 17:18:10 +00:00