janito 2.3.1__py3-none-any.whl → 2.5.0__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 +1 -1
- janito/_version.py +57 -0
- janito/agent/setup_agent.py +95 -21
- janito/agent/templates/profiles/system_prompt_template_assistant.txt.j2 +1 -0
- janito/agent/templates/profiles/system_prompt_template_developer.txt.j2 +44 -0
- janito/cli/chat_mode/bindings.py +21 -2
- janito/cli/chat_mode/chat_entry.py +2 -3
- janito/cli/chat_mode/prompt_style.py +5 -0
- janito/cli/chat_mode/script_runner.py +153 -0
- janito/cli/chat_mode/session.py +128 -122
- janito/cli/chat_mode/session_profile_select.py +80 -0
- janito/cli/chat_mode/shell/commands/__init__.py +19 -9
- janito/cli/chat_mode/shell/commands/_priv_check.py +5 -0
- janito/cli/chat_mode/shell/commands/bang.py +36 -0
- janito/cli/chat_mode/shell/commands/conversation_restart.py +31 -24
- janito/cli/chat_mode/shell/commands/execute.py +42 -0
- janito/cli/chat_mode/shell/commands/help.py +7 -4
- janito/cli/chat_mode/shell/commands/model.py +28 -0
- janito/cli/chat_mode/shell/commands/prompt.py +0 -8
- janito/cli/chat_mode/shell/commands/read.py +37 -0
- janito/cli/chat_mode/shell/commands/tools.py +45 -18
- janito/cli/chat_mode/shell/commands/write.py +37 -0
- janito/cli/chat_mode/shell/commands.bak.zip +0 -0
- janito/cli/chat_mode/shell/input_history.py +1 -1
- janito/cli/chat_mode/shell/session/manager.py +0 -68
- janito/cli/chat_mode/shell/session.bak.zip +0 -0
- janito/cli/chat_mode/toolbar.py +44 -27
- janito/cli/cli_commands/list_tools.py +44 -11
- janito/cli/cli_commands/model_utils.py +95 -95
- janito/cli/cli_commands/show_system_prompt.py +57 -14
- janito/cli/config.py +5 -6
- janito/cli/core/getters.py +33 -33
- janito/cli/core/runner.py +27 -20
- janito/cli/core/setters.py +10 -1
- janito/cli/main_cli.py +40 -10
- janito/cli/prompt_core.py +18 -2
- janito/cli/prompt_setup.py +56 -0
- janito/cli/rich_terminal_reporter.py +21 -6
- janito/cli/single_shot_mode/handler.py +24 -77
- janito/cli/verbose_output.py +1 -1
- janito/config_manager.py +125 -112
- janito/drivers/dashscope.bak.zip +0 -0
- janito/drivers/driver_registry.py +0 -2
- janito/drivers/openai/README.md +20 -0
- janito/drivers/openai_responses.bak.zip +0 -0
- janito/event_bus/event.py +2 -2
- janito/formatting_token.py +7 -6
- janito/i18n/pt.py +0 -1
- janito/llm/README.md +23 -0
- janito/llm/agent.py +80 -16
- janito/llm/auth.py +63 -63
- janito/llm/driver.py +8 -0
- janito/provider_registry.py +178 -176
- janito/providers/__init__.py +0 -2
- janito/providers/azure_openai/model_info.py +16 -16
- janito/providers/dashscope.bak.zip +0 -0
- janito/providers/provider_static_info.py +0 -3
- janito/providers/registry.py +26 -26
- janito/shell.bak.zip +0 -0
- janito/tools/DOCSTRING_STANDARD.txt +33 -0
- janito/tools/README.md +3 -0
- janito/tools/__init__.py +20 -6
- janito/tools/adapters/local/__init__.py +65 -62
- janito/tools/adapters/local/adapter.py +18 -35
- janito/tools/adapters/local/ask_user.py +3 -4
- janito/tools/adapters/local/copy_file.py +2 -2
- janito/tools/adapters/local/create_directory.py +2 -2
- janito/tools/adapters/local/create_file.py +2 -2
- janito/tools/adapters/local/delete_text_in_file.py +2 -2
- janito/tools/adapters/local/fetch_url.py +2 -2
- janito/tools/adapters/local/find_files.py +2 -1
- janito/tools/adapters/local/get_file_outline/core.py +2 -2
- janito/tools/adapters/local/get_file_outline/search_outline.py +2 -2
- janito/tools/adapters/local/move_file.py +2 -2
- janito/tools/adapters/local/open_html_in_browser.py +2 -1
- janito/tools/adapters/local/open_url.py +2 -2
- janito/tools/adapters/local/python_code_run.py +3 -3
- janito/tools/adapters/local/python_command_run.py +3 -3
- janito/tools/adapters/local/python_file_run.py +3 -3
- janito/tools/adapters/local/remove_directory.py +2 -2
- janito/tools/adapters/local/remove_file.py +2 -2
- janito/tools/adapters/local/replace_text_in_file.py +2 -2
- janito/tools/adapters/local/run_bash_command.py +3 -3
- janito/tools/adapters/local/run_powershell_command.py +3 -3
- janito/tools/adapters/local/search_text/core.py +2 -2
- janito/tools/adapters/local/validate_file_syntax/core.py +3 -3
- janito/tools/adapters/local/view_file.py +2 -1
- janito/tools/outline_file.bak.zip +0 -0
- janito/tools/permissions.py +45 -0
- janito/tools/permissions_parse.py +12 -0
- janito/tools/tool_base.py +14 -11
- janito/tools/tool_utils.py +4 -6
- janito/tools/tools_adapter.py +25 -20
- {janito-2.3.1.dist-info → janito-2.5.0.dist-info}/METADATA +46 -24
- {janito-2.3.1.dist-info → janito-2.5.0.dist-info}/RECORD +99 -82
- janito/agent/templates/profiles/system_prompt_template_base_pt.txt.j2 +0 -13
- janito/agent/templates/profiles/system_prompt_template_main.txt.j2 +0 -37
- janito/cli/chat_mode/shell/commands/edit.py +0 -25
- janito/cli/chat_mode/shell/commands/exec.py +0 -27
- janito/cli/chat_mode/shell/commands/termweb_log.py +0 -92
- janito/cli/termweb_starter.py +0 -122
- janito/termweb/app.py +0 -95
- janito/version.py +0 -4
- {janito-2.3.1.dist-info → janito-2.5.0.dist-info}/WHEEL +0 -0
- {janito-2.3.1.dist-info → janito-2.5.0.dist-info}/entry_points.txt +0 -0
- {janito-2.3.1.dist-info → janito-2.5.0.dist-info}/licenses/LICENSE +0 -0
- {janito-2.3.1.dist-info → janito-2.5.0.dist-info}/top_level.txt +0 -0
@@ -1,110 +1,123 @@
|
|
1
|
-
janito/__init__.py,sha256=
|
1
|
+
janito/__init__.py,sha256=a0pFui3A_AfWJiUfg93yE-Vf4868bqG3y9yg2fkTIuY,244
|
2
2
|
janito/__main__.py,sha256=lPQ8kAyYfyeS1KopmJ8EVY5g1YswlIqCS615mM_B_rM,70
|
3
|
+
janito/_version.py,sha256=B8if-CpKuIYGJzuNPxoHx7PGvRa7vKzGgvOzOdn-F5I,2348
|
3
4
|
janito/config.py,sha256=HJh0CmZEx7AbMQOmFkiYHFNzc-fO7fqpZ9rh6RenxK8,201
|
4
|
-
janito/config_manager.py,sha256
|
5
|
+
janito/config_manager.py,sha256=-v28Rybh0KUXU8dZF-ozqHWXn7djAyYxSrJEwXOC7TQ,5047
|
5
6
|
janito/conversation_history.py,sha256=GqqEJElTVONzOMRe-9g25WCMcDi0PF7DOnqGWLTrY_8,897
|
6
7
|
janito/dir_walk_utils.py,sha256=ON9EyVH7Aaik8WtCH5z8DQis9ycdoNVkjNvU16HH498,1193
|
7
8
|
janito/driver_events.py,sha256=51ab7KW_W6fVZVeO0ez-HJFY4NbTI327ZlEmEsEkxQc,3405
|
8
9
|
janito/exceptions.py,sha256=l4AepRdWwAuLp5fUygrBBgO9rpwgfV6JvY1afOdq2pw,913
|
9
10
|
janito/formatting.py,sha256=SMvOmL6bst3KGcI7OLa5D4DE127fQYuHZS3oY8OPsn8,2031
|
10
|
-
janito/formatting_token.py,sha256=
|
11
|
+
janito/formatting_token.py,sha256=ECZ9CNcOfQeutNMTZZTQrKm17pTgNpMAGVsNr7_EEnE,2167
|
11
12
|
janito/gitignore_utils.py,sha256=P3iF9fMWAomqULq2xsoqHtI9uNIFSPcagljrxZshmLw,4110
|
12
13
|
janito/perf_singleton.py,sha256=g1h0Sdf4ydzegeEpJlMhQt4H0GQZ2hryXrdYOTL-b30,113
|
13
14
|
janito/performance_collector.py,sha256=RYu4av16Trj3RljJZ8-2Gbn1KlGdJUosrcVFYtwviNI,6285
|
14
15
|
janito/platform_discovery.py,sha256=JN3kC7hkxdvuj-AyrJTlbbDJjtNHke3fdlZDqGi_uz0,4621
|
15
16
|
janito/provider_config.py,sha256=acn2FEgWsEIyi2AxZiuCLoP2rXDd-nXcP5VB4CZHaeE,3189
|
16
|
-
janito/provider_registry.py,sha256=
|
17
|
+
janito/provider_registry.py,sha256=THlyJLhAr0hTb4OuLHc7BcOjTYy0LG-THc-kZRk3PCI,7787
|
17
18
|
janito/report_events.py,sha256=q4OR_jTZNfcqaQF_fzTjgqo6_VlUIxSGWfhpT4nJWcw,938
|
19
|
+
janito/shell.bak.zip,sha256=hznHbmgfkAkjuQDJ3w73XPQh05yrtUZQxLmtGbanbYU,22
|
18
20
|
janito/utils.py,sha256=eXSsMgM69YyzahgCNrJQLcEbB8ssLI1MQqaa20ONxbE,376
|
19
|
-
janito/
|
20
|
-
janito/agent/
|
21
|
-
janito/agent/templates/profiles/
|
22
|
-
janito/agent/templates/profiles/system_prompt_template_main.txt.j2,sha256=npmG2_WU2Rcp1z2n33vX5ShK0y6yKDQqF2zJytgmGpE,2533
|
21
|
+
janito/agent/setup_agent.py,sha256=CdhXRhnEJ6s3ZyIypBKVhyc9wJKzEKUw5Ph6a25sQAI,8568
|
22
|
+
janito/agent/templates/profiles/system_prompt_template_assistant.txt.j2,sha256=dTV9aF8ji2r9dzi-l4b9r95kHrbKmjvnRxk5cVpopN4,28
|
23
|
+
janito/agent/templates/profiles/system_prompt_template_developer.txt.j2,sha256=gIXF3dPgGxQnVqRBnT8r2sUGu7F_Sl0F4YF-TfyOKgI,2586
|
23
24
|
janito/cli/__init__.py,sha256=xaPDOrWphBbCR63Xpcx_yfpXSJIlCaaICc4j2qpWqrM,194
|
24
|
-
janito/cli/config.py,sha256=
|
25
|
+
janito/cli/config.py,sha256=t7sdM0I3RD_FZ2ni1xuGMFGzvCLMt3NwJKu3_WtxPUg,1068
|
25
26
|
janito/cli/console.py,sha256=gJolqzWL7jEPLxeuH-CwBDRFpXt976KdZOEAB2tdBDs,64
|
26
27
|
janito/cli/main.py,sha256=s5odou0txf8pzTf1ADk2yV7T5m8B6cejJ81e7iu776U,312
|
27
|
-
janito/cli/main_cli.py,sha256=
|
28
|
-
janito/cli/prompt_core.py,sha256=
|
28
|
+
janito/cli/main_cli.py,sha256=t5AgysW_mfeLlrNhJpLhumUs65YCWzvN4gkJRmozlKU,12086
|
29
|
+
janito/cli/prompt_core.py,sha256=IAa1X4fw4aPASFyOXGiFcpgiZXlVoFQM617F0mHMxsE,11587
|
29
30
|
janito/cli/prompt_handler.py,sha256=SnPTlL64noeAMGlI08VBDD5IDD8jlVMIYA4-fS8zVLg,215
|
30
|
-
janito/cli/
|
31
|
-
janito/cli/
|
31
|
+
janito/cli/prompt_setup.py,sha256=PoRXIWEoVJ5DQtOLO0JCz_8cVVWp7zhKXQtXJuRGiQ4,1882
|
32
|
+
janito/cli/rich_terminal_reporter.py,sha256=xoZ_oeeqAr1f6a20OvQx9hKfNuWUX6vOAoUIL3_anUA,5552
|
32
33
|
janito/cli/utils.py,sha256=plCQiDKIf3V8mFhhX5H9-MF2W86i-xRdWf8Xi117Z0w,677
|
33
|
-
janito/cli/verbose_output.py,sha256=
|
34
|
-
janito/cli/chat_mode/bindings.py,sha256=
|
35
|
-
janito/cli/chat_mode/chat_entry.py,sha256=
|
36
|
-
janito/cli/chat_mode/prompt_style.py,sha256
|
37
|
-
janito/cli/chat_mode/
|
38
|
-
janito/cli/chat_mode/
|
34
|
+
janito/cli/verbose_output.py,sha256=UmB1byT1V6wZvMJDIPfqajhmNcMnnJ3tgYocje5w0x8,7620
|
35
|
+
janito/cli/chat_mode/bindings.py,sha256=u8q8SekKyAFncoPI5mxeAQ2lI3loIEaUVyq2TqELv2c,1990
|
36
|
+
janito/cli/chat_mode/chat_entry.py,sha256=HjflAjGOz4xyRbzocsEzrjcVepfQYz3d9fzyZDMBB34,477
|
37
|
+
janito/cli/chat_mode/prompt_style.py,sha256=Yltxc9unsiWsJzfditE139iqL3S64d6G19LzrnqYvFg,825
|
38
|
+
janito/cli/chat_mode/script_runner.py,sha256=QwNIZWRPhlwsC4IOrh1rrZjTwMDeYGOByNZZVzg1tZk,6442
|
39
|
+
janito/cli/chat_mode/session.py,sha256=hwFilKshsZlR95ycX31clg4nD5DJiREmu9B-m02pbko,11941
|
40
|
+
janito/cli/chat_mode/session_profile_select.py,sha256=N_d1LMjXUS-ROQJaq0fTbPENxopXDuZwuLGCctg9Sd0,2894
|
41
|
+
janito/cli/chat_mode/toolbar.py,sha256=QWIVAdm31vNKu0UO_-igxYwVwtko-KzjtxPtK3DYH5Y,4891
|
39
42
|
janito/cli/chat_mode/shell/autocomplete.py,sha256=lE68MaVaodbA2VfUM0_YLqQVLBJAE_BJsd5cMtwuD-g,793
|
40
|
-
janito/cli/chat_mode/shell/
|
41
|
-
janito/cli/chat_mode/shell/
|
43
|
+
janito/cli/chat_mode/shell/commands.bak.zip,sha256=I7GFjXg2ORT5NzFpicH1vQ3kchhduQsZinzqo0xO8wU,74238
|
44
|
+
janito/cli/chat_mode/shell/input_history.py,sha256=EbfsZWzEkbW3VpWldN6Z885HwJq7QtxOveWaAmTamdg,2562
|
45
|
+
janito/cli/chat_mode/shell/session.bak.zip,sha256=m1GyO3Wy4G4D9sVgRO6ZDyC0VjclsmnEJsiQoer4LzI,5789
|
46
|
+
janito/cli/chat_mode/shell/commands/__init__.py,sha256=T-t6JGDPTf7v6Ap4UT7spC0c0FbQ6YVXSVEesgbjycw,2390
|
47
|
+
janito/cli/chat_mode/shell/commands/_priv_check.py,sha256=LfIa_IbJBIhKT17K2cACbfYEJprFUH-o4BPvNnGyPSE,204
|
48
|
+
janito/cli/chat_mode/shell/commands/bang.py,sha256=PE79ZDKb9l4cFGbHLdJbpBcKmJRvhyFQQcCrtofY0HQ,1746
|
42
49
|
janito/cli/chat_mode/shell/commands/base.py,sha256=I6-SVOcRd7q4PpoutLdrbhbqeUpJic2oyPhOSMgMihA,288
|
43
50
|
janito/cli/chat_mode/shell/commands/clear.py,sha256=wYEHGYcAohUoCJlbEhiXKfDbJvuzAVK4e9uirskIllw,422
|
44
|
-
janito/cli/chat_mode/shell/commands/conversation_restart.py,sha256=
|
45
|
-
janito/cli/chat_mode/shell/commands/
|
46
|
-
janito/cli/chat_mode/shell/commands/
|
47
|
-
janito/cli/chat_mode/shell/commands/help.py,sha256=Oa1oJ-Ea9uR6b57gwv7dVKKNRTFHyupahhOVh-P4rk8,633
|
51
|
+
janito/cli/chat_mode/shell/commands/conversation_restart.py,sha256=CDPYOZMWkgBlq-xMJEwOTXTpw_nNY9eBSfbqLtB1e00,3725
|
52
|
+
janito/cli/chat_mode/shell/commands/execute.py,sha256=OS7RHl2JS-tFOA9-YAvWEYnb7HvAKOFOr7MHagV6imM,2190
|
53
|
+
janito/cli/chat_mode/shell/commands/help.py,sha256=MvjnTskb7_z0aTbPML11Py2XYqBvLymzwIZgwE4bMpI,947
|
48
54
|
janito/cli/chat_mode/shell/commands/history_view.py,sha256=9dyxYpDHjT77LEIikjBQA03Ep3P2AmKXUwUnVsG0OQc,3584
|
49
55
|
janito/cli/chat_mode/shell/commands/lang.py,sha256=uIelDs3gPYDZ9X9gw7iDMmiwefT7TiBo32420pq2tW8,837
|
50
56
|
janito/cli/chat_mode/shell/commands/livelogs.py,sha256=uJI14qyubXEz8m0Cajd-vURPYxC__7p_CNCq6PVOHN0,2142
|
57
|
+
janito/cli/chat_mode/shell/commands/model.py,sha256=2tORoA5vdkAknbS9mnMi03gNKcLEkgmIuHPUHDGWxYo,1390
|
51
58
|
janito/cli/chat_mode/shell/commands/multi.py,sha256=HAAk0fAO3n8KFta3I4hT_scOAlz4SxWDyaNBUJBQ4nc,1985
|
52
|
-
janito/cli/chat_mode/shell/commands/prompt.py,sha256=
|
59
|
+
janito/cli/chat_mode/shell/commands/prompt.py,sha256=z59Nbx0ny51AqBOj3CtK6GdvIt7ZvgEnFHwlaAhPZTI,2104
|
60
|
+
janito/cli/chat_mode/shell/commands/read.py,sha256=AFdkfFWasoUQ8icvHROVEExyCip-sGPLumoUXNkqIFY,1972
|
53
61
|
janito/cli/chat_mode/shell/commands/role.py,sha256=7A2S2wzE6lcv1rg4iLGH8vVy-TnzRE0Tn_wPRhBHLpY,1474
|
54
62
|
janito/cli/chat_mode/shell/commands/session.py,sha256=9wsw5U24-KJgTT70KAwnGuS8MVPyvpxCJfAt_Io76O0,1574
|
55
63
|
janito/cli/chat_mode/shell/commands/session_control.py,sha256=tmMGJ8IvWoBwSIJu7T6GPnFYFrmXWIG2Gr9tTni4y3U,1307
|
56
|
-
janito/cli/chat_mode/shell/commands/
|
57
|
-
janito/cli/chat_mode/shell/commands/tools.py,sha256=je0ePuQTeSdPNOlyZIH1tBFedobJJCeCQHIIwTQufmU,2156
|
64
|
+
janito/cli/chat_mode/shell/commands/tools.py,sha256=G7tqjfkjXmTkMFIf6kHOhvYVq66LMPhGQdRyjpZO-xg,3190
|
58
65
|
janito/cli/chat_mode/shell/commands/utility.py,sha256=K982P-UwgPLzpEvSuSBGwiQ3zC34S_6T2ork_djweQw,847
|
59
66
|
janito/cli/chat_mode/shell/commands/verbose.py,sha256=HDTe0NhdcjBuhh-eJSW8iLPDeeBO95K5iSDAMAljxa4,953
|
67
|
+
janito/cli/chat_mode/shell/commands/write.py,sha256=kst0CBxR7UQurAjpx1junYwjm2bWsGVfSK80kJXAm54,1982
|
60
68
|
janito/cli/chat_mode/shell/session/__init__.py,sha256=uTYE_QpZFEn7v9QE5o1LdulpCWa9vmk0OsefbBGWg_c,37
|
61
69
|
janito/cli/chat_mode/shell/session/history.py,sha256=tYav6GgjAZkvWhlI_rfG6OArNqW6Wn2DTv39Hb20QYc,1262
|
62
|
-
janito/cli/chat_mode/shell/session/manager.py,sha256=
|
70
|
+
janito/cli/chat_mode/shell/session/manager.py,sha256=m6cQe-9SeIqBnnWVEGtZiBtCpStqIwqRzP09XPhJrdM,1005
|
63
71
|
janito/cli/cli_commands/list_models.py,sha256=VN7_DG6aTxaHPrc6_H-OftRXRT1urhf5ze_qJ_SO35U,1116
|
64
72
|
janito/cli/cli_commands/list_providers.py,sha256=AMAVdoS7KN7WA3gaKhZZdfio_zvknu21OLDc6CTFZ34,173
|
65
|
-
janito/cli/cli_commands/list_tools.py,sha256=
|
73
|
+
janito/cli/cli_commands/list_tools.py,sha256=b-OG-lVV4B99bBc05qOrac3qoK8qDJJWGGLHAxsRwvo,4060
|
66
74
|
janito/cli/cli_commands/model_selection.py,sha256=ANWtwC5glZkGMdaNtARDbEG3QmuBUcDLVxzzC5jeBNo,1643
|
67
|
-
janito/cli/cli_commands/model_utils.py,sha256=
|
75
|
+
janito/cli/cli_commands/model_utils.py,sha256=ZGIExsv7WMHL_pqh4yeUXIfFGlu0vZE08PF0bCIIIK4,2864
|
68
76
|
janito/cli/cli_commands/set_api_key.py,sha256=iPtWPhS5VeyIlwVX43TGg7OYUwXCcGzugvwoa3KB8A8,605
|
69
77
|
janito/cli/cli_commands/show_config.py,sha256=6j4P2mK1Q7KZGPF9EXV3ascuWRQtpbgAQgRAnNszBJI,2024
|
70
|
-
janito/cli/cli_commands/show_system_prompt.py,sha256=
|
78
|
+
janito/cli/cli_commands/show_system_prompt.py,sha256=fbFWKWiIuI-UmYy39oHSZE3LBtyDeOaJM-vXHDsgr3I,4604
|
71
79
|
janito/cli/core/__init__.py,sha256=YH95fhgY9yBX8RgqX9dSrEkl4exjV0T4rbmJ6xUpG-Y,196
|
72
80
|
janito/cli/core/event_logger.py,sha256=1X6lR0Ax7AgF8HlPWFoY5Ystuu7Bh4ooTo78vXzeGB0,2008
|
73
|
-
janito/cli/core/getters.py,sha256=
|
74
|
-
janito/cli/core/runner.py,sha256=
|
75
|
-
janito/cli/core/setters.py,sha256=
|
81
|
+
janito/cli/core/getters.py,sha256=Znw6aF6QUHGu6UWqQHQYu7LvNPPIjOO4SD4yyYaIGnw,1467
|
82
|
+
janito/cli/core/runner.py,sha256=SOrwRpiOC81ja_ZiN1RelaXNhquvMuu6YIOyT_iLtwg,7144
|
83
|
+
janito/cli/core/setters.py,sha256=S3PxWPh0s7DAhbNyNRspbjtbd5EdAR-JNRe6X4jjIjE,7438
|
76
84
|
janito/cli/core/unsetters.py,sha256=FEw9gCt0vRvoCt0kRSNfVB2tzi_TqppJIx2nHPP59-k,2012
|
77
85
|
janito/cli/single_shot_mode/__init__.py,sha256=Ct99pKe9tINzVW6oedZJfzfZQKWpXz-weSSCn0hrwHY,115
|
78
|
-
janito/cli/single_shot_mode/handler.py,sha256=
|
79
|
-
janito/drivers/
|
86
|
+
janito/cli/single_shot_mode/handler.py,sha256=RtmkJVvF1j8FS7_HSlnuldUj2BzTf63rwGQ0KKhe4dU,3704
|
87
|
+
janito/drivers/dashscope.bak.zip,sha256=9Pv4Xyciju8jO1lEMFVgYXexoZkxmDO3Ig6vw3ODfL8,4936
|
88
|
+
janito/drivers/driver_registry.py,sha256=5ywB2CoNLsKB5D9ODVGVTCThbtskoUH_BvuRlHkK5Ew,890
|
89
|
+
janito/drivers/openai_responses.bak.zip,sha256=E43eDCHGa2tCtdjzj_pMnWDdnsOZzj8BJTR5tJp8wcM,13352
|
80
90
|
janito/drivers/anthropic/driver.py,sha256=4yLaf2T0g2zr-MSwXOx32s7ETut9FOl0uXyJGYiJzZU,3937
|
81
91
|
janito/drivers/azure_openai/driver.py,sha256=zQc9xH-RD409okDCfTRwb1QXXb9WzR2bsBfRyrZ5HYc,3936
|
82
92
|
janito/drivers/mistralai/driver.py,sha256=r7iMMAG5V7OmzrtQhVCuK3ueAEzgbgS1qcPDKHTNKoo,1208
|
93
|
+
janito/drivers/openai/README.md,sha256=bgPdaYX0pyotCoJ9t3cJbYM-teQ_YM1DAFEKLCMP32Q,666
|
83
94
|
janito/drivers/openai/driver.py,sha256=50Ic_w6HR7xqp2rZ9RYM4Ylbhn4MKAuhyRNTHYozhVQ,21812
|
84
95
|
janito/event_bus/__init__.py,sha256=VG6GOhKMBh0O_92D-zW8a3YitJPKDajGgPiFezTXlNE,77
|
85
96
|
janito/event_bus/bus.py,sha256=LokZbAdwcWhWOyKSp7H3Ism57x4EZhxlRPjl3NE4UKU,2847
|
86
|
-
janito/event_bus/event.py,sha256=
|
97
|
+
janito/event_bus/event.py,sha256=MtgcBPD7cvCuubiLIyo-BWcsNSO-941HLk6bScHTJtQ,427
|
87
98
|
janito/event_bus/handler.py,sha256=RhBtT1E48VEM2-k8u3HYsESw7VX5qAgiB8ZTJeKXhHc,1322
|
88
99
|
janito/event_bus/queue_bus.py,sha256=l4phun3pxXxi8ZlIq8ChYaiYDVO1PZeXoOzyi3vyu20,1558
|
89
100
|
janito/i18n/__init__.py,sha256=6zCIu6pSQpoMJvIRK9oOD3pkzbNeJik3lFDXse0X6ag,994
|
90
101
|
janito/i18n/messages.py,sha256=fBuwOTFoygyHPkYphm6Y0r1iE8497Z4iryVAmPhMEkg,1851
|
91
|
-
janito/i18n/pt.py,sha256=
|
102
|
+
janito/i18n/pt.py,sha256=NlTgpDSftUfFG7FGbs7TK54vQlJVMyaZDHGcWjelwMc,4168
|
103
|
+
janito/llm/README.md,sha256=6GRqCu_a9va5HCB1YqNqbshyWKFyAGlnXugrjom-xj8,1213
|
92
104
|
janito/llm/__init__.py,sha256=dpyVH51qVRCw-PDyAFLAxq0zd4jl5MDcuV6Cri0D-dQ,134
|
93
|
-
janito/llm/agent.py,sha256=
|
94
|
-
janito/llm/auth.py,sha256=
|
95
|
-
janito/llm/driver.py,sha256=
|
105
|
+
janito/llm/agent.py,sha256=mHQhKspA1WH0xLLQwqbqUNlISiOhF60gufVkr6p6m5c,21254
|
106
|
+
janito/llm/auth.py,sha256=8Dl_orUEPhn2X6XjkO2Nr-j1HFT2YDxk1qJl9hSFI88,2286
|
107
|
+
janito/llm/driver.py,sha256=mepQ00QK0ouK8LHz4blQctUTolzlDatXNWWQEmSdpO8,10037
|
96
108
|
janito/llm/driver_config.py,sha256=OW0ae49EfgKDqaThuDjZBiaN78voNzwiZ6szERMqJos,1406
|
97
109
|
janito/llm/driver_config_builder.py,sha256=BvWGx7vaBR5NyvPY1XNAP3lAgo1uf-T25CSsIo2kkCU,1401
|
98
110
|
janito/llm/driver_input.py,sha256=Zq7IO4KdQPUraeIo6XoOaRy1IdQAyYY15RQw4JU30uA,389
|
99
111
|
janito/llm/message_parts.py,sha256=QY_0kDjaxdoErDgKPRPv1dNkkYJuXIBmHWNLiOEKAH4,1365
|
100
112
|
janito/llm/model.py,sha256=42hjcffZDTuzjAJoVhDcDqwIXm6rUmmi5UwTOYopf5w,1131
|
101
113
|
janito/llm/provider.py,sha256=lfIJnh06F0kf8--Pg_W7ALhkbIzn7N4iItQ93pntyuM,7978
|
102
|
-
janito/providers/__init__.py,sha256=
|
103
|
-
janito/providers/
|
104
|
-
janito/providers/
|
114
|
+
janito/providers/__init__.py,sha256=AY_mYBUuPP85TTIrx0-lMwbf8-biTLaCo_mZQBy0sck,282
|
115
|
+
janito/providers/dashscope.bak.zip,sha256=BwXxRmZreEivvRtmqbr5BR62IFVlNjAf4y6DrF2BVJo,5998
|
116
|
+
janito/providers/provider_static_info.py,sha256=CaidrKP062WrYAej27wIbSPK426t2iuufIUTNd6Sjug,497
|
117
|
+
janito/providers/registry.py,sha256=Ygwv9eVrTXOKhv0EKxSWQXO5WMHvajWE2Q_Lc3p7dKo,730
|
105
118
|
janito/providers/anthropic/model_info.py,sha256=saofXNs73WhlAhm58AcIkSem7C8FMUgHP19BvkoLV5Y,641
|
106
119
|
janito/providers/anthropic/provider.py,sha256=JW7PSGf7RNQWDMpf55DnnfP1oWU3d98koaz4AHjWtrQ,2509
|
107
|
-
janito/providers/azure_openai/model_info.py,sha256=
|
120
|
+
janito/providers/azure_openai/model_info.py,sha256=TMSqEpQROIIYUGAyulYJ5xGhj7CbLoaKL_JXeLbXaG0,689
|
108
121
|
janito/providers/azure_openai/provider.py,sha256=7RtYYjKa4HYi11XSiB4QQI2czzvpQ2btOWn7i-sHS8g,5154
|
109
122
|
janito/providers/deepseek/__init__.py,sha256=4sISEpq4bJO29vxFK9cfnO-SRUmKoD7oSdeCvz0hVno,36
|
110
123
|
janito/providers/deepseek/model_info.py,sha256=tAlFRtWiyNF_MKZ1gy5_-VNlvqoIwAinv6bAv9dNFsc,465
|
@@ -118,52 +131,56 @@ janito/providers/openai/__init__.py,sha256=f0m16-sIqScjL9Mp4A0CQBZx6H3PTEy0cnE08
|
|
118
131
|
janito/providers/openai/model_info.py,sha256=cz08O26Ychm-aP3T8guJRqpR96Im9Cwtgl2iMgM7tJs,3384
|
119
132
|
janito/providers/openai/provider.py,sha256=5jYdakoWywkeIzFk-LxjRhsLONRjLQ8fMYiP6lyZpJo,4809
|
120
133
|
janito/providers/openai/schema_generator.py,sha256=hTqeLcPTR8jeKn5DUUpo7b-EZ-V-g1WwXiX7MbHnFzE,2234
|
121
|
-
janito/
|
122
|
-
janito/tools/
|
134
|
+
janito/tools/DOCSTRING_STANDARD.txt,sha256=VLPwNgjxRVD_xZSSVvUZ4H-4bBwM-VKh_RyfzYQsYSs,1735
|
135
|
+
janito/tools/README.md,sha256=5HkLpF5k4PENJER7SlDPRXj0yo9mpHvAHW4uuzhq4ak,115
|
136
|
+
janito/tools/__init__.py,sha256=-hiAfmntq3uVgvLip8hwvsVifj8JoLlmIds4xVt43PM,1167
|
123
137
|
janito/tools/inspect_registry.py,sha256=Jo7PrMPRKLuR-j_mBAk9PBcTzeJf1eQrS1ChGofgQk0,538
|
124
|
-
janito/tools/
|
138
|
+
janito/tools/outline_file.bak.zip,sha256=EeI2cBXCwTdWVgJDNiroxKeYlkjwo6NLKeXz3J-2iZI,15607
|
139
|
+
janito/tools/permissions.py,sha256=8lsfT7L6pyuvjZAgIXX5WrZZYSjZXPWUBpW7LXDBJ6M,1496
|
140
|
+
janito/tools/permissions_parse.py,sha256=OY_Uojjg_QCp6UsfVk5iHhrKRbeFgzfm8UUIoYDe18I,382
|
141
|
+
janito/tools/tool_base.py,sha256=-yzl7Kki8eNlyyU-Z83ReXR-iJ0RkHpD6uksLYneyoE,3629
|
125
142
|
janito/tools/tool_events.py,sha256=czRtC2TYakAySBZvfHS_Q6_NY_7_krxzAzAL1ggRFWA,1527
|
126
143
|
janito/tools/tool_run_exception.py,sha256=43yWgTaGBGEtRteo6FvTrane6fEVGo9FU1uOdjMRWJE,525
|
127
144
|
janito/tools/tool_use_tracker.py,sha256=koXi1h-si8IpRFUdMaj6h6buxeYsuEDC4geP_f2xPms,2805
|
128
|
-
janito/tools/tool_utils.py,sha256=
|
129
|
-
janito/tools/tools_adapter.py,sha256=
|
145
|
+
janito/tools/tool_utils.py,sha256=37jCQe3TuXoiI0411-vBg_CgK-p1Wl4pTTGhLfVXbZY,1223
|
146
|
+
janito/tools/tools_adapter.py,sha256=aIRZ0XfU398ee3Xj2kvaYgPx3a78MA4lQwtREspN5WY,11795
|
130
147
|
janito/tools/tools_schema.py,sha256=rGrKrmpPNR07VXHAJ_haGBRRO-YGLOF51BlYRep9AAQ,4415
|
131
148
|
janito/tools/adapters/__init__.py,sha256=XKixOKtUJs1R-rGwGDXSLVLg5-Kp090gvWbsseWT4LI,92
|
132
|
-
janito/tools/adapters/local/__init__.py,sha256=
|
133
|
-
janito/tools/adapters/local/adapter.py,sha256=
|
134
|
-
janito/tools/adapters/local/ask_user.py,sha256=
|
135
|
-
janito/tools/adapters/local/copy_file.py,sha256=
|
136
|
-
janito/tools/adapters/local/create_directory.py,sha256=
|
137
|
-
janito/tools/adapters/local/create_file.py,sha256=
|
138
|
-
janito/tools/adapters/local/delete_text_in_file.py,sha256=
|
139
|
-
janito/tools/adapters/local/fetch_url.py,sha256=
|
140
|
-
janito/tools/adapters/local/find_files.py,sha256=
|
141
|
-
janito/tools/adapters/local/move_file.py,sha256=
|
142
|
-
janito/tools/adapters/local/open_html_in_browser.py,sha256=
|
143
|
-
janito/tools/adapters/local/open_url.py,sha256=
|
144
|
-
janito/tools/adapters/local/python_code_run.py,sha256=
|
145
|
-
janito/tools/adapters/local/python_command_run.py,sha256=
|
146
|
-
janito/tools/adapters/local/python_file_run.py,sha256=
|
147
|
-
janito/tools/adapters/local/remove_directory.py,sha256=
|
148
|
-
janito/tools/adapters/local/remove_file.py,sha256=
|
149
|
-
janito/tools/adapters/local/replace_text_in_file.py,sha256=
|
150
|
-
janito/tools/adapters/local/run_bash_command.py,sha256=
|
151
|
-
janito/tools/adapters/local/run_powershell_command.py,sha256=
|
152
|
-
janito/tools/adapters/local/view_file.py,sha256=
|
149
|
+
janito/tools/adapters/local/__init__.py,sha256=e9z4otmv5PPJQtMpXjIravXUAHPsQxL3nH4DTlDAi30,2126
|
150
|
+
janito/tools/adapters/local/adapter.py,sha256=YJGXtie8GemmlQbVfB-DX8v-Z8U92DvXJZNYQrSQPVE,3909
|
151
|
+
janito/tools/adapters/local/ask_user.py,sha256=9aR7gwRdrSQGXR8mvuo5x_8SKNk2Ep7GwUDv3latyac,3598
|
152
|
+
janito/tools/adapters/local/copy_file.py,sha256=I2GAMxy55w-fZwNUde_paUD2kof7Szgk9uNoDOW_TDA,3580
|
153
|
+
janito/tools/adapters/local/create_directory.py,sha256=cLWz_o8TIkcXTD9rE_kRsXTkyeFvTjo0uXBHdoXMqMk,2613
|
154
|
+
janito/tools/adapters/local/create_file.py,sha256=wVxe3TJ__j_FLSbtokoq21U22hXrOIty1pIIe5-CtXM,3525
|
155
|
+
janito/tools/adapters/local/delete_text_in_file.py,sha256=nt2P7cStgzbjlKcYAVlNR1B4KNJJhHoGBMekPbXKKT8,5174
|
156
|
+
janito/tools/adapters/local/fetch_url.py,sha256=1nVM1DWPS7FKV20CwtzyyJF8tFupSZ6rV-xjHtLd2co,3867
|
157
|
+
janito/tools/adapters/local/find_files.py,sha256=em748_QiwdyT5pF1Bu0VGZQ_khTv3Mv7Maxp4lRK0vI,6027
|
158
|
+
janito/tools/adapters/local/move_file.py,sha256=FktO0bvk9OsztVM1BnR-1Q3rbDbhEezDsPOzzpADNaI,4614
|
159
|
+
janito/tools/adapters/local/open_html_in_browser.py,sha256=Xf37F12eQVScZa8AbX00-sxWVX5a14baSR6TxfcZuiI,1988
|
160
|
+
janito/tools/adapters/local/open_url.py,sha256=FOLxRu-41oq_1PG6hPn3-aX-ZbobVlofCHbtq5XuXoo,1400
|
161
|
+
janito/tools/adapters/local/python_code_run.py,sha256=R_Pmq2iU9C5teUigtT8n8ImutGMAzzSGF1-Hd26HyTQ,6679
|
162
|
+
janito/tools/adapters/local/python_command_run.py,sha256=Guk68Z1N_T_8N4GavPYxJsX0431P05iMfDPtqH3eCZM,6619
|
163
|
+
janito/tools/adapters/local/python_file_run.py,sha256=nILHer_kRuulBTBtWTN_yiNTeCpYalpDKpKlHbs78cU,6494
|
164
|
+
janito/tools/adapters/local/remove_directory.py,sha256=jlGKKhR9sWDLD7MYO3P6kl9rZhlhq6kcZ_mn8UPvTOk,1853
|
165
|
+
janito/tools/adapters/local/remove_file.py,sha256=4f20Fq5hMEVRWLc50TpL_eGWU5a4jMYw5oNSXjOKIBc,2113
|
166
|
+
janito/tools/adapters/local/replace_text_in_file.py,sha256=NcsJy9a9yFLtVYJmBXP2iq5bsxvMyz4LWYLa55ikxJo,10887
|
167
|
+
janito/tools/adapters/local/run_bash_command.py,sha256=5ZUxWoeB2__Q_05juaMbD6mT-PTs1LnVYlkM-_fr6cQ,7620
|
168
|
+
janito/tools/adapters/local/run_powershell_command.py,sha256=Kt2mHFdrMAPzB7mSydGB1IAXHSYMrn2oWtDecuACc3k,9258
|
169
|
+
janito/tools/adapters/local/view_file.py,sha256=9wXgAgTJf7rGzmMfPFSMmHoX32JBgseYNHEe963KQB8,7197
|
153
170
|
janito/tools/adapters/local/get_file_outline/__init__.py,sha256=OKV_BHnoD9h-vkcVoW6AHmsuDjjauHPCKNK0nVFl4sU,37
|
154
|
-
janito/tools/adapters/local/get_file_outline/core.py,sha256=
|
171
|
+
janito/tools/adapters/local/get_file_outline/core.py,sha256=irLsmSuwP87KwTEjSBXedh67XKSZckGyTosePtyrp9g,4396
|
155
172
|
janito/tools/adapters/local/get_file_outline/java_outline.py,sha256=5xCX7zMOpTljwNTxKmc4ewTnCykCOC9TDd62gZzP_BU,1685
|
156
173
|
janito/tools/adapters/local/get_file_outline/markdown_outline.py,sha256=bXEBg0D93tEBDNy8t-wh4i7WxsxfpQ2C3dX1_rmtj08,434
|
157
174
|
janito/tools/adapters/local/get_file_outline/python_outline.py,sha256=RAcf9Vxec08lA06drYaNre5HCJ2lTzrRAskZ3rlyE-U,10326
|
158
175
|
janito/tools/adapters/local/get_file_outline/python_outline_v2.py,sha256=OOHKDGbOwxiCtr3i5m5ZAnELvoF12fKdzO2RCDuTsCs,5453
|
159
|
-
janito/tools/adapters/local/get_file_outline/search_outline.py,sha256=
|
176
|
+
janito/tools/adapters/local/get_file_outline/search_outline.py,sha256=s5S1eMBvqW30lPoScza3bDxENiJY4C0akrGjGN12HpY,1225
|
160
177
|
janito/tools/adapters/local/search_text/__init__.py,sha256=FEYpF5tTtf0fiAyRGIGSn-kV-MJDkhdFIbus16mYW8Y,34
|
161
|
-
janito/tools/adapters/local/search_text/core.py,sha256=
|
178
|
+
janito/tools/adapters/local/search_text/core.py,sha256=xuaZstYmLp0rhXoNpNFItoshd-dc_9nFP5pFSEm2cvI,7701
|
162
179
|
janito/tools/adapters/local/search_text/match_lines.py,sha256=2l0r8_1l5gnmu9vJSdkxu0JwbPNHx7m84Ei2s4V0hcQ,2141
|
163
180
|
janito/tools/adapters/local/search_text/pattern_utils.py,sha256=Cytwl7M9tNY-IsAmvoMgvlQMPswbCHTVrX8aZQ6IBJc,2374
|
164
181
|
janito/tools/adapters/local/search_text/traverse_directory.py,sha256=TrsAlFXcG7WdtZS6pg3_6vlL3h-afps5u7kkBDhA65c,4064
|
165
182
|
janito/tools/adapters/local/validate_file_syntax/__init__.py,sha256=P53RHmas4BbHL90cMxH9m-RpMCJI8JquoJb0rpkPVVk,29
|
166
|
-
janito/tools/adapters/local/validate_file_syntax/core.py,sha256=
|
183
|
+
janito/tools/adapters/local/validate_file_syntax/core.py,sha256=Gqrvx0hPFnuzg0kQbLT-Z6ftF84Tkqq7o2c4CJDU4M8,3369
|
167
184
|
janito/tools/adapters/local/validate_file_syntax/css_validator.py,sha256=2yUMNxVIQy3AhuiahyZZbci0azMHkSWlGBbYIxJNJ-U,1361
|
168
185
|
janito/tools/adapters/local/validate_file_syntax/html_validator.py,sha256=sCIGBx-b-xz-vbz6pQM0rYYuzrt93_9ApC5zQ9Rwadk,3064
|
169
186
|
janito/tools/adapters/local/validate_file_syntax/js_validator.py,sha256=Km-wUrG0YZJ7kzxxyVPN_vXqOWIdfD12GkhQHPRVrC8,1008
|
@@ -173,9 +190,9 @@ janito/tools/adapters/local/validate_file_syntax/ps1_validator.py,sha256=cP1jsMh
|
|
173
190
|
janito/tools/adapters/local/validate_file_syntax/python_validator.py,sha256=lHzjlA4g9nCF9hXkGx3izWF0b0vJH3yV7Pu3buLyBbI,140
|
174
191
|
janito/tools/adapters/local/validate_file_syntax/xml_validator.py,sha256=3CK7BEGO7gKI3bpeTtCFe0kJ5aKDZVh3Kh67bGIhcuc,294
|
175
192
|
janito/tools/adapters/local/validate_file_syntax/yaml_validator.py,sha256=XLmOp7Ef6pLd97ICVnF3PxNKL1Yo5tLZsasvxPY478Y,165
|
176
|
-
janito-2.
|
177
|
-
janito-2.
|
178
|
-
janito-2.
|
179
|
-
janito-2.
|
180
|
-
janito-2.
|
181
|
-
janito-2.
|
193
|
+
janito-2.5.0.dist-info/licenses/LICENSE,sha256=GSAKapQH5ZIGWlpQTA7v5YrfECyaxaohUb1vJX-qepw,1090
|
194
|
+
janito-2.5.0.dist-info/METADATA,sha256=WqfY2ffIWvjuk6WAdM70c_dZYUcQCXjNgm6VChozTeE,16364
|
195
|
+
janito-2.5.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
196
|
+
janito-2.5.0.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
|
197
|
+
janito-2.5.0.dist-info/top_level.txt,sha256=m0NaVCq0-ivxbazE2-ND0EA9Hmuijj_OGkmCbnBcCig,7
|
198
|
+
janito-2.5.0.dist-info/RECORD,,
|
@@ -1,13 +0,0 @@
|
|
1
|
-
Você está atuando como: {{ role }}
|
2
|
-
|
3
|
-
Você tem acesso, para fins de desenvolvimento, ao seguinte ambiente:
|
4
|
-
Plataforma: {{ platform }}
|
5
|
-
Versão do Python: {{ python_version }}
|
6
|
-
Shell/Ambiente: {{ shell_info }}
|
7
|
-
|
8
|
-
Responda seguindo estas diretrizes:
|
9
|
-
- Antes de usar suas funções de namespace, forneça uma explicação concisa.
|
10
|
-
- Na primeira mensagem faça uma pesquisa no projeto.
|
11
|
-
- Prefira fazer edições localizadas usando substituições de string. Se a alteração necessária for extensa, substitua o arquivo inteiro.
|
12
|
-
- Ao localizar linhas de código para alterar, consider o conteúdo das linhas anteriores para uma substituição precisa de indentação.
|
13
|
-
- Após editar arquivos, valide-os.
|
@@ -1,37 +0,0 @@
|
|
1
|
-
{# General role setup
|
2
|
-
ex. "Search in code" -> Python Developer -> find(*.py) | Java Developer -> find(*.java)
|
3
|
-
#}
|
4
|
-
You are: {{ role }}
|
5
|
-
|
6
|
-
You will answer following a pattern of: discovery, description, implementation (when a change is requested) and validation.
|
7
|
-
|
8
|
-
{# Improves tool selection and platform specific constrains, eg, path format, C:\ vs /path #}
|
9
|
-
{% if exec_enabled %}
|
10
|
-
You will be using the following environment:
|
11
|
-
Platform: {{ platform }}
|
12
|
-
Python version: {{ python_version }}
|
13
|
-
Shell/Environment: {{ shell_info }}
|
14
|
-
{% endif %}
|
15
|
-
|
16
|
-
Before answering map the questions to artifacts found in the current directory - the current project.
|
17
|
-
|
18
|
-
Respond according to the following guidelines:
|
19
|
-
{# Exploratory hint #}
|
20
|
-
- Before answering to the user, explore the content related to the question
|
21
|
-
{# Define exploration order, prefers search/outline, reduces chunking roundtip #}
|
22
|
-
- When exploring full files content, provide empty range to read the entire files instead of chunked reads
|
23
|
-
{# Prefix tools with purpose for user awarnesses #}
|
24
|
-
- Before using your namespace functions, provide a concise explanation.
|
25
|
-
{# Reduce unrequest code verbosity overhead #}
|
26
|
-
- Use the namespace functions to deliver the code changes instead of showing the code.
|
27
|
-
{# Drive edit mode, place holders critical as shown to be crucial to avoid corruption with code placeholders #}
|
28
|
-
- Prefer making localized edits using string replacements. If the required change is extensive, replace the entire file instead, provide full content without placeholders.
|
29
|
-
{# Trying to prevent surrogates generation, found this frequently in gpt4.1/windows #}
|
30
|
-
- 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.
|
31
|
-
{# Without this, the LLM choses to create files from a literal interpretation of the purpose and intention #}
|
32
|
-
- Before creating files search the code for the location related to the file purpose
|
33
|
-
{# This will trigger a search for the old names/locations to be updates #}
|
34
|
-
- 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.
|
35
|
-
{# Keeping docstrings update is key to have semanatic match between prompts and code #}
|
36
|
-
- Once development or updates are finished, ensure that new or updated packages, modules, functions are properly documented.
|
37
|
-
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
import webbrowser
|
3
|
-
from janito.cli.console import shared_console
|
4
|
-
from janito.cli.chat_mode.shell.commands.base import ShellCmdHandler
|
5
|
-
|
6
|
-
|
7
|
-
class EditShellHandler(ShellCmdHandler):
|
8
|
-
help_text = "Open a file in the browser-based editor"
|
9
|
-
|
10
|
-
def run(self):
|
11
|
-
filename = self.after_cmd_line.strip()
|
12
|
-
if not filename:
|
13
|
-
shared_console.print("[red]Usage: /edit <filename>[/red]")
|
14
|
-
return
|
15
|
-
if not os.path.isfile(filename):
|
16
|
-
shared_console.print(f"[red]File not found:[/red] {filename}")
|
17
|
-
return
|
18
|
-
from janito.cli.config import get_termweb_port
|
19
|
-
|
20
|
-
port = get_termweb_port()
|
21
|
-
url = f"http://localhost:{port}/?path={filename}"
|
22
|
-
shared_console.print(
|
23
|
-
f"[green]Opening in browser:[/green] [underline blue]{url}[/underline blue]"
|
24
|
-
)
|
25
|
-
webbrowser.open(url)
|
@@ -1,27 +0,0 @@
|
|
1
|
-
from janito.cli.console import shared_console
|
2
|
-
from janito.cli.chat_mode.shell.commands.base import ShellCmdHandler
|
3
|
-
|
4
|
-
class ExecShellHandler(ShellCmdHandler):
|
5
|
-
help_text = "/exec on|off: Enable or disable code and command execution tools. Usage: /exec on or /exec off."
|
6
|
-
|
7
|
-
def run(self):
|
8
|
-
if not self.shell_state:
|
9
|
-
shared_console.print("[red]Shell state unavailable.[/red]")
|
10
|
-
return
|
11
|
-
arg = (self.after_cmd_line or "").strip().lower()
|
12
|
-
if arg not in ("on", "off"):
|
13
|
-
shared_console.print("[yellow]Usage: /exec on|off[/yellow]")
|
14
|
-
return
|
15
|
-
enable = arg == "on"
|
16
|
-
self.shell_state.allow_execution = enable
|
17
|
-
# Dynamically enable/disable execution tools in the registry
|
18
|
-
try:
|
19
|
-
registry = __import__('janito.tools', fromlist=['get_local_tools_adapter']).get_local_tools_adapter()
|
20
|
-
if hasattr(registry, 'set_execution_tools_enabled'):
|
21
|
-
registry.set_execution_tools_enabled(enable)
|
22
|
-
except Exception as e:
|
23
|
-
shared_console.print(f"[yellow]Warning: Could not update execution tools dynamically: {e}[/yellow]")
|
24
|
-
if enable:
|
25
|
-
shared_console.print("[green]Execution tools ENABLED. You can now use code and command execution tools.[/green]")
|
26
|
-
else:
|
27
|
-
shared_console.print("[yellow]Execution tools DISABLED. Code and command execution tools are now blocked.[/yellow]")
|
@@ -1,92 +0,0 @@
|
|
1
|
-
import http.client
|
2
|
-
from rich.console import Console
|
3
|
-
from janito.cli.config import config
|
4
|
-
from janito.cli.console import shared_console
|
5
|
-
from janito.cli.chat_mode.shell.commands.base import ShellCmdHandler
|
6
|
-
|
7
|
-
|
8
|
-
class TermwebLogTailShellHandler(ShellCmdHandler):
|
9
|
-
help_text = "Show the last lines of the latest termweb logs"
|
10
|
-
|
11
|
-
def run(self):
|
12
|
-
lines = 20
|
13
|
-
args = self.after_cmd_line.strip().split()
|
14
|
-
if args and args[0].isdigit():
|
15
|
-
lines = int(args[0])
|
16
|
-
stdout_path = self.shell_state.termweb_stdout_path if self.shell_state else None
|
17
|
-
stderr_path = self.shell_state.termweb_stderr_path if self.shell_state else None
|
18
|
-
status = getattr(self.shell_state, "termweb_status", None)
|
19
|
-
live_status = getattr(self.shell_state, "termweb_live_status", None)
|
20
|
-
status_checked = getattr(self.shell_state, "termweb_live_checked_time", None)
|
21
|
-
shared_console.print(
|
22
|
-
f"[bold cyan][termweb] Current run status: {status} | Last health check: {live_status} at {status_checked}"
|
23
|
-
)
|
24
|
-
if not stdout_path and not stderr_path:
|
25
|
-
shared_console.print(
|
26
|
-
"[yellow][termweb] No termweb log files found for this session.[/yellow]"
|
27
|
-
)
|
28
|
-
return
|
29
|
-
stdout_lines = stderr_lines = None
|
30
|
-
if stdout_path:
|
31
|
-
try:
|
32
|
-
with open(stdout_path, encoding="utf-8") as f:
|
33
|
-
stdout_lines = f.readlines()[-lines:]
|
34
|
-
if stdout_lines:
|
35
|
-
shared_console.print(
|
36
|
-
f"[yellow][termweb][stdout] Tail of {stdout_path}:\n"
|
37
|
-
+ "".join(stdout_lines)
|
38
|
-
)
|
39
|
-
except Exception:
|
40
|
-
pass
|
41
|
-
if stderr_path:
|
42
|
-
try:
|
43
|
-
with open(stderr_path, encoding="utf-8") as f:
|
44
|
-
stderr_lines = f.readlines()[-lines:]
|
45
|
-
if stderr_lines:
|
46
|
-
shared_console.print(
|
47
|
-
f"[red][termweb][stderr] Tail of {stderr_path}:\n"
|
48
|
-
+ "".join(stderr_lines)
|
49
|
-
)
|
50
|
-
except Exception:
|
51
|
-
pass
|
52
|
-
if (not stdout_path or not stdout_lines) and (
|
53
|
-
not stderr_path or not stderr_lines
|
54
|
-
):
|
55
|
-
shared_console.print("[termweb] No output or errors captured in logs.")
|
56
|
-
|
57
|
-
|
58
|
-
def handle_termweb_status(*args, shell_state=None, **kwargs):
|
59
|
-
if shell_state is None:
|
60
|
-
console.print(
|
61
|
-
"[red]No shell state available. Cannot determine termweb status.[/red]"
|
62
|
-
)
|
63
|
-
return
|
64
|
-
from janito.cli.config import get_termweb_port
|
65
|
-
|
66
|
-
port = get_termweb_port()
|
67
|
-
port_source = "config"
|
68
|
-
pid = getattr(shell_state, "termweb_pid", None)
|
69
|
-
stdout_path = getattr(shell_state, "termweb_stdout_path", None)
|
70
|
-
stderr_path = getattr(shell_state, "termweb_stderr_path", None)
|
71
|
-
running = False
|
72
|
-
if port and hasattr(shell_state, "termweb_live_status"):
|
73
|
-
running = shell_state.termweb_live_status == "online"
|
74
|
-
console.print("[bold cyan]TermWeb Server Status:[/bold cyan]")
|
75
|
-
console.print(f" Running: {'[green]Yes[/green]' if running else '[red]No[/red]'}")
|
76
|
-
if pid:
|
77
|
-
console.print(f" PID: {pid}")
|
78
|
-
if port:
|
79
|
-
console.print(f" Port: {port} (from {port_source})")
|
80
|
-
url = f"http://localhost:{port}/"
|
81
|
-
console.print(f" URL: [underline blue]{url}[/underline blue]")
|
82
|
-
else:
|
83
|
-
console.print(" [yellow]No port configured in config.[/yellow]")
|
84
|
-
if stdout_path:
|
85
|
-
console.print(f" Stdout log: {stdout_path}")
|
86
|
-
if stderr_path:
|
87
|
-
console.print(f" Stderr log: {stderr_path}")
|
88
|
-
|
89
|
-
|
90
|
-
handle_termweb_status.help_text = (
|
91
|
-
"Show status information about the running termweb server"
|
92
|
-
)
|
janito/cli/termweb_starter.py
DELETED
@@ -1,122 +0,0 @@
|
|
1
|
-
import sys
|
2
|
-
import subprocess
|
3
|
-
import tempfile
|
4
|
-
import time
|
5
|
-
import http.client
|
6
|
-
import os
|
7
|
-
import threading
|
8
|
-
import queue
|
9
|
-
from rich.console import Console
|
10
|
-
from janito.i18n import tr
|
11
|
-
from janito.cli.config import get_termweb_port
|
12
|
-
|
13
|
-
|
14
|
-
def wait_for_termweb(port, timeout=3.0):
|
15
|
-
"""Polls the Bottle app root endpoint until it responds or timeout (seconds) is reached."""
|
16
|
-
deadline = time.time() + timeout
|
17
|
-
while time.time() < deadline:
|
18
|
-
try:
|
19
|
-
conn = http.client.HTTPConnection("localhost", port, timeout=0.5)
|
20
|
-
conn.request("GET", "/")
|
21
|
-
resp = conn.getresponse()
|
22
|
-
if resp.status == 200:
|
23
|
-
return True
|
24
|
-
except Exception:
|
25
|
-
pass
|
26
|
-
time.sleep(0.1)
|
27
|
-
return False
|
28
|
-
|
29
|
-
|
30
|
-
def termweb_start_and_watch(shell_state, shellstate_lock, selected_port=None):
|
31
|
-
"""
|
32
|
-
Start the termweb server on the given port in a background thread.
|
33
|
-
Communicates (termweb_proc, started: bool, stdout_path, stderr_path) via result_queue if provided.
|
34
|
-
Returns the Thread object.
|
35
|
-
"""
|
36
|
-
|
37
|
-
def termweb_worker(shell_state, shellstate_lock, selected_port, check_interval=2.0):
|
38
|
-
"""
|
39
|
-
Worker to start termweb process, then monitor its running state/health, and update shell_state fields in a thread-safe manner.
|
40
|
-
- shell_state: context or state object to update (must provide .termweb_pid, .termweb_status, etc.)
|
41
|
-
- shellstate_lock: a threading.Lock or similar to synchronize access
|
42
|
-
"""
|
43
|
-
console = Console()
|
44
|
-
# Try to locate app.py
|
45
|
-
app_py_path = os.path.join(os.path.dirname(__file__), "..", "termweb", "app.py")
|
46
|
-
app_py_path = os.path.abspath(app_py_path)
|
47
|
-
if not os.path.isfile(app_py_path):
|
48
|
-
try:
|
49
|
-
import janito_termweb
|
50
|
-
|
51
|
-
app_py_path = janito_termweb.__file__.replace("__init__.py", "app.py")
|
52
|
-
except ImportError:
|
53
|
-
with shellstate_lock:
|
54
|
-
shell_state.termweb_status = "notfound"
|
55
|
-
shell_state.termweb_pid = None
|
56
|
-
shell_state.termweb_stdout_path = None
|
57
|
-
shell_state.termweb_stderr_path = None
|
58
|
-
return
|
59
|
-
termweb_stdout = tempfile.NamedTemporaryFile(
|
60
|
-
delete=False, mode="w+", encoding="utf-8"
|
61
|
-
)
|
62
|
-
termweb_stderr = tempfile.NamedTemporaryFile(
|
63
|
-
delete=False, mode="w+", encoding="utf-8"
|
64
|
-
)
|
65
|
-
port_to_use = selected_port if selected_port is not None else get_termweb_port()
|
66
|
-
termweb_proc = subprocess.Popen(
|
67
|
-
[sys.executable, app_py_path, "--port", str(port_to_use)],
|
68
|
-
stdout=termweb_stdout,
|
69
|
-
stderr=termweb_stderr,
|
70
|
-
)
|
71
|
-
|
72
|
-
# Step 1: Wait for server to become healthy (initial check)
|
73
|
-
if wait_for_termweb(port_to_use, timeout=3.0):
|
74
|
-
with shellstate_lock:
|
75
|
-
shell_state.termweb_status = "running"
|
76
|
-
shell_state.termweb_pid = termweb_proc.pid
|
77
|
-
shell_state.termweb_stdout_path = termweb_stdout.name
|
78
|
-
shell_state.termweb_stderr_path = termweb_stderr.name
|
79
|
-
shell_state.termweb_port = port_to_use
|
80
|
-
else:
|
81
|
-
termweb_proc.terminate()
|
82
|
-
termweb_proc.wait()
|
83
|
-
# console.print(f"[red]Failed to start TermWeb on port {port_to_use}. Check logs for details.[/red]")
|
84
|
-
with shellstate_lock:
|
85
|
-
shell_state.termweb_status = "failed-start"
|
86
|
-
shell_state.termweb_pid = None
|
87
|
-
shell_state.termweb_stdout_path = termweb_stdout.name
|
88
|
-
shell_state.termweb_stderr_path = termweb_stderr.name
|
89
|
-
shell_state.termweb_port = None
|
90
|
-
return
|
91
|
-
|
92
|
-
# Step 2: Run watcher loop; exit and set fields if process or health fails
|
93
|
-
import time
|
94
|
-
from http.client import HTTPConnection
|
95
|
-
|
96
|
-
while True:
|
97
|
-
if termweb_proc.poll() is not None: # means process exited
|
98
|
-
with shellstate_lock:
|
99
|
-
shell_state.termweb_status = "terminated"
|
100
|
-
shell_state.termweb_pid = None
|
101
|
-
break
|
102
|
-
try:
|
103
|
-
conn = HTTPConnection("localhost", port_to_use, timeout=0.5)
|
104
|
-
conn.request("GET", "/")
|
105
|
-
resp = conn.getresponse()
|
106
|
-
if resp.status != 200:
|
107
|
-
raise Exception("Bad status")
|
108
|
-
except Exception:
|
109
|
-
# console.print(f"[red]TermWeb on port {port_to_use} appears to have stopped responding![/red]")
|
110
|
-
with shellstate_lock:
|
111
|
-
shell_state.termweb_status = "unresponsive"
|
112
|
-
break
|
113
|
-
time.sleep(check_interval)
|
114
|
-
|
115
|
-
# Launch background thread
|
116
|
-
t = threading.Thread(
|
117
|
-
target=termweb_worker,
|
118
|
-
args=(shell_state, shellstate_lock, selected_port),
|
119
|
-
daemon=True,
|
120
|
-
)
|
121
|
-
t.start()
|
122
|
-
return t
|