jarvis-ai-assistant 0.1.97__py3-none-any.whl → 0.1.98__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.

@@ -11,33 +11,33 @@ from jarvis.models.registry import PlatformRegistry
11
11
  from jarvis.utils import PrettyOutput, OutputType, load_env_from_file
12
12
 
13
13
  def execute_command(command: str) -> None:
14
- """显示命令并允许用户编辑,回车执行,Ctrl+C取消"""
14
+ """Show command and allow user to edit, then execute, Ctrl+C to cancel"""
15
15
  try:
16
- print("\n生成的命令 (可以编辑,回车执行,Ctrl+C取消):")
17
- # 预填充输入行
16
+ print("\nGenerated command (can be edited, press Enter to execute, Ctrl+C to cancel):")
17
+ # Pre-fill input line
18
18
  readline.set_startup_hook(lambda: readline.insert_text(command))
19
19
  try:
20
20
  edited_command = input("> ")
21
- if edited_command.strip(): # 确保命令不为空
21
+ if edited_command.strip(): # Ensure command is not empty
22
22
  os.system(edited_command)
23
23
  except KeyboardInterrupt:
24
- print("\n已取消执行")
24
+ print("\nExecution cancelled")
25
25
  finally:
26
- readline.set_startup_hook() # 清除预填充
26
+ readline.set_startup_hook() # Clear pre-filled
27
27
  except Exception as e:
28
- PrettyOutput.print(f"执行命令时发生错误: {str(e)}", OutputType.ERROR)
28
+ PrettyOutput.print(f"Failed to execute command: {str(e)}", OutputType.ERROR)
29
29
 
30
30
  def process_request(request: str) -> Optional[str]:
31
- """处理用户请求并返回对应的shell命令
31
+ """Process user request and return corresponding shell command
32
32
 
33
33
  Args:
34
- request: 用户的自然语言请求
34
+ request: User's natural language request
35
35
 
36
36
  Returns:
37
- Optional[str]: 对应的shell命令,如果处理失败则返回None
37
+ Optional[str]: Corresponding shell command, return None if processing fails
38
38
  """
39
39
  try:
40
- # 获取语言模型实例
40
+ # Get language model instance
41
41
  PlatformRegistry.suppress_output = True
42
42
  model = PlatformRegistry.get_global_platform_registry().get_normal_platform()
43
43
  model.set_suppress_output(True)
@@ -45,7 +45,7 @@ def process_request(request: str) -> Optional[str]:
45
45
  shell = os.environ.get("SHELL") or "bash"
46
46
  current_path = os.getcwd()
47
47
 
48
- # 设置系统提示
48
+ # Set system prompt
49
49
  system_message = f"""You are a shell command generation assistant.
50
50
 
51
51
  Your only task is to convert user's natural language requirements into corresponding shell commands.
@@ -85,26 +85,26 @@ Remember: Only return the command itself, without any additional content.
85
85
  return None
86
86
 
87
87
  except Exception as e:
88
- PrettyOutput.print(f"处理请求时发生错误: {str(e)}", OutputType.ERROR)
88
+ PrettyOutput.print(f"Failed to process request: {str(e)}", OutputType.ERROR)
89
89
  return None
90
90
 
91
91
  def main():
92
92
  # 创建参数解析器
93
93
  load_env_from_file()
94
94
  parser = argparse.ArgumentParser(
95
- description="将自然语言需求转换为shell命令",
95
+ description="Convert natural language requirements to shell commands",
96
96
  formatter_class=argparse.RawDescriptionHelpFormatter,
97
97
  epilog="""
98
- 示例:
99
- %(prog)s "查找当前目录下所有的Python文件"
100
- %(prog)s "压缩所有jpg图片"
101
- %(prog)s "查找最近一周修改过的文档"
98
+ Example:
99
+ %(prog)s "Find all Python files in the current directory"
100
+ %(prog)s "Compress all jpg images"
101
+ %(prog)s "Find documents modified in the last week"
102
102
  """)
103
103
 
104
104
  # 添加参数
105
105
  parser.add_argument(
106
106
  "request",
107
- help="用自然语言描述你需要执行的操作"
107
+ help="Describe the operation you want to perform in natural language"
108
108
  )
109
109
 
110
110
  # 解析参数
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: jarvis-ai-assistant
3
- Version: 0.1.97
3
+ Version: 0.1.98
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
@@ -1,20 +1,20 @@
1
- jarvis/__init__.py,sha256=H5VVLl_TbloHsL4Uo5ZiI3kdTZALf6RmT-dv6Xy76a8,50
1
+ jarvis/__init__.py,sha256=LaazWaS94sRO9a8aOdOMwKl05JkbI63DYYlhGFXw32M,50
2
2
  jarvis/agent.py,sha256=9dfXBYO2QPYpiIXJixgoc1-CKHBDQcBlhskWrb0ZNYc,19636
3
3
  jarvis/main.py,sha256=mV_rW268R2CWnwDLUqmCqVOzEZBodwJoTzPiz979QF8,5919
4
4
  jarvis/utils.py,sha256=nqmOuQtmoIsc67iQNuWADwbXf2D3cbGjXan5VXLaTYk,11373
5
5
  jarvis/jarvis_codebase/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  jarvis/jarvis_codebase/main.py,sha256=8A4VwK_MjAknT6ANj5Ptgf3wDD6e8rFOQVcU4gcVvH8,31183
7
7
  jarvis/jarvis_coder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- jarvis/jarvis_coder/git_utils.py,sha256=Rm0odJSbI3KGo8rTAAv1YsuudgjROlbHl7UBVOcxK3c,2237
9
- jarvis/jarvis_coder/main.py,sha256=l8q4xEvxSlha0kHJ3GarDCeu3mIu1un6OFeWALbQAqY,25144
10
- jarvis/jarvis_coder/patch_handler.py,sha256=FJy8NxECVExBudBlbOchoBKaLJQyG8z-KorjNkXUig0,9649
11
- jarvis/jarvis_coder/plan_generator.py,sha256=ODBeCT7pSv-SA0l22q8nAOwn2Usqr1TKHci8zMVpwmk,4474
8
+ jarvis/jarvis_coder/git_utils.py,sha256=91Kv7Q4SFNXj-SJ5L-5Bv5UQVXEPnR7LCLXPNygGViA,2334
9
+ jarvis/jarvis_coder/main.py,sha256=Rjjq8pBhKaSpsjPJ-qbehYq_7wLjmeeZUjlXGgamuhI,25853
10
+ jarvis/jarvis_coder/patch_handler.py,sha256=YOTG-OZa-J6Zhp7IzSTCLQn90vyN3eSbOQyqzT7LZiE,9768
11
+ jarvis/jarvis_coder/plan_generator.py,sha256=nAaBFwPPI5Lu89hsZRYad0m_hTELnRQZ2plSx6VJU3Q,4585
12
12
  jarvis/jarvis_platform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- jarvis/jarvis_platform/main.py,sha256=R0b51en28HaMpqc2jxP4xnOUXYIQa4GBUs0vC_acD34,4882
13
+ jarvis/jarvis_platform/main.py,sha256=Hb40MmN4We9oY8BHzLyrNTm-p7Mg50s2nqLaLxflC48,4981
14
14
  jarvis/jarvis_rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
- jarvis/jarvis_rag/main.py,sha256=gVHdF_WyzJEoOgda6xVe-P9R2iAIRNf_vj6xZ1WPvrw,32766
15
+ jarvis/jarvis_rag/main.py,sha256=z6D-2nNVptp7YGHhU4O8gSfFsEXhNkPvj6ZMJztQuuU,33490
16
16
  jarvis/jarvis_smart_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- jarvis/jarvis_smart_shell/main.py,sha256=nTIErwnib9z8a67f5k3PqlhTvbXffo4BVpAANXWekos,3895
17
+ jarvis/jarvis_smart_shell/main.py,sha256=MOTSlE09YqwV4smWjHTGLKPf--hFMWfGrgD1LMb1FGU,3988
18
18
  jarvis/models/__init__.py,sha256=mrOt67nselz_H1gX9wdAO4y2DY5WPXzABqJbr5Des8k,63
19
19
  jarvis/models/ai8.py,sha256=ZRNO3aRjmICRjCXl-_F9pTNQTY4j1tUd-WJoJpb9n4Y,11958
20
20
  jarvis/models/base.py,sha256=5QQAghMmVsg7jXvQN9ZzVoqCmMR0jb9bKgAVR3eOjQ8,2005
@@ -39,9 +39,9 @@ jarvis/tools/shell.py,sha256=6XIDzdTf67PDIObUZqLtHvhnlOLSyuV_GlfFwQJsSaU,2580
39
39
  jarvis/tools/sub_agent.py,sha256=7YPY3qUocH7RjE3MDKFGlXKlAMIQv3-ufPRzlNXwo7w,2676
40
40
  jarvis/tools/thinker.py,sha256=VFq0z9geAtGsRCbd8S73Rk7afAuGm3KQp6t5nayUJVg,4800
41
41
  jarvis/tools/webpage.py,sha256=_ts9ioSFR2wcMwjId_aV-jqSWpbiydU_beJQyn_aAv4,2405
42
- jarvis_ai_assistant-0.1.97.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
43
- jarvis_ai_assistant-0.1.97.dist-info/METADATA,sha256=23tqwSyUw2Nx2F6Q3VPuQBjAfi76ae2B6cafd2ZgboA,12766
44
- jarvis_ai_assistant-0.1.97.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
45
- jarvis_ai_assistant-0.1.97.dist-info/entry_points.txt,sha256=1D14s9v6rwpNzVD0muwe0tCKffJDEvLRBlEShbSFSbQ,331
46
- jarvis_ai_assistant-0.1.97.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
47
- jarvis_ai_assistant-0.1.97.dist-info/RECORD,,
42
+ jarvis_ai_assistant-0.1.98.dist-info/LICENSE,sha256=AGgVgQmTqFvaztRtCAXsAMryUymB18gZif7_l2e1XOg,1063
43
+ jarvis_ai_assistant-0.1.98.dist-info/METADATA,sha256=-s5OHAXkUGAVfb8oL5VJLIC2NUQRk2Vn0WoSaHVaxX0,12766
44
+ jarvis_ai_assistant-0.1.98.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
45
+ jarvis_ai_assistant-0.1.98.dist-info/entry_points.txt,sha256=1D14s9v6rwpNzVD0muwe0tCKffJDEvLRBlEShbSFSbQ,331
46
+ jarvis_ai_assistant-0.1.98.dist-info/top_level.txt,sha256=1BOxyWfzOP_ZXj8rVTDnNCJ92bBGB0rwq8N1PCpoMIs,7
47
+ jarvis_ai_assistant-0.1.98.dist-info/RECORD,,