jarvis-ai-assistant 0.1.180__py3-none-any.whl → 0.1.181__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of jarvis-ai-assistant might be problematic. Click here for more details.
- jarvis/__init__.py +1 -1
- jarvis/jarvis_code_agent/code_agent.py +34 -106
- jarvis/jarvis_data/config_schema.json +28 -58
- jarvis/jarvis_dev/main.py +66 -112
- jarvis/jarvis_platform/base.py +4 -2
- jarvis/jarvis_platform/yuanbao.py +0 -1
- jarvis/jarvis_tools/code_plan.py +1 -3
- jarvis/jarvis_tools/execute_script.py +31 -8
- jarvis/jarvis_utils/builtin_replace_map.py +0 -48
- jarvis/jarvis_utils/config.py +8 -8
- jarvis/jarvis_utils/git_utils.py +61 -1
- jarvis/jarvis_utils/utils.py +32 -3
- {jarvis_ai_assistant-0.1.180.dist-info → jarvis_ai_assistant-0.1.181.dist-info}/METADATA +4 -5
- {jarvis_ai_assistant-0.1.180.dist-info → jarvis_ai_assistant-0.1.181.dist-info}/RECORD +18 -20
- {jarvis_ai_assistant-0.1.180.dist-info → jarvis_ai_assistant-0.1.181.dist-info}/entry_points.txt +0 -2
- jarvis/jarvis_tools/ask_codebase.py +0 -294
- jarvis/jarvis_tools/find_methodology.py +0 -73
- {jarvis_ai_assistant-0.1.180.dist-info → jarvis_ai_assistant-0.1.181.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.180.dist-info → jarvis_ai_assistant-0.1.181.dist-info}/licenses/LICENSE +0 -0
- {jarvis_ai_assistant-0.1.180.dist-info → jarvis_ai_assistant-0.1.181.dist-info}/top_level.txt +0 -0
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
from typing import Any, Dict
|
|
3
|
-
|
|
4
|
-
from yaspin import yaspin
|
|
5
|
-
|
|
6
|
-
from jarvis.jarvis_utils.methodology import load_methodology
|
|
7
|
-
from jarvis.jarvis_utils.output import OutputType, PrettyOutput
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class FindMethodologyTool:
|
|
11
|
-
name = "find_methodology"
|
|
12
|
-
description = "方法论查找工具,用于在执行过程中查看历史方法论辅助决策"
|
|
13
|
-
parameters = {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"properties": {
|
|
16
|
-
"query": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "要搜索的查询文本"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"required": ["query"]
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
def execute(self, args: Dict[str, Any]) -> Dict[str, Any]:
|
|
25
|
-
"""执行方法论查找操作
|
|
26
|
-
|
|
27
|
-
Args:
|
|
28
|
-
args (Dict): 包含查询文本的参数字典
|
|
29
|
-
|
|
30
|
-
Returns:
|
|
31
|
-
Dict[str, Any]: 包含成功状态、输出内容和错误信息的字典
|
|
32
|
-
"""
|
|
33
|
-
try:
|
|
34
|
-
if "query" not in args:
|
|
35
|
-
return {
|
|
36
|
-
"success": False,
|
|
37
|
-
"stdout": "",
|
|
38
|
-
"stderr": "参数中必须包含查询文本"
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
agent = args.get("agent", None)
|
|
42
|
-
|
|
43
|
-
tool_registry = agent.get_tool_registry() if agent else None
|
|
44
|
-
|
|
45
|
-
with yaspin(text="搜索相关方法论...", color="cyan") as spinner:
|
|
46
|
-
with spinner.hidden():
|
|
47
|
-
methodology_prompt = load_methodology(args["query"], tool_registry)
|
|
48
|
-
|
|
49
|
-
if methodology_prompt:
|
|
50
|
-
spinner.text = "找到相关方法论"
|
|
51
|
-
spinner.ok("✅")
|
|
52
|
-
PrettyOutput.print(methodology_prompt, OutputType.INFO)
|
|
53
|
-
return {
|
|
54
|
-
"success": True,
|
|
55
|
-
"stdout": methodology_prompt,
|
|
56
|
-
"stderr": ""
|
|
57
|
-
}
|
|
58
|
-
else:
|
|
59
|
-
spinner.text = "未找到相关方法论"
|
|
60
|
-
spinner.fail("❌")
|
|
61
|
-
return {
|
|
62
|
-
"success": True,
|
|
63
|
-
"stdout": "未找到相关的方法论",
|
|
64
|
-
"stderr": ""
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
except Exception as e:
|
|
68
|
-
PrettyOutput.print(str(e), OutputType.ERROR)
|
|
69
|
-
return {
|
|
70
|
-
"success": False,
|
|
71
|
-
"stdout": "",
|
|
72
|
-
"stderr": f"方法论查找失败: {str(e)}"
|
|
73
|
-
}
|
|
File without changes
|
{jarvis_ai_assistant-0.1.180.dist-info → jarvis_ai_assistant-0.1.181.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{jarvis_ai_assistant-0.1.180.dist-info → jarvis_ai_assistant-0.1.181.dist-info}/top_level.txt
RENAMED
|
File without changes
|