janito 2.0.0__py3-none-any.whl → 2.0.1__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.
janito/__init__.py CHANGED
@@ -3,4 +3,4 @@ janito: A Python package for managing and interacting with Large Language Model
3
3
  Provides a CLI for credential management and an extensible driver system for LLMs.
4
4
  """
5
5
 
6
- __version__ = "2.0.0"
6
+ __version__ = "2.0.1"
@@ -88,7 +88,7 @@ class GetFileOutlineTool(ToolBase):
88
88
  except Exception as e:
89
89
  self.report_error(
90
90
  tr("❌ Error reading file: {error}", error=e),
91
- ReportAction.OUTLINE,
91
+ ReportAction.READ,
92
92
  )
93
93
  return tr("Error reading file: {error}", error=e)
94
94
 
@@ -146,6 +146,6 @@ class GetFileOutlineTool(ToolBase):
146
146
  except Exception as e:
147
147
  self.report_error(
148
148
  tr("❌ Error reading file: {error}", error=e),
149
- ReportAction.OUTLINE,
149
+ ReportAction.READ,
150
150
  )
151
151
  return tr("Error reading file: {error}", error=e)
@@ -0,0 +1,34 @@
1
+ from janito.tools.tool_base import ToolBase
2
+ from janito.tools.adapters.local.adapter import register_local_tool
3
+ import webbrowser
4
+ import os
5
+
6
+ @register_local_tool
7
+ class OpenHtmlInBrowserTool(ToolBase):
8
+ """
9
+ Opens an HTML file in the default web browser.
10
+
11
+ Args:
12
+ file_path (str): The path to the HTML file to open.
13
+
14
+ Returns:
15
+ str: Status message indicating the result. Example:
16
+ - "✅ Successfully opened the file in the default browser."
17
+ - "⚠️ Error: The specified file does not exist."
18
+ - "⚠️ Error: The specified file is not an HTML file."
19
+ """
20
+
21
+ tool_name = "open_html_in_browser"
22
+
23
+ def run(self, file_path: str) -> str:
24
+ if not os.path.exists(file_path):
25
+ return "⚠️ Error: The specified file does not exist."
26
+
27
+ if not file_path.lower().endswith('.html'):
28
+ return "⚠️ Error: The specified file is not an HTML file."
29
+
30
+ try:
31
+ webbrowser.open(f"file://{os.path.abspath(file_path)}")
32
+ return "✅ Opened."
33
+ except Exception as e:
34
+ return f"⚠️ Error: {str(e)}"
janito/version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # janito/version.py
2
2
  """Single source of truth for the janito package version."""
3
3
 
4
- __version__ = "2.0.0"
4
+ __version__ = "2.0.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: janito
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: A new Python package called janito.
5
5
  Author-email: Your Name <your.email@example.com>
6
6
  Project-URL: Homepage, https://github.com/janito-dev/janito
@@ -1,4 +1,4 @@
1
- janito/__init__.py,sha256=WHnt1VCjelq118AsMiysxHbzMGxnqhR3NtQLckBqqcw,232
1
+ janito/__init__.py,sha256=Paiw3iaN7CdfA6fcBbBRvDysz6F16K5cEHEtpD8MWhw,232
2
2
  janito/__main__.py,sha256=lPQ8kAyYfyeS1KopmJ8EVY5g1YswlIqCS615mM_B_rM,70
3
3
  janito/config.py,sha256=HJh0CmZEx7AbMQOmFkiYHFNzc-fO7fqpZ9rh6RenxK8,201
4
4
  janito/config_manager.py,sha256=bbviXlbrSyQSVsYjcNo--ZLr_jFuAVL6ntuuWrvHbjs,4297
@@ -16,7 +16,7 @@ janito/provider_config.py,sha256=dzYvxWg3Smjt9Jbkw0CNdXmBMwSTgoFTOAajdPL2w5w,304
16
16
  janito/provider_registry.py,sha256=Heg6Kq59ObBLcTHvQc8VrTn6I0glzRmELjdsT5Y69mk,6411
17
17
  janito/report_events.py,sha256=q4OR_jTZNfcqaQF_fzTjgqo6_VlUIxSGWfhpT4nJWcw,938
18
18
  janito/utils.py,sha256=eXSsMgM69YyzahgCNrJQLcEbB8ssLI1MQqaa20ONxbE,376
19
- janito/version.py,sha256=4XOiYCCsvVtX_0MePjIzwj_LMtHE1PTv99GbktI3xd4,108
19
+ janito/version.py,sha256=ChQLkZ0LA3_BuBG8dvtkUit-Y1vd1NJBpuqITTrYxy8,108
20
20
  janito/agent/setup_agent.py,sha256=4TdZeutRKsjjWx5qIqEId4VY1rUUXED8XiWKdY1n4ac,4940
21
21
  janito/agent/templates/profiles/system_prompt_template_base_pt.txt.j2,sha256=FX8piXbR9XNOEKkOSMt4ieZ2wn5fzQlffeQFf8d7gIc,723
22
22
  janito/agent/templates/profiles/system_prompt_template_main.txt.j2,sha256=1MRFx_NRXAoBWFq_2c-CXGUCuWwmlGGcnbdpWv9x0pQ,2497
@@ -141,6 +141,7 @@ janito/tools/adapters/local/delete_text_in_file.py,sha256=ZPCBMDPHlxi5eUuILyAJQ1
141
141
  janito/tools/adapters/local/fetch_url.py,sha256=b5eRFRTG2L5rVIQAGXrPNm4j0kSUszhuG9pRVwnl_L0,3806
142
142
  janito/tools/adapters/local/find_files.py,sha256=5_7YxzxPWigNEvIG9kKwzaPB1n-Gt0TkWEHY3ynJUd4,6137
143
143
  janito/tools/adapters/local/move_file.py,sha256=_Pn34fYbRq7Ax2kSv0LeTHKRn0LnNScxaM7jA_QTjR8,5213
144
+ janito/tools/adapters/local/open_html_in_browser.py,sha256=swXRY1V7sFP7AULyloYd1Hd76gULebRX3biByN9d5Eo,1183
144
145
  janito/tools/adapters/local/open_url.py,sha256=gzueNkGLNWikWzbB32X4VQUGyBq31xuZ11t-qKioHAk,1221
145
146
  janito/tools/adapters/local/python_code_run.py,sha256=sUKZcXcdNyGD9XL5Ydk3q_Mu7uf7MRTLYtrnuQqhwi0,6616
146
147
  janito/tools/adapters/local/python_command_run.py,sha256=PgPa68GQMbwfiH2Lxg1bXOiFJDtXi1bbKT7c9gIAYxc,6556
@@ -152,7 +153,7 @@ janito/tools/adapters/local/run_bash_command.py,sha256=mfYeZMlvEIdPVQaeGeeMc7gBM
152
153
  janito/tools/adapters/local/run_powershell_command.py,sha256=Gaz--9vkKfST09fiMNuWhdZvD2-wd-GDqhxVudec8IM,9229
153
154
  janito/tools/adapters/local/view_file.py,sha256=MzGUjnOM-eMBANisAkNSvANn2UpA-GDqlE96KuCOkC4,7134
154
155
  janito/tools/adapters/local/get_file_outline/__init__.py,sha256=OKV_BHnoD9h-vkcVoW6AHmsuDjjauHPCKNK0nVFl4sU,37
155
- janito/tools/adapters/local/get_file_outline/core.py,sha256=NxUZhoBSH8ryYYYZKG8qBiYVV8GSTAfL5QwHJr-zVKg,6019
156
+ janito/tools/adapters/local/get_file_outline/core.py,sha256=9fhPok7uMKz38pUHDDdza7pySXdtGvM-4MS5hKk_boU,6013
156
157
  janito/tools/adapters/local/get_file_outline/markdown_outline.py,sha256=bXEBg0D93tEBDNy8t-wh4i7WxsxfpQ2C3dX1_rmtj08,434
157
158
  janito/tools/adapters/local/get_file_outline/python_outline.py,sha256=RAcf9Vxec08lA06drYaNre5HCJ2lTzrRAskZ3rlyE-U,10326
158
159
  janito/tools/adapters/local/get_file_outline/python_outline_v2.py,sha256=OOHKDGbOwxiCtr3i5m5ZAnELvoF12fKdzO2RCDuTsCs,5453
@@ -173,8 +174,8 @@ janito/tools/adapters/local/validate_file_syntax/ps1_validator.py,sha256=cP1jsMh
173
174
  janito/tools/adapters/local/validate_file_syntax/python_validator.py,sha256=lHzjlA4g9nCF9hXkGx3izWF0b0vJH3yV7Pu3buLyBbI,140
174
175
  janito/tools/adapters/local/validate_file_syntax/xml_validator.py,sha256=3CK7BEGO7gKI3bpeTtCFe0kJ5aKDZVh3Kh67bGIhcuc,294
175
176
  janito/tools/adapters/local/validate_file_syntax/yaml_validator.py,sha256=XLmOp7Ef6pLd97ICVnF3PxNKL1Yo5tLZsasvxPY478Y,165
176
- janito-2.0.0.dist-info/METADATA,sha256=2YI-TjyTm1YAU1aTEr2EkCEjWUvJCt-SjsIxRGqXxT0,10494
177
- janito-2.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
178
- janito-2.0.0.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
179
- janito-2.0.0.dist-info/top_level.txt,sha256=m0NaVCq0-ivxbazE2-ND0EA9Hmuijj_OGkmCbnBcCig,7
180
- janito-2.0.0.dist-info/RECORD,,
177
+ janito-2.0.1.dist-info/METADATA,sha256=je6Js6Dh1ijqnMFEEoS195uCldZ8A7iOVelSVeqOC4c,10494
178
+ janito-2.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
179
+ janito-2.0.1.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
180
+ janito-2.0.1.dist-info/top_level.txt,sha256=m0NaVCq0-ivxbazE2-ND0EA9Hmuijj_OGkmCbnBcCig,7
181
+ janito-2.0.1.dist-info/RECORD,,
File without changes