jarvis-ai-assistant 0.1.205__py3-none-any.whl → 0.1.207__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.
- jarvis/__init__.py +1 -1
- jarvis/jarvis_agent/edit_file_handler.py +5 -4
- jarvis/jarvis_data/config_schema.json +1 -1
- jarvis/jarvis_platform/base.py +10 -9
- jarvis/jarvis_utils/config.py +1 -1
- {jarvis_ai_assistant-0.1.205.dist-info → jarvis_ai_assistant-0.1.207.dist-info}/METADATA +8 -8
- {jarvis_ai_assistant-0.1.205.dist-info → jarvis_ai_assistant-0.1.207.dist-info}/RECORD +11 -11
- {jarvis_ai_assistant-0.1.205.dist-info → jarvis_ai_assistant-0.1.207.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.205.dist-info → jarvis_ai_assistant-0.1.207.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.1.205.dist-info → jarvis_ai_assistant-0.1.207.dist-info}/licenses/LICENSE +0 -0
- {jarvis_ai_assistant-0.1.205.dist-info → jarvis_ai_assistant-0.1.207.dist-info}/top_level.txt +0 -0
jarvis/__init__.py
CHANGED
@@ -2,8 +2,8 @@ import os
|
|
2
2
|
import re
|
3
3
|
from typing import Any, Dict, List, Tuple
|
4
4
|
|
5
|
-
from yaspin import yaspin
|
6
|
-
from yaspin.core import Yaspin
|
5
|
+
from yaspin import yaspin # type: ignore
|
6
|
+
from yaspin.core import Yaspin # type: ignore
|
7
7
|
|
8
8
|
from jarvis.jarvis_agent.output_handler import OutputHandler
|
9
9
|
from jarvis.jarvis_platform.registry import PlatformRegistry
|
@@ -147,7 +147,7 @@ class EditFileHandler(OutputHandler):
|
|
147
147
|
"文件路径2": [...]
|
148
148
|
}
|
149
149
|
"""
|
150
|
-
patches = {}
|
150
|
+
patches: Dict[str, List[Dict[str, str]]] = {}
|
151
151
|
for match in self.patch_pattern.finditer(response):
|
152
152
|
# Get the file path from the appropriate capture group
|
153
153
|
file_path = match.group(1) or match.group(2) or match.group(3)
|
@@ -387,7 +387,8 @@ class EditFileHandler(OutputHandler):
|
|
387
387
|
# 检查是否被中断
|
388
388
|
if get_interrupt():
|
389
389
|
set_interrupt(False)
|
390
|
-
|
390
|
+
with spinner.hidden():
|
391
|
+
user_input = agent.multiline_inputer("补丁应用被中断,请输入补充信息:")
|
391
392
|
if not user_input.strip():
|
392
393
|
return False, "用户中断了补丁应用"
|
393
394
|
return False, f"用户中断了补丁应用并提供了补充信息: {user_input}"
|
jarvis/jarvis_platform/base.py
CHANGED
@@ -71,28 +71,29 @@ class BasePlatform(ABC):
|
|
71
71
|
while_true(lambda: while_success(lambda: self.chat(prefix_prompt), 5), 5)
|
72
72
|
submit_count = 0
|
73
73
|
length = 0
|
74
|
+
response = ""
|
74
75
|
for input in inputs:
|
75
76
|
submit_count += 1
|
76
77
|
length += len(input)
|
77
78
|
print(
|
78
79
|
f"正在提交第{submit_count}部分(共{len(inputs)}部分({length}/{len(message)}))"
|
79
80
|
)
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
),
|
86
|
-
5,
|
81
|
+
|
82
|
+
response += "\n" + while_true(
|
83
|
+
lambda: while_success(
|
84
|
+
lambda: self.chat(
|
85
|
+
f"<part_content>{input}</part_content>\n\n请返回<已收到>,不需要返回其他任何内容"
|
87
86
|
),
|
88
87
|
5,
|
89
|
-
)
|
88
|
+
),
|
89
|
+
5,
|
90
90
|
)
|
91
|
+
|
91
92
|
print(
|
92
93
|
f"提交第{submit_count}部分完成,当前进度:{length}/{len(message)}"
|
93
94
|
)
|
94
95
|
print("提交完成 ✅")
|
95
|
-
response
|
96
|
+
response += "\n" + while_true(
|
96
97
|
lambda: while_success(
|
97
98
|
lambda: self._chat("内容已经全部提供完毕,请根据内容继续"), 5
|
98
99
|
),
|
jarvis/jarvis_utils/config.py
CHANGED
@@ -178,7 +178,7 @@ def is_confirm_before_apply_patch() -> bool:
|
|
178
178
|
返回:
|
179
179
|
bool: 如果需要确认则返回True,默认为False
|
180
180
|
"""
|
181
|
-
return GLOBAL_CONFIG_DATA.get("JARVIS_CONFIRM_BEFORE_APPLY_PATCH",
|
181
|
+
return GLOBAL_CONFIG_DATA.get("JARVIS_CONFIRM_BEFORE_APPLY_PATCH", False) == True
|
182
182
|
|
183
183
|
|
184
184
|
def get_max_tool_call_count() -> int:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: jarvis-ai-assistant
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.207
|
4
4
|
Summary: Jarvis: An AI assistant that uses tools to interact with the system
|
5
5
|
Home-page: https://github.com/skyfireitdiy/Jarvis
|
6
6
|
Author: skyfire
|
@@ -529,7 +529,7 @@ OPENAI_API_BASE: https://api.openai.com/v1
|
|
529
529
|
| `JARVIS_THINKING_PLATFORM` | JARVIS_PLATFORM | 推理任务使用的平台 |
|
530
530
|
| `JARVIS_THINKING_MODEL` | JARVIS_MODEL | 推理任务使用的模型 |
|
531
531
|
| `JARVIS_EXECUTE_TOOL_CONFIRM` | false | 执行工具前是否需要确认 |
|
532
|
-
| `JARVIS_CONFIRM_BEFORE_APPLY_PATCH` |
|
532
|
+
| `JARVIS_CONFIRM_BEFORE_APPLY_PATCH` | false | 应用补丁前是否需要确认 |
|
533
533
|
| `JARVIS_MAX_TOOL_CALL_COUNT` | 20 | 最大连续工具调用次数 |
|
534
534
|
| `JARVIS_AUTO_UPDATE` | true | 是否自动更新Jarvis |
|
535
535
|
| `JARVIS_MAX_BIG_CONTENT_SIZE` | 160000 | 最大大内容大小 |
|
@@ -569,14 +569,14 @@ OPENAI_API_BASE: https://api.openai.com/v1
|
|
569
569
|
|------|------|
|
570
570
|
| `'Summary'` | 总结当前会话并清空历史记录 |
|
571
571
|
| `'Clear'` | 清空当前会话 |
|
572
|
-
| `'
|
573
|
-
| `'
|
574
|
-
| `'
|
575
|
-
| `'Plan'` |
|
576
|
-
| `'FindRelatedFiles'` |
|
577
|
-
| `'FindMethodology'` | 查找方法论 |
|
572
|
+
| `'ToolUsage'` | 显示可用工具列表及使用方法 |
|
573
|
+
| `'ReloadConfig'` | 重新加载配置文件 |
|
574
|
+
| `'Web'` | 网页搜索,支持多种提问格式 |
|
575
|
+
| `'Plan'` | 生成代码修改计划,提供详细需求描述 |
|
576
|
+
| `'FindRelatedFiles'` | 查找与功能相关的文件 |
|
578
577
|
| `'Dev'` | 调用create_code_agent开发需求 |
|
579
578
|
| `'Fix'` | 修复问题 |
|
579
|
+
| `'Check'` | 执行静态代码检查,包括错误和风格问题 |
|
580
580
|
|
581
581
|
### 3. 自定义替换配置
|
582
582
|
在`~/.jarvis/config.yaml`中添加:
|
@@ -1,7 +1,7 @@
|
|
1
|
-
jarvis/__init__.py,sha256=
|
1
|
+
jarvis/__init__.py,sha256=fLRFf9Q9VVDhiUsd8ZYwNpzWKfK7gZo56QY7mxlyIbk,75
|
2
2
|
jarvis/jarvis_agent/__init__.py,sha256=X5BWIOzxXUWtCbpDkTFfUYskf6sbNzb1qQu8nQ4NN1k,34371
|
3
3
|
jarvis/jarvis_agent/builtin_input_handler.py,sha256=1V7kV5Zhw2HE3Xgjs1R-43RZ2huq3Kg-32NCdNnyZmA,2216
|
4
|
-
jarvis/jarvis_agent/edit_file_handler.py,sha256=
|
4
|
+
jarvis/jarvis_agent/edit_file_handler.py,sha256=69b3lHsJYShHnwZ9InF41bJlJLbvDI52yIeENzxiBuU,17034
|
5
5
|
jarvis/jarvis_agent/jarvis.py,sha256=GH2zi8eXNpW8twiY3LKDEZgGmFC5geB0jlkwFrm7hOQ,6279
|
6
6
|
jarvis/jarvis_agent/main.py,sha256=c6bQe-8LXvW2-NBn9Rn_yPYdrwnkJ8KQaSFY2cPvkxw,2775
|
7
7
|
jarvis/jarvis_agent/output_handler.py,sha256=P7oWpXBGFfOsWq7cIhS_z9crkQ19ES7qU5pM92KKjAs,1172
|
@@ -30,7 +30,7 @@ jarvis/jarvis_code_analysis/checklists/shell.py,sha256=aRFYhQQvTgbYd-uY5pc8UHIUA
|
|
30
30
|
jarvis/jarvis_code_analysis/checklists/sql.py,sha256=vR0T6qC7b4dURjJVAd7kSVxyvZEQXPG1Jqc2sNTGp5c,2355
|
31
31
|
jarvis/jarvis_code_analysis/checklists/swift.py,sha256=TPx4I6Gupvs6tSerRKmTSKEPQpOLEbH2Y7LXg1uBgxc,2566
|
32
32
|
jarvis/jarvis_code_analysis/checklists/web.py,sha256=25gGD7pDadZQybNFvALYxWvK0VRjGQb1NVJQElwjyk0,3943
|
33
|
-
jarvis/jarvis_data/config_schema.json,sha256=
|
33
|
+
jarvis/jarvis_data/config_schema.json,sha256=3lTOxxikuLNsy5wHgaYY3bBQHorTclWewHr4GXVtVBw,6534
|
34
34
|
jarvis/jarvis_data/huggingface.tar.gz,sha256=dWKnc_tvyx-I_ZkXo91O0b38KxDmLW1ZbmJ3E6fCl_k,1120205
|
35
35
|
jarvis/jarvis_dev/main.py,sha256=1elwLV0uKX0CjjlAEKG5uTYHJz5K3qEki49Pv7KMLFw,40919
|
36
36
|
jarvis/jarvis_git_details/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -46,7 +46,7 @@ jarvis/jarvis_methodology/main.py,sha256=NMtd6DRn-Q8NcYtQ3qgTKUp9RW0cDGJod8ZXebl
|
|
46
46
|
jarvis/jarvis_multi_agent/__init__.py,sha256=sDd3sK88dS7_qAz2ywIAaEWdQ4iRVCiuBu2rQQmrKbU,4512
|
47
47
|
jarvis/jarvis_multi_agent/main.py,sha256=h7VUSwoPrES0XTK8z5kt3XLX1mmcm8UEuFEHQOUWPH4,1696
|
48
48
|
jarvis/jarvis_platform/__init__.py,sha256=WLQHSiE87PPket2M50_hHzjdMIgPIBx2VF8JfB_NNRk,105
|
49
|
-
jarvis/jarvis_platform/base.py,sha256=
|
49
|
+
jarvis/jarvis_platform/base.py,sha256=bPmXY9JBfpqbzCYsh0wGTzPfbCJHUekR3RUBE3-8hys,7788
|
50
50
|
jarvis/jarvis_platform/human.py,sha256=r8Vlltp_LirJZeZh1Mmi30iJr9tl1JaNFoqthSRHF6o,2826
|
51
51
|
jarvis/jarvis_platform/kimi.py,sha256=uIpSWQ3MqDBYYMROeXin_YqM2LFrovMICKpwLWO1ODo,12784
|
52
52
|
jarvis/jarvis_platform/openai.py,sha256=uEjBikfFj7kp5wondLvOx4WdkmTX0aqF6kixxAufcHg,4806
|
@@ -80,7 +80,7 @@ jarvis/jarvis_tools/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
80
80
|
jarvis/jarvis_tools/cli/main.py,sha256=Mg6TQDxMdzB1Ua1UrZ2EE-uQWsbaeojWaEGHJp2HimA,6375
|
81
81
|
jarvis/jarvis_utils/__init__.py,sha256=67h0ldisGlh3oK4DAeNEL2Bl_VsI3tSmfclasyVlueM,850
|
82
82
|
jarvis/jarvis_utils/builtin_replace_map.py,sha256=9QKElsyIoZaq4ssZRlCfJPf2i92WuKIHlqOfyBZQmLs,2939
|
83
|
-
jarvis/jarvis_utils/config.py,sha256=
|
83
|
+
jarvis/jarvis_utils/config.py,sha256=DB9zjVwSFs5h8mABYXrz1xv-MAjYarSsPNB9ysI1O6c,7365
|
84
84
|
jarvis/jarvis_utils/embedding.py,sha256=suqKOgH4cq2HYj4xvNpqDPN9pyc3hTCl934xYonF6qk,3922
|
85
85
|
jarvis/jarvis_utils/file_processors.py,sha256=XiM248SHS7lLgQDCbORVFWqinbVDUawYxWDOsLXDxP8,3043
|
86
86
|
jarvis/jarvis_utils/git_utils.py,sha256=E1ibh4qTJ84JuweDex3nF4jrSMsXk9pNJ58lVG9NF6A,18926
|
@@ -91,9 +91,9 @@ jarvis/jarvis_utils/methodology.py,sha256=MhPrMxMqElyAn54BDfpQdUqrRr7IbSlrLvAI39
|
|
91
91
|
jarvis/jarvis_utils/output.py,sha256=PRCgudPOB8gMEP3u-g0FGD2c6tBgJhLXUMqNPglfjV8,10813
|
92
92
|
jarvis/jarvis_utils/tag.py,sha256=f211opbbbTcSyzCDwuIK_oCnKhXPNK-RknYyGzY1yD0,431
|
93
93
|
jarvis/jarvis_utils/utils.py,sha256=RYFQx7OkOu3fe_QhS-5jx7O06k_58X14S-9PFJgwOa4,12178
|
94
|
-
jarvis_ai_assistant-0.1.
|
95
|
-
jarvis_ai_assistant-0.1.
|
96
|
-
jarvis_ai_assistant-0.1.
|
97
|
-
jarvis_ai_assistant-0.1.
|
98
|
-
jarvis_ai_assistant-0.1.
|
99
|
-
jarvis_ai_assistant-0.1.
|
94
|
+
jarvis_ai_assistant-0.1.207.dist-info/licenses/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
|
95
|
+
jarvis_ai_assistant-0.1.207.dist-info/METADATA,sha256=j1hxahQxId3IW6wFbAzhyoSCYkWLOeN4nxd3HrtAqPQ,20340
|
96
|
+
jarvis_ai_assistant-0.1.207.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
97
|
+
jarvis_ai_assistant-0.1.207.dist-info/entry_points.txt,sha256=Gy3DOP1PYLMK0GCj4rrP_9lkOyBQ39EK_lKGUSwn41E,869
|
98
|
+
jarvis_ai_assistant-0.1.207.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
|
99
|
+
jarvis_ai_assistant-0.1.207.dist-info/RECORD,,
|
File without changes
|
{jarvis_ai_assistant-0.1.205.dist-info → jarvis_ai_assistant-0.1.207.dist-info}/entry_points.txt
RENAMED
File without changes
|
{jarvis_ai_assistant-0.1.205.dist-info → jarvis_ai_assistant-0.1.207.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
{jarvis_ai_assistant-0.1.205.dist-info → jarvis_ai_assistant-0.1.207.dist-info}/top_level.txt
RENAMED
File without changes
|