feat: 新增 code_stats Skill,修复 Skill handler 参数解析
- 新增 skills/code_stats.py: Python Skill 示例,统计代码量 - 修复 unified_tool_manager: Skill handler 支持 key=value 参数格式 - Skill 协议测试通过: 直接调用 + MCP 调用均正常 本次更新由 mimo 自动化执行,与开发者无关。
This commit is contained in:
1 parent
2af7004247
commit
4c41cf4f99
2 files changed
+150
-1
No files matched your search
+10
-1
@@ -206,11 +206,20 @@ class UnifiedToolManager:
|
||||
kwargs = {}
|
||||
|
||||
# 解析参数
|
||||
if args.strip().startswith('{'):
|
||||
args = args.strip()
|
||||
if args.startswith('{'):
|
||||
try:
|
||||
kwargs = json.loads(args)
|
||||
except json.JSONDecodeError:
|
||||
kwargs = {'operation': args}
|
||||
elif '=' in args:
|
||||
# key=value 格式: "directory=. file_pattern=*.py"
|
||||
for part in args.split():
|
||||
if '=' in part:
|
||||
k, v = part.split('=', 1)
|
||||
kwargs[k.strip()] = v.strip()
|
||||
else:
|
||||
kwargs.setdefault('operation', part)
|
||||
else:
|
||||
kwargs = {'operation': args}
|
||||
|
||||
|
||||
Reference in new issue
Block a user