jarvis-ai-assistant 0.1.193__py3-none-any.whl → 0.1.195__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/__init__.py +45 -41
- jarvis/jarvis_agent/builtin_input_handler.py +26 -4
- jarvis/jarvis_agent/jarvis.py +30 -19
- jarvis/jarvis_agent/main.py +20 -12
- jarvis/jarvis_agent/output_handler.py +7 -7
- jarvis/jarvis_agent/shell_input_handler.py +14 -11
- jarvis/jarvis_code_agent/code_agent.py +81 -79
- jarvis/jarvis_code_agent/lint.py +92 -105
- jarvis/jarvis_code_analysis/checklists/__init__.py +1 -1
- jarvis/jarvis_code_analysis/checklists/c_cpp.py +1 -1
- jarvis/jarvis_code_analysis/checklists/csharp.py +1 -1
- jarvis/jarvis_code_analysis/checklists/data_format.py +1 -1
- jarvis/jarvis_code_analysis/checklists/devops.py +1 -1
- jarvis/jarvis_code_analysis/checklists/docs.py +1 -1
- jarvis/jarvis_code_analysis/checklists/go.py +1 -1
- jarvis/jarvis_code_analysis/checklists/infrastructure.py +1 -1
- jarvis/jarvis_code_analysis/checklists/java.py +1 -1
- jarvis/jarvis_code_analysis/checklists/javascript.py +1 -1
- jarvis/jarvis_code_analysis/checklists/kotlin.py +1 -1
- jarvis/jarvis_code_analysis/checklists/loader.py +31 -29
- jarvis/jarvis_code_analysis/checklists/php.py +1 -1
- jarvis/jarvis_code_analysis/checklists/python.py +1 -1
- jarvis/jarvis_code_analysis/checklists/ruby.py +1 -1
- jarvis/jarvis_code_analysis/checklists/rust.py +1 -1
- jarvis/jarvis_code_analysis/checklists/shell.py +1 -1
- jarvis/jarvis_code_analysis/checklists/sql.py +1 -1
- jarvis/jarvis_code_analysis/checklists/swift.py +1 -1
- jarvis/jarvis_code_analysis/checklists/web.py +1 -1
- jarvis/jarvis_code_analysis/code_review.py +292 -190
- jarvis/jarvis_dev/main.py +73 -56
- jarvis/jarvis_git_details/main.py +29 -33
- jarvis/jarvis_git_squash/main.py +13 -11
- jarvis/jarvis_git_utils/git_commiter.py +15 -5
- jarvis/jarvis_mcp/__init__.py +8 -10
- jarvis/jarvis_mcp/sse_mcp_client.py +182 -205
- jarvis/jarvis_mcp/stdio_mcp_client.py +93 -120
- jarvis/jarvis_mcp/streamable_mcp_client.py +117 -142
- jarvis/jarvis_methodology/main.py +71 -39
- jarvis/jarvis_multi_agent/__init__.py +24 -16
- jarvis/jarvis_multi_agent/main.py +10 -4
- jarvis/jarvis_platform/__init__.py +1 -1
- jarvis/jarvis_platform/base.py +44 -18
- jarvis/jarvis_platform/human.py +15 -3
- jarvis/jarvis_platform/kimi.py +117 -81
- jarvis/jarvis_platform/openai.py +23 -28
- jarvis/jarvis_platform/registry.py +43 -29
- jarvis/jarvis_platform/tongyi.py +16 -10
- jarvis/jarvis_platform/yuanbao.py +197 -144
- jarvis/jarvis_platform_manager/main.py +4 -2
- jarvis/jarvis_smart_shell/main.py +35 -30
- jarvis/jarvis_tools/ask_user.py +8 -16
- jarvis/jarvis_tools/base.py +3 -2
- jarvis/jarvis_tools/chdir.py +7 -19
- jarvis/jarvis_tools/cli/main.py +14 -10
- jarvis/jarvis_tools/code_plan.py +10 -31
- jarvis/jarvis_tools/create_code_agent.py +6 -11
- jarvis/jarvis_tools/create_sub_agent.py +10 -22
- jarvis/jarvis_tools/edit_file.py +98 -76
- jarvis/jarvis_tools/execute_script.py +46 -46
- jarvis/jarvis_tools/file_analyzer.py +22 -34
- jarvis/jarvis_tools/file_operation.py +69 -62
- jarvis/jarvis_tools/generate_new_tool.py +0 -2
- jarvis/jarvis_tools/methodology.py +19 -23
- jarvis/jarvis_tools/read_code.py +35 -35
- jarvis/jarvis_tools/read_webpage.py +7 -16
- jarvis/jarvis_tools/registry.py +63 -30
- jarvis/jarvis_tools/rewrite_file.py +26 -29
- jarvis/jarvis_tools/search_web.py +5 -8
- jarvis/jarvis_tools/virtual_tty.py +133 -122
- jarvis/jarvis_utils/__init__.py +0 -1
- jarvis/jarvis_utils/builtin_replace_map.py +9 -9
- jarvis/jarvis_utils/config.py +60 -37
- jarvis/jarvis_utils/embedding.py +24 -19
- jarvis/jarvis_utils/file_processors.py +16 -9
- jarvis/jarvis_utils/git_utils.py +157 -107
- jarvis/jarvis_utils/globals.py +1 -1
- jarvis/jarvis_utils/input.py +85 -52
- jarvis/jarvis_utils/jarvis_history.py +43 -0
- jarvis/jarvis_utils/methodology.py +31 -24
- jarvis/jarvis_utils/output.py +164 -80
- jarvis/jarvis_utils/tag.py +2 -1
- jarvis/jarvis_utils/utils.py +84 -52
- {jarvis_ai_assistant-0.1.193.dist-info → jarvis_ai_assistant-0.1.195.dist-info}/METADATA +362 -230
- jarvis_ai_assistant-0.1.195.dist-info/RECORD +98 -0
- jarvis/jarvis_agent/file_input_handler.py +0 -112
- jarvis/jarvis_event/__init__.py +0 -0
- jarvis_ai_assistant-0.1.193.dist-info/RECORD +0 -99
- {jarvis_ai_assistant-0.1.193.dist-info → jarvis_ai_assistant-0.1.195.dist-info}/WHEEL +0 -0
- {jarvis_ai_assistant-0.1.193.dist-info → jarvis_ai_assistant-0.1.195.dist-info}/entry_points.txt +0 -0
- {jarvis_ai_assistant-0.1.193.dist-info → jarvis_ai_assistant-0.1.195.dist-info}/licenses/LICENSE +0 -0
- {jarvis_ai_assistant-0.1.193.dist-info → jarvis_ai_assistant-0.1.195.dist-info}/top_level.txt +0 -0
jarvis/jarvis_platform/tongyi.py
CHANGED
@@ -118,7 +118,7 @@ class TongyiPlatform(BasePlatform):
|
|
118
118
|
# Determine content type based on fileKey extension
|
119
119
|
file_ext = os.path.splitext(file_info["fileKey"])[1].lower()
|
120
120
|
is_image = file_ext in self.IMAGE_EXTENSIONS
|
121
|
-
|
121
|
+
|
122
122
|
contents.append(
|
123
123
|
{
|
124
124
|
"role": "user",
|
@@ -152,9 +152,11 @@ class TongyiPlatform(BasePlatform):
|
|
152
152
|
"specifiedModel": "",
|
153
153
|
"deepThink": True if self.model_name == "Thinking" else False,
|
154
154
|
"deepResearch": False,
|
155
|
-
"fileUploadBatchId":
|
156
|
-
|
157
|
-
|
155
|
+
"fileUploadBatchId": (
|
156
|
+
self.uploaded_file_info[0]["batchId"]
|
157
|
+
if self.uploaded_file_info
|
158
|
+
else ""
|
159
|
+
),
|
158
160
|
},
|
159
161
|
"contents": contents,
|
160
162
|
}
|
@@ -331,7 +333,7 @@ class TongyiPlatform(BasePlatform):
|
|
331
333
|
# Determine file type based on extension
|
332
334
|
file_ext = os.path.splitext(file_path)[1].lower()
|
333
335
|
is_image = file_ext in self.IMAGE_EXTENSIONS
|
334
|
-
|
336
|
+
|
335
337
|
uploaded_files.append(
|
336
338
|
{
|
337
339
|
"fileKey": file_name,
|
@@ -347,13 +349,19 @@ class TongyiPlatform(BasePlatform):
|
|
347
349
|
headers = self._get_base_headers()
|
348
350
|
payload = {
|
349
351
|
"fileKeys": [f["fileKey"] for f in uploaded_files],
|
350
|
-
"fileType":
|
352
|
+
"fileType": (
|
353
|
+
"image"
|
354
|
+
if any(f["fileType"] == "image" for f in uploaded_files)
|
355
|
+
else "file"
|
356
|
+
),
|
351
357
|
"dir": upload_token["dir"],
|
352
358
|
}
|
353
359
|
|
354
360
|
response = requests.post(url, headers=headers, json=payload)
|
355
361
|
if response.status_code != 200:
|
356
|
-
spinner.text =
|
362
|
+
spinner.text = (
|
363
|
+
f"获取下载链接失败: HTTP {response.status_code}"
|
364
|
+
)
|
357
365
|
spinner.fail("❌")
|
358
366
|
return False
|
359
367
|
|
@@ -393,9 +401,7 @@ class TongyiPlatform(BasePlatform):
|
|
393
401
|
add_url, headers=headers, json=add_payload
|
394
402
|
)
|
395
403
|
if add_response.status_code != 200:
|
396
|
-
spinner.text =
|
397
|
-
f"添加文件到对话失败: HTTP {add_response.status_code}"
|
398
|
-
)
|
404
|
+
spinner.text = f"添加文件到对话失败: HTTP {add_response.status_code}"
|
399
405
|
spinner.fail("❌")
|
400
406
|
continue
|
401
407
|
|