jarvis-ai-assistant 0.1.88__py3-none-any.whl → 0.1.90__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/tools/coder.py DELETED
@@ -1,69 +0,0 @@
1
- import os
2
- from typing import Dict, Any, Optional
3
- from jarvis.jarvis_coder.main import JarvisCoder
4
- from jarvis.utils import PrettyOutput, OutputType
5
-
6
- class CoderTool:
7
- """代码修改工具"""
8
-
9
- name = "coder"
10
- description = "分析并修改现有代码,用于实现新功能、修复bug、重构代码等。能理解代码上下文并进行精确的代码编辑。"
11
- parameters = {
12
- "feature": {
13
- "type": "string",
14
- "description": "要实现的功能描述或需要修改的内容,例如:'添加日志功能'、'修复内存泄漏'、'优化性能'等",
15
- "required": True
16
- },
17
- "dir": {
18
- "type": "string",
19
- "description": "项目根目录,默认为当前目录",
20
- "required": False
21
- },
22
- "language": {
23
- "type": "string",
24
- "description": "项目的主要编程语言,默认为python",
25
- "required": False
26
- }
27
- }
28
-
29
- def __init__(self):
30
- self._coder = None
31
-
32
-
33
- def _init_coder(self, dir: Optional[str] = None, language: Optional[str] = "python") -> None:
34
- """初始化JarvisCoder实例"""
35
- if not self._coder:
36
- import os
37
- work_dir = dir or os.getcwd()
38
- self._coder = JarvisCoder(work_dir, language)
39
-
40
- def execute(self, args: Dict) -> Dict[str, Any]:
41
- """执行代码修改
42
-
43
- Args:
44
- feature: 要实现的功能描述
45
- dir: 可选,项目根目录
46
- language: 可选,编程语言
47
-
48
- Returns:
49
- Dict[str, Any]: 执行结果
50
- """
51
- feature = args.get("feature")
52
- dir = args.get("dir")
53
- language = args.get("language", "python")
54
-
55
- try:
56
- self.current_dir = os.getcwd()
57
- self._init_coder(dir, language)
58
- result = self._coder.execute(feature)
59
- return result
60
- except Exception as e:
61
- PrettyOutput.print(f"代码修改失败: {str(e)}", OutputType.ERROR)
62
- return {
63
- "success": False,
64
- "stdout": "",
65
- "stderr": f"执行失败: {str(e)}",
66
- "error": e
67
- }
68
- finally:
69
- os.chdir(self.current_dir)
@@ -1,40 +0,0 @@
1
- jarvis/__init__.py,sha256=LBqI57It2XH2RYcs4daPQFNHcA9IzWISqF35HvrX_sk,50
2
- jarvis/agent.py,sha256=_qh4mSojAgClOEz5pTiRIfRJU-5_3QGzBAU09roCjtk,19095
3
- jarvis/main.py,sha256=72od8757A3bhe0ncE38S7u-YZsAh0y50w9ozMhgqIU8,5423
4
- jarvis/utils.py,sha256=Y5zig7AgIzdWHF31qHaMUziezythfjVKjxFRtMzd1m4,10357
5
- jarvis/jarvis_codebase/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- jarvis/jarvis_codebase/main.py,sha256=hYdDwREfFW5KPbIbLZ75MFCth6VqrwxSeNfXiQavdzE,26473
7
- jarvis/jarvis_coder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- jarvis/jarvis_coder/main.py,sha256=Rdt9w_uGamDHN-jjZXtHdUNGHa0q2fbGe9R9Ay6XXe0,25431
9
- jarvis/jarvis_rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- jarvis/jarvis_rag/main.py,sha256=a8TtPVCh5Xd6W1AaRFGeXvU_1hEnHQdoMElxnMuq0ew,24773
11
- jarvis/jarvis_smart_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- jarvis/jarvis_smart_shell/main.py,sha256=QgR1CZRcTVfC8a5hMso3onH3pFdDoniRjr0YQvY2jXQ,3809
13
- jarvis/models/__init__.py,sha256=mrOt67nselz_H1gX9wdAO4y2DY5WPXzABqJbr5Des8k,63
14
- jarvis/models/ai8.py,sha256=Te-zqUVTTsismsoS8yXljAMwxKY5BVHdfwJyzPrIYSc,12216
15
- jarvis/models/base.py,sha256=vQmgr-l0fRzVTUX4orbQZIKsXEInagjFdYv1cL9Hp7U,1511
16
- jarvis/models/kimi.py,sha256=ltYoHQDn9vfZyhZ25eUVKMBpxKKlqlw4kManozVF7uo,16135
17
- jarvis/models/ollama.py,sha256=iPCsJKZs3kXtuJyVBo6d6Ls5qBkSRgtuqF38PDFadso,6097
18
- jarvis/models/openai.py,sha256=Ns_kpJcWoQuxdKScOFlfkSGjrL2dVGzgmvcnP44sEgs,4044
19
- jarvis/models/oyi.py,sha256=vV3IMsdegxQqhS2vvG6MB648fec6bVopdNZC5xcdY_c,14678
20
- jarvis/models/registry.py,sha256=Lt8IdVBAEx_CCFtfZJPgw3nxSEjfFcqI47I-U64kIbg,8257
21
- jarvis/tools/__init__.py,sha256=7Rqyj5hBAv5cWDVr5T9ZTZASO7ssBHeQNm2_4ZARdkA,72
22
- jarvis/tools/ask_user.py,sha256=OELDt7oTCjI2G-CebvnBSxFJhqkIWcugLStU-XxouzE,1998
23
- jarvis/tools/base.py,sha256=EGRGbdfbLXDLwtyoWdvp9rlxNX7bzc20t0Vc2VkwIEY,652
24
- jarvis/tools/chdir.py,sha256=TjfPbX8yvNKgUNJEMXh3ZlVDEIse_Fo8xMoVsiK7_dA,2688
25
- jarvis/tools/codebase_qa.py,sha256=LsowsgL7HBmdBwa7zXcYi_OkwOok4qbnzYWYsuZxHtU,2413
26
- jarvis/tools/coder.py,sha256=kmotT2Klsug44S51QoSW9DzkxLzcF-XonyYAEoWZV6c,2295
27
- jarvis/tools/file_ops.py,sha256=h8g0eT9UvlJf4kt0DLXvdSsjcPj7x19lxWdDApeDfpg,3842
28
- jarvis/tools/generator.py,sha256=TB1zcw_JmRL2W9w6L4IxtrLF3gjnNw5Jj2Zrowj0eSg,5763
29
- jarvis/tools/methodology.py,sha256=UG6s5VYRcd9wrKX4cg6f7zJhet5AIcthFGMOAdevBiw,5175
30
- jarvis/tools/registry.py,sha256=AbADf8pcjHqfNoQNJkWqEuVg6zHRdryhJyDQ5w4O2sc,9177
31
- jarvis/tools/search.py,sha256=c9dXtyICdl8Lm8shNPNyIx9k67uY0rMF8xnIKu2RsnE,8787
32
- jarvis/tools/shell.py,sha256=UPKshPyOaUwTngresUw-ot1jHjQIb4wCY5nkJqa38lU,2520
33
- jarvis/tools/sub_agent.py,sha256=rEtAmSVY2ZjFOZEKr5m5wpACOQIiM9Zr_3dT92FhXYU,2621
34
- jarvis/tools/webpage.py,sha256=d3w3Jcjcu1ESciezTkz3n3Zf-rp_l91PrVoDEZnckOo,2391
35
- jarvis_ai_assistant-0.1.88.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
36
- jarvis_ai_assistant-0.1.88.dist-info/METADATA,sha256=0TMTVTnHXcL9qyqfgvNv0KmAGa1nUDUkD_NQ1bV2EG0,12589
37
- jarvis_ai_assistant-0.1.88.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
38
- jarvis_ai_assistant-0.1.88.dist-info/entry_points.txt,sha256=sdmIO86MrIUepJTGyHs0i_Ho9VGf1q9YRP4RgQvGWcI,280
39
- jarvis_ai_assistant-0.1.88.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
40
- jarvis_ai_assistant-0.1.88.dist-info/RECORD,,
File without changes