janito 1.13.1__py3-none-any.whl → 1.14.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
@@ -1 +1 @@
1
- __version__ = "1.13.1"
1
+ __version__ = "1.14.1"
janito/agent/config.py CHANGED
@@ -39,9 +39,15 @@ class FileConfig(BaseConfig):
39
39
  def load(self):
40
40
  if self.path.exists():
41
41
  with open(self.path, "r", encoding="utf-8") as f:
42
- self._data = json.load(f)
43
- # Remove keys with value None (null in JSON)
44
- self._data = {k: v for k, v in self._data.items() if v is not None}
42
+ try:
43
+ self._data = json.load(f)
44
+ # Remove keys with value None (null in JSON)
45
+ self._data = {k: v for k, v in self._data.items() if v is not None}
46
+ except json.JSONDecodeError as e:
47
+ print(
48
+ f"⚠️ Warning: The config file '{self.path}' is corrupted (invalid JSON): {e}. Using empty config."
49
+ )
50
+ self._data = {}
45
51
 
46
52
  else:
47
53
  self._data = {}
@@ -3,11 +3,15 @@
3
3
  #}
4
4
  You are: {{ role }}
5
5
 
6
+ You will answer following a pattern of: discovery, description, implementation (when a change was request) and validation.
7
+
6
8
  {# Improves tool selection and platform specific constrains, eg, path format, C:\ vs /path #}
7
- You will be developing and testing in the following environment:
9
+ You will be using the following environment:
8
10
  Platform: {{ platform }}
9
11
  Python version: {{ python_version }}
10
12
  Shell/Environment: {{ shell_info }}
13
+
14
+ Before answering map the questions to artifacts found in the current directory - the current project.
11
15
 
12
16
  Respond according to the following guidelines:
13
17
  {# Exploratory hint #}
@@ -20,11 +24,12 @@ Respond according to the following guidelines:
20
24
  - Use the namespace functions to deliver the code changes instead of showing the code.
21
25
  {# Drive edit mode, place holders critical as shown to be crucial to avoid corruption with code placeholders #}
22
26
  - Prefer making localized edits using string replacements. If the required change is extensive, replace the entire file instead, provide full content without placeholders.
23
- {# Trying to prevent surrogates generation, found this frequently in gpt4.1/windows #}
27
+ {# Trying to prevent surrogates generation, found this frequently in gpt4.1/windows #}
24
28
  - While writing code, if you need an emoji or special Unicode character in a string, then insert the actual character (e.g., 📖) directly instead of using surrogate pairs or escape sequences.
25
29
  {# Without this, the LLM choses to create files from a literal interpretation of the purpose and intention #}
26
30
  - Before creating files search the code for the location related to the file purpose
27
- {# This will trigger a search for the old names/locations to be updates #}
31
+ {# This will trigger a search for the old names/locations to be updates #}
28
32
  - After moving, removing or renaming functions or classes to different modules, update all imports, references, tests, and documentation to reflect the new locations, then verify functionality.
29
33
  {# Keeping docstrings update is key to have semanatic match between prompts and code #}
30
- - Once development or updates are finished, ensure that new or updated packages, modules, functions are properly documented.
34
+ - Once development or updates are finished, ensure that new or updated packages, modules, functions are properly documented.
35
+
@@ -105,11 +105,11 @@ def assemble_second_line(
105
105
 
106
106
  def assemble_bindings_line():
107
107
  return (
108
- f"<b> F12</b>: {tr('Quick Action')} | "
108
+ f" <b>F1</b>: {tr('Restart Conversation')} | "
109
+ f"<b>F12</b>: {tr('Do It')} | "
109
110
  f"<b>Ctrl-Y</b>: {tr('Yes')} | "
110
111
  f"<b>Ctrl-N</b>: {tr('No')} | "
111
- f"<b>/help</b>: {tr('Help')} | "
112
- f"<b>/restart</b>: {tr('Reset Conversation')}"
112
+ f"<b>/help</b>: {tr('Help')}"
113
113
  )
114
114
 
115
115
 
@@ -154,21 +154,17 @@ def get_toolbar_func(
154
154
  def get_custom_key_bindings():
155
155
  """
156
156
  Returns prompt_toolkit KeyBindings for custom CLI shortcuts:
157
- - F12: Cycles through quick action phrases and submits.
157
+ - F12: Inserts 'Do It' and submits.
158
158
  - Ctrl-Y: Inserts 'Yes' and submits (for confirmation prompts).
159
159
  - Ctrl-N: Inserts 'No' and submits (for confirmation prompts).
160
160
  """
161
161
  bindings = KeyBindings()
162
- _f12_instructions = ["proceed", "go ahead", "continue", "next", "okay"]
163
- _f12_index = {"value": 0}
164
162
 
165
163
  @bindings.add("f12")
166
164
  def _(event):
167
165
  buf = event.app.current_buffer
168
- idx = _f12_index["value"]
169
- buf.text = _f12_instructions[idx]
166
+ buf.text = "Do It"
170
167
  buf.validate_and_handle()
171
- _f12_index["value"] = (idx + 1) % len(_f12_instructions)
172
168
 
173
169
  @bindings.add("c-y")
174
170
  def _(event):
@@ -182,6 +178,12 @@ def get_custom_key_bindings():
182
178
  buf.text = "No"
183
179
  buf.validate_and_handle()
184
180
 
181
+ @bindings.add("f1")
182
+ def _(event):
183
+ buf = event.app.current_buffer
184
+ buf.text = "/restart"
185
+ buf.validate_and_handle()
186
+
185
187
  return bindings
186
188
 
187
189
 
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: janito
3
- Version: 1.13.1
4
- Summary: Natural Language Coding Agent,
3
+ Version: 1.14.1
4
+ Summary: Natural Language Programming Agent,
5
5
  Author-email: João Pinto <joao.pinto@gmail.com>
6
6
  License-Expression: MIT
7
7
  Project-URL: homepage, https://janito.dev
@@ -29,10 +29,13 @@ Requires-Dist: mkdocs>=1.5.3; extra == "docs"
29
29
  Requires-Dist: mkdocs-material>=9.4.8; extra == "docs"
30
30
  Dynamic: license-file
31
31
 
32
- # 🚀 Janito: Natural Language Coding Agent
32
+ # 🚀 Janito: Natural Language Programming Agent
33
33
 
34
34
  Janito is an AI-powered assistant for the command line and web that interprets natural language system_prompt_template to edit code, manage files, and analyze projects using patterns and tools designed by experienced software engineers. It prioritizes transparency, interactive clarification, and precise, reviewable changes.
35
35
 
36
+ ![Janito Terminal Shell Screenshot](https://github.com/joaompinto/janito/raw/main/docs/imgs/terminal_shell.png)
37
+
38
+
36
39
  For a technical overview, see the [Architecture Guide](docs/reference/architecture.md).
37
40
 
38
41
  ## 📖 Full Documentation & Overview
@@ -1,9 +1,9 @@
1
- janito/__init__.py,sha256=B1AK9YV1itFsVaGDvnQIKlFZOLc6ZAzK0Pma9tDW1jM,24
1
+ janito/__init__.py,sha256=3FOgNNeZQVwOLG4zC5axze1mPCdl1GBkcL_JMAbAQcw,24
2
2
  janito/__main__.py,sha256=KKIoPBE9xPcb54PRYO2UOt0ti04iAwLeJlg8YY36vew,76
3
3
  janito/rich_utils.py,sha256=x7OsZdwtAOtUu_HYbrAMga0LElFMPbQL8GZ62vw5Jh8,1825
4
4
  janito/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  janito/agent/api_exceptions.py,sha256=TAz3FTE4soqUgKPqei2Jod9LOpA37g3s2-S3G5WGw4E,84
6
- janito/agent/config.py,sha256=dO64nxiiHj-tLJLN8sfY10GUuIaOmWu-NX73n9zVHfg,4609
6
+ janito/agent/config.py,sha256=1XqNEsltsF_4BiZ7rtyLhNndWmj7pDuTl2UpIi_U9fQ,4910
7
7
  janito/agent/config_defaults.py,sha256=22MxI84GF8YL5avIjAWxHlvARxu4A2wD0oou_lqNCeA,460
8
8
  janito/agent/config_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  janito/agent/content_handler.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -33,7 +33,7 @@ janito/agent/tool_base.py,sha256=KKWmMKyjxpWNukgdImLwZqs9cnS_tVzBt6cpQ532-KM,202
33
33
  janito/agent/tool_executor.py,sha256=yizyu88QteTHtJ_ktj679IqsaMyS-TQYR7rXnWI6lOg,5114
34
34
  janito/agent/tool_registry.py,sha256=AjxYgQTeG9wUTyi0h128AG7INCyziF0z3zux12BlXnE,1673
35
35
  janito/agent/tool_use_tracker.py,sha256=bEHirQX79u1uHnkmXO7t3JrBt2tHaQhaOzII7Nqiq5A,2874
36
- janito/agent/templates/profiles/system_prompt_template_base.txt.j2,sha256=0w1aN27wd6lo556Hq5a2CJkA80lLkugEdKONE2_THRM,2283
36
+ janito/agent/templates/profiles/system_prompt_template_base.txt.j2,sha256=iWE0xGOdfLgomNFA7e8j6DzdsN17NJV8QITSuxHYtqY,2496
37
37
  janito/agent/templates/profiles/system_prompt_template_base_pt.txt.j2,sha256=FX8piXbR9XNOEKkOSMt4ieZ2wn5fzQlffeQFf8d7gIc,723
38
38
  janito/agent/tests/__init__.py,sha256=QuXHKEzUJ_DooaKqenv_tKuNH-HabuIVZhvW5JNaeIc,52
39
39
  janito/agent/tools/__init__.py,sha256=LASzm6aHwqAtcDZnQFk9BW8HMn7s6yHDf4c5B4SXqs4,1248
@@ -127,7 +127,7 @@ janito/shell/prompt/session_setup.py,sha256=WHnQfhd71lfXkxp5Imjgq7PdmNHkydKl_y6T
127
127
  janito/shell/session/config.py,sha256=5hBgPeYDrgxtVEyVaR8nmw1DYNmSqY8ilyuNyUXnnpQ,3684
128
128
  janito/shell/session/history.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
129
129
  janito/shell/session/manager.py,sha256=LGf2x9mprGOHAJhq7_OfIZM8Z2bmAEJ_KakaZr1XqXc,3116
130
- janito/shell/ui/interactive.py,sha256=ZJwABzn651dvijMJs9JT6MvZjHe4Sw4Wykx8WIO2Be4,7901
130
+ janito/shell/ui/interactive.py,sha256=icfo1QborKUk2YAvIJHRW2EjQHoY3g2p7aRWgkYv7Cw,7798
131
131
  janito/termweb/app.py,sha256=co4a7cw6pC2P79dMZaNxjPJrP_B9suTGRIWTgqK5ccw,3322
132
132
  janito/termweb/static/editor.css,sha256=71xpzRL993GPKKJPfTVcPI6iHhjnUg2U5-z33EAuTWA,3185
133
133
  janito/termweb/static/editor.css.bak,sha256=S7tMjZFtcDZyx4asRf-WNclyuK9_rnemwOc6JpzSwdQ,2908
@@ -154,9 +154,9 @@ janito/tests/test_rich_utils.py,sha256=S_mGVynekAP0DM4A_ZaY-SseJGtdlBJxOlzc-v8lJ
154
154
  janito/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
155
155
  janito/web/__main__.py,sha256=5Ck6okOZmxKYkQ-ir4mxXDH7XWMNR-9szgsm0UyQLE0,734
156
156
  janito/web/app.py,sha256=-zUBA1zlnrZdYbI421CSAgFZXOisLmIznNzUJrkSLQQ,4762
157
- janito-1.13.1.dist-info/licenses/LICENSE,sha256=sHBqv0bvtrb29H7WRR-Z603YHm9pLtJIo3nHU_9cmgE,1091
158
- janito-1.13.1.dist-info/METADATA,sha256=ZTeYo-o3TM-dF9nMgOuZTRw2nX2rWtw19ns9Yzk5RG4,12898
159
- janito-1.13.1.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
160
- janito-1.13.1.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
161
- janito-1.13.1.dist-info/top_level.txt,sha256=m0NaVCq0-ivxbazE2-ND0EA9Hmuijj_OGkmCbnBcCig,7
162
- janito-1.13.1.dist-info/RECORD,,
157
+ janito-1.14.1.dist-info/licenses/LICENSE,sha256=sHBqv0bvtrb29H7WRR-Z603YHm9pLtJIo3nHU_9cmgE,1091
158
+ janito-1.14.1.dist-info/METADATA,sha256=5nRgmmcZUp0v0Bb9C-1ilF4xSNQcPAe6wdefLAhtluU,13025
159
+ janito-1.14.1.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
160
+ janito-1.14.1.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
161
+ janito-1.14.1.dist-info/top_level.txt,sha256=m0NaVCq0-ivxbazE2-ND0EA9Hmuijj_OGkmCbnBcCig,7
162
+ janito-1.14.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.7.1)
2
+ Generator: setuptools (80.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5