mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 03:30:48 +08:00
统一技能安装与 Skills 市场接入链路。
新增公开安装工具与多来源 provider 支持,补齐管理端与目录加载逻辑,并同步更新相关测试与文档以保证可见性和路径安全。 Made-with: Cursor
This commit is contained in:
parent
d5e30542aa
commit
4d9232f3b3
66 changed files with 7369 additions and 1099 deletions
|
|
@ -696,6 +696,8 @@ class ToolExecutor:
|
|||
|
||||
results_by_id: dict[str, tuple[dict[str, Any], int]] = {}
|
||||
runnable_tool_uses: list[LLMToolCall] = []
|
||||
dedupe_alias_to_source: dict[str, str] = {}
|
||||
first_tool_call_id_by_signature: dict[str, str] = {}
|
||||
sig_seen: dict[str, int] = {}
|
||||
budget = max(1, min(int(signature_budget or 2), 8))
|
||||
for tc in tool_uses:
|
||||
|
|
@ -796,6 +798,19 @@ class ToolExecutor:
|
|||
)
|
||||
continue
|
||||
sig_seen[sig] = count + 1
|
||||
source_tool_call_id = str(first_tool_call_id_by_signature.get(sig) or "").strip()
|
||||
if source_tool_call_id:
|
||||
dedupe_alias_to_source[str(tc.id or "")] = source_tool_call_id
|
||||
_trace(
|
||||
"tool_cache_hit_same_round",
|
||||
{
|
||||
"tool_name": tc.name,
|
||||
"tool_call_id": str(tc.id or ""),
|
||||
"source_tool_call_id": source_tool_call_id,
|
||||
},
|
||||
)
|
||||
continue
|
||||
first_tool_call_id_by_signature[sig] = str(tc.id or "")
|
||||
runnable_tool_uses.append(tc)
|
||||
|
||||
for batch in partition_tool_use_batches(runnable_tool_uses, ctx.tools):
|
||||
|
|
@ -825,6 +840,10 @@ class ToolExecutor:
|
|||
},
|
||||
)
|
||||
|
||||
for tool_call_id, source_tool_call_id in dedupe_alias_to_source.items():
|
||||
if source_tool_call_id in results_by_id:
|
||||
results_by_id[tool_call_id] = results_by_id[source_tool_call_id]
|
||||
|
||||
tool_messages: list[dict[str, Any]] = []
|
||||
for tc in tool_uses:
|
||||
_check_stop()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue