janito 2.5.1__py3-none-any.whl → 2.6.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 +7 -6
- janito/__main__.py +5 -4
- janito/_version.py +58 -57
- janito/agent/setup_agent.py +241 -223
- janito/agent/templates/profiles/system_prompt_template_software developer.txt.j2 +39 -0
- janito/cli/__init__.py +10 -9
- janito/cli/chat_mode/bindings.py +38 -62
- janito/cli/chat_mode/chat_entry.py +23 -22
- janito/cli/chat_mode/prompt_style.py +25 -24
- janito/cli/chat_mode/script_runner.py +154 -153
- janito/cli/chat_mode/session.py +32 -44
- janito/cli/chat_mode/session_profile_select.py +125 -55
- janito/cli/chat_mode/shell/commands/tools.py +51 -48
- janito/cli/chat_mode/toolbar.py +42 -68
- janito/cli/cli_commands/list_tools.py +41 -56
- janito/cli/cli_commands/show_system_prompt.py +70 -49
- janito/cli/core/runner.py +6 -1
- janito/cli/core/setters.py +43 -34
- janito/cli/main_cli.py +25 -1
- janito/cli/prompt_core.py +76 -69
- janito/cli/rich_terminal_reporter.py +22 -1
- janito/cli/single_shot_mode/handler.py +95 -94
- janito/drivers/driver_registry.py +27 -29
- janito/drivers/openai/driver.py +436 -494
- janito/llm/agent.py +54 -68
- janito/provider_registry.py +178 -178
- janito/providers/anthropic/model_info.py +41 -22
- janito/providers/anthropic/provider.py +80 -67
- janito/providers/provider_static_info.py +18 -17
- janito/tools/adapters/local/__init__.py +66 -65
- janito/tools/adapters/local/adapter.py +79 -18
- janito/tools/adapters/local/create_directory.py +9 -9
- janito/tools/adapters/local/create_file.py +12 -12
- janito/tools/adapters/local/delete_text_in_file.py +16 -16
- janito/tools/adapters/local/find_files.py +2 -2
- janito/tools/adapters/local/get_file_outline/core.py +5 -5
- janito/tools/adapters/local/get_file_outline/search_outline.py +4 -4
- janito/tools/adapters/local/open_html_in_browser.py +15 -15
- janito/tools/adapters/local/python_file_run.py +4 -4
- janito/tools/adapters/local/read_files.py +40 -0
- janito/tools/adapters/local/remove_directory.py +5 -5
- janito/tools/adapters/local/remove_file.py +4 -4
- janito/tools/adapters/local/replace_text_in_file.py +21 -21
- janito/tools/adapters/local/run_bash_command.py +1 -1
- janito/tools/adapters/local/search_text/pattern_utils.py +2 -2
- janito/tools/adapters/local/search_text/traverse_directory.py +10 -10
- janito/tools/adapters/local/validate_file_syntax/core.py +7 -7
- janito/tools/adapters/local/validate_file_syntax/css_validator.py +2 -2
- janito/tools/adapters/local/validate_file_syntax/html_validator.py +7 -7
- janito/tools/adapters/local/validate_file_syntax/js_validator.py +2 -2
- janito/tools/adapters/local/validate_file_syntax/json_validator.py +2 -2
- janito/tools/adapters/local/validate_file_syntax/markdown_validator.py +2 -2
- janito/tools/adapters/local/validate_file_syntax/ps1_validator.py +2 -2
- janito/tools/adapters/local/validate_file_syntax/python_validator.py +2 -2
- janito/tools/adapters/local/validate_file_syntax/xml_validator.py +2 -2
- janito/tools/adapters/local/validate_file_syntax/yaml_validator.py +2 -2
- janito/tools/adapters/local/view_file.py +12 -12
- janito/tools/path_security.py +204 -0
- janito/tools/tool_use_tracker.py +12 -12
- janito/tools/tools_adapter.py +66 -34
- {janito-2.5.1.dist-info → janito-2.6.1.dist-info}/METADATA +417 -412
- {janito-2.5.1.dist-info → janito-2.6.1.dist-info}/RECORD +66 -65
- janito/drivers/anthropic/driver.py +0 -113
- janito/tools/adapters/local/get_file_outline/python_outline_v2.py +0 -156
- {janito-2.5.1.dist-info → janito-2.6.1.dist-info}/WHEEL +0 -0
- {janito-2.5.1.dist-info → janito-2.6.1.dist-info}/entry_points.txt +0 -0
- {janito-2.5.1.dist-info → janito-2.6.1.dist-info}/licenses/LICENSE +0 -0
- {janito-2.5.1.dist-info → janito-2.6.1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
janito/__init__.py,sha256=
|
2
|
-
janito/__main__.py,sha256=
|
3
|
-
janito/_version.py,sha256=
|
1
|
+
janito/__init__.py,sha256=d9Pxq6WdBj7zNpinWuHoQFur8fiDwoxoJ7WlX8M_WYA,239
|
2
|
+
janito/__main__.py,sha256=i2S7BQWtS7W_KkZHsjfxdf64xyg5yd6_9yslf_gePyE,67
|
3
|
+
janito/_version.py,sha256=88QQFIBL2uFzp1JUeigjP84Vqjtk1-l0YeGyCP4z-_8,2292
|
4
4
|
janito/config.py,sha256=HJh0CmZEx7AbMQOmFkiYHFNzc-fO7fqpZ9rh6RenxK8,201
|
5
5
|
janito/config_manager.py,sha256=-v28Rybh0KUXU8dZF-ozqHWXn7djAyYxSrJEwXOC7TQ,5047
|
6
6
|
janito/conversation_history.py,sha256=GqqEJElTVONzOMRe-9g25WCMcDi0PF7DOnqGWLTrY_8,897
|
@@ -14,31 +14,32 @@ janito/perf_singleton.py,sha256=g1h0Sdf4ydzegeEpJlMhQt4H0GQZ2hryXrdYOTL-b30,113
|
|
14
14
|
janito/performance_collector.py,sha256=RYu4av16Trj3RljJZ8-2Gbn1KlGdJUosrcVFYtwviNI,6285
|
15
15
|
janito/platform_discovery.py,sha256=JN3kC7hkxdvuj-AyrJTlbbDJjtNHke3fdlZDqGi_uz0,4621
|
16
16
|
janito/provider_config.py,sha256=acn2FEgWsEIyi2AxZiuCLoP2rXDd-nXcP5VB4CZHaeE,3189
|
17
|
-
janito/provider_registry.py,sha256=
|
17
|
+
janito/provider_registry.py,sha256=Fqx-1C1If9pVH-cM-aZRPNFNtv2KyjrMQ8rf3fmgLMU,7662
|
18
18
|
janito/report_events.py,sha256=q4OR_jTZNfcqaQF_fzTjgqo6_VlUIxSGWfhpT4nJWcw,938
|
19
19
|
janito/shell.bak.zip,sha256=hznHbmgfkAkjuQDJ3w73XPQh05yrtUZQxLmtGbanbYU,22
|
20
20
|
janito/utils.py,sha256=eXSsMgM69YyzahgCNrJQLcEbB8ssLI1MQqaa20ONxbE,376
|
21
|
-
janito/agent/setup_agent.py,sha256=
|
21
|
+
janito/agent/setup_agent.py,sha256=hfeEaVo0x0IHL9lMR0har8OClXTKdv2w7Lq19E9NL1s,8634
|
22
22
|
janito/agent/templates/profiles/system_prompt_template_assistant.txt.j2,sha256=dTV9aF8ji2r9dzi-l4b9r95kHrbKmjvnRxk5cVpopN4,28
|
23
23
|
janito/agent/templates/profiles/system_prompt_template_developer.txt.j2,sha256=gIXF3dPgGxQnVqRBnT8r2sUGu7F_Sl0F4YF-TfyOKgI,2586
|
24
|
-
janito/
|
24
|
+
janito/agent/templates/profiles/system_prompt_template_software developer.txt.j2,sha256=BGo15WSeOd1rAy0xDRKtQJvVey7FLftoLjY3aNdnZJU,2394
|
25
|
+
janito/cli/__init__.py,sha256=R2scfqFNqllvKMQw8Mh77bd_RgABy-EHyMdYX_Yidno,186
|
25
26
|
janito/cli/config.py,sha256=t7sdM0I3RD_FZ2ni1xuGMFGzvCLMt3NwJKu3_WtxPUg,1068
|
26
27
|
janito/cli/console.py,sha256=gJolqzWL7jEPLxeuH-CwBDRFpXt976KdZOEAB2tdBDs,64
|
27
28
|
janito/cli/main.py,sha256=s5odou0txf8pzTf1ADk2yV7T5m8B6cejJ81e7iu776U,312
|
28
|
-
janito/cli/main_cli.py,sha256=
|
29
|
-
janito/cli/prompt_core.py,sha256=
|
29
|
+
janito/cli/main_cli.py,sha256=KKpFTugOJLk6n3kXy_-HfJji1M5-XRV3hViVespunog,12998
|
30
|
+
janito/cli/prompt_core.py,sha256=sZC_mpIKv2cRHhUdwZr6MCQc-AeYUewJ7RWizyv3stU,11678
|
30
31
|
janito/cli/prompt_handler.py,sha256=SnPTlL64noeAMGlI08VBDD5IDD8jlVMIYA4-fS8zVLg,215
|
31
32
|
janito/cli/prompt_setup.py,sha256=PoRXIWEoVJ5DQtOLO0JCz_8cVVWp7zhKXQtXJuRGiQ4,1882
|
32
|
-
janito/cli/rich_terminal_reporter.py,sha256=
|
33
|
+
janito/cli/rich_terminal_reporter.py,sha256=_1xqmjcl2-untIslEvdT5-5gsp1HYqpTXCc3zZBhKH0,6605
|
33
34
|
janito/cli/utils.py,sha256=plCQiDKIf3V8mFhhX5H9-MF2W86i-xRdWf8Xi117Z0w,677
|
34
35
|
janito/cli/verbose_output.py,sha256=UmB1byT1V6wZvMJDIPfqajhmNcMnnJ3tgYocje5w0x8,7620
|
35
|
-
janito/cli/chat_mode/bindings.py,sha256=
|
36
|
-
janito/cli/chat_mode/chat_entry.py,sha256=
|
37
|
-
janito/cli/chat_mode/prompt_style.py,sha256=
|
38
|
-
janito/cli/chat_mode/script_runner.py,sha256=
|
39
|
-
janito/cli/chat_mode/session.py,sha256=
|
40
|
-
janito/cli/chat_mode/session_profile_select.py,sha256=
|
41
|
-
janito/cli/chat_mode/toolbar.py,sha256=
|
36
|
+
janito/cli/chat_mode/bindings.py,sha256=01die7k9_vn1dLJ9RosF3XfYBXVQakM6DsC3IVKU8XU,937
|
37
|
+
janito/cli/chat_mode/chat_entry.py,sha256=_2hIccaUYpHLtmHfCgfeWmDZ4fxj5Yjy85yHmQxyOpI,456
|
38
|
+
janito/cli/chat_mode/prompt_style.py,sha256=WBy8y1U5XHfpmJ-rMKMNAWdT2rzUYQVujCh5bwIJbC0,802
|
39
|
+
janito/cli/chat_mode/script_runner.py,sha256=QFjpYsnhD-FQoBIFz2JehRCWEmskr7yAsl4gkHDt-0E,6290
|
40
|
+
janito/cli/chat_mode/session.py,sha256=fWFvP-V_Yw2YBIJCuJGJHxlLooFovXnVBQwatlMBiuc,11802
|
41
|
+
janito/cli/chat_mode/session_profile_select.py,sha256=8x2zvQfg-ILkU-b9THkKHFMfHGqO3Vj8jR3ZAKMyKY0,5109
|
42
|
+
janito/cli/chat_mode/toolbar.py,sha256=BqNrIqFEb5uhxMf2XLNb8vZjq9C2_BLnsXPVNKIiwPw,3484
|
42
43
|
janito/cli/chat_mode/shell/autocomplete.py,sha256=lE68MaVaodbA2VfUM0_YLqQVLBJAE_BJsd5cMtwuD-g,793
|
43
44
|
janito/cli/chat_mode/shell/commands.bak.zip,sha256=I7GFjXg2ORT5NzFpicH1vQ3kchhduQsZinzqo0xO8wU,74238
|
44
45
|
janito/cli/chat_mode/shell/input_history.py,sha256=EbfsZWzEkbW3VpWldN6Z885HwJq7QtxOveWaAmTamdg,2562
|
@@ -61,7 +62,7 @@ janito/cli/chat_mode/shell/commands/read.py,sha256=pz1Nfa2xdFXxgwuxPfsW53-VgPRUm
|
|
61
62
|
janito/cli/chat_mode/shell/commands/role.py,sha256=4Mt3okuNwOjqHbNhOFawcWB9KCLkpTDuLoDJFeXr3-E,1079
|
62
63
|
janito/cli/chat_mode/shell/commands/session.py,sha256=9wsw5U24-KJgTT70KAwnGuS8MVPyvpxCJfAt_Io76O0,1574
|
63
64
|
janito/cli/chat_mode/shell/commands/session_control.py,sha256=tmMGJ8IvWoBwSIJu7T6GPnFYFrmXWIG2Gr9tTni4y3U,1307
|
64
|
-
janito/cli/chat_mode/shell/commands/tools.py,sha256
|
65
|
+
janito/cli/chat_mode/shell/commands/tools.py,sha256=-vkiFrWkfnJlRu102Wk2uR6B9FDZ0m_Lj2YqL9p-lHs,3119
|
65
66
|
janito/cli/chat_mode/shell/commands/utility.py,sha256=K982P-UwgPLzpEvSuSBGwiQ3zC34S_6T2ork_djweQw,847
|
66
67
|
janito/cli/chat_mode/shell/commands/verbose.py,sha256=HDTe0NhdcjBuhh-eJSW8iLPDeeBO95K5iSDAMAljxa4,953
|
67
68
|
janito/cli/chat_mode/shell/commands/write.py,sha256=kBd04L32NVkwEyAi7DoXm6K5RshjB_apQ1q8M08KtLc,1905
|
@@ -70,28 +71,27 @@ janito/cli/chat_mode/shell/session/history.py,sha256=tYav6GgjAZkvWhlI_rfG6OArNqW
|
|
70
71
|
janito/cli/chat_mode/shell/session/manager.py,sha256=m6cQe-9SeIqBnnWVEGtZiBtCpStqIwqRzP09XPhJrdM,1005
|
71
72
|
janito/cli/cli_commands/list_models.py,sha256=VN7_DG6aTxaHPrc6_H-OftRXRT1urhf5ze_qJ_SO35U,1116
|
72
73
|
janito/cli/cli_commands/list_providers.py,sha256=AMAVdoS7KN7WA3gaKhZZdfio_zvknu21OLDc6CTFZ34,173
|
73
|
-
janito/cli/cli_commands/list_tools.py,sha256=
|
74
|
+
janito/cli/cli_commands/list_tools.py,sha256=gzGamUrHvNLNhyKo9-OxX6NoyMCknsAi_5_TkHtJHys,3007
|
74
75
|
janito/cli/cli_commands/model_selection.py,sha256=ANWtwC5glZkGMdaNtARDbEG3QmuBUcDLVxzzC5jeBNo,1643
|
75
76
|
janito/cli/cli_commands/model_utils.py,sha256=ZGIExsv7WMHL_pqh4yeUXIfFGlu0vZE08PF0bCIIIK4,2864
|
76
77
|
janito/cli/cli_commands/set_api_key.py,sha256=iPtWPhS5VeyIlwVX43TGg7OYUwXCcGzugvwoa3KB8A8,605
|
77
78
|
janito/cli/cli_commands/show_config.py,sha256=6j4P2mK1Q7KZGPF9EXV3ascuWRQtpbgAQgRAnNszBJI,2024
|
78
|
-
janito/cli/cli_commands/show_system_prompt.py,sha256=
|
79
|
+
janito/cli/cli_commands/show_system_prompt.py,sha256=NOXAD9Ma0q20OmKh-CdLrv1tBk6l-nlu65Ky5SJrNK4,5041
|
79
80
|
janito/cli/core/__init__.py,sha256=YH95fhgY9yBX8RgqX9dSrEkl4exjV0T4rbmJ6xUpG-Y,196
|
80
81
|
janito/cli/core/event_logger.py,sha256=1X6lR0Ax7AgF8HlPWFoY5Ystuu7Bh4ooTo78vXzeGB0,2008
|
81
82
|
janito/cli/core/getters.py,sha256=Znw6aF6QUHGu6UWqQHQYu7LvNPPIjOO4SD4yyYaIGnw,1467
|
82
|
-
janito/cli/core/runner.py,sha256=
|
83
|
-
janito/cli/core/setters.py,sha256=
|
83
|
+
janito/cli/core/runner.py,sha256=G0hv_62vI7zF1WHTu4sxQlXg3AR9mbrc_vsMiCrj20g,7492
|
84
|
+
janito/cli/core/setters.py,sha256=BsMkrqAnBmwlOiuUhGqiDA2kHb_-p3iNBA8vjE636ds,7519
|
84
85
|
janito/cli/core/unsetters.py,sha256=FEw9gCt0vRvoCt0kRSNfVB2tzi_TqppJIx2nHPP59-k,2012
|
85
86
|
janito/cli/single_shot_mode/__init__.py,sha256=Ct99pKe9tINzVW6oedZJfzfZQKWpXz-weSSCn0hrwHY,115
|
86
|
-
janito/cli/single_shot_mode/handler.py,sha256=
|
87
|
+
janito/cli/single_shot_mode/handler.py,sha256=Z8pn1WU2FEzHXeyOQT9C35OzCfjLukP17w1i6rDW5a0,3622
|
87
88
|
janito/drivers/dashscope.bak.zip,sha256=9Pv4Xyciju8jO1lEMFVgYXexoZkxmDO3Ig6vw3ODfL8,4936
|
88
|
-
janito/drivers/driver_registry.py,sha256=
|
89
|
+
janito/drivers/driver_registry.py,sha256=XqpbvH93tjMlc4Hl3ulRXjQ5aeyODNwQEy2frgIxZmE,746
|
89
90
|
janito/drivers/openai_responses.bak.zip,sha256=E43eDCHGa2tCtdjzj_pMnWDdnsOZzj8BJTR5tJp8wcM,13352
|
90
|
-
janito/drivers/anthropic/driver.py,sha256=4yLaf2T0g2zr-MSwXOx32s7ETut9FOl0uXyJGYiJzZU,3937
|
91
91
|
janito/drivers/azure_openai/driver.py,sha256=zQc9xH-RD409okDCfTRwb1QXXb9WzR2bsBfRyrZ5HYc,3936
|
92
92
|
janito/drivers/mistralai/driver.py,sha256=r7iMMAG5V7OmzrtQhVCuK3ueAEzgbgS1qcPDKHTNKoo,1208
|
93
93
|
janito/drivers/openai/README.md,sha256=bgPdaYX0pyotCoJ9t3cJbYM-teQ_YM1DAFEKLCMP32Q,666
|
94
|
-
janito/drivers/openai/driver.py,sha256=
|
94
|
+
janito/drivers/openai/driver.py,sha256=eSUUE8WFllVplZRRJM6uQROggqUhznB6kr9slsALB9M,17679
|
95
95
|
janito/event_bus/__init__.py,sha256=VG6GOhKMBh0O_92D-zW8a3YitJPKDajGgPiFezTXlNE,77
|
96
96
|
janito/event_bus/bus.py,sha256=LokZbAdwcWhWOyKSp7H3Ism57x4EZhxlRPjl3NE4UKU,2847
|
97
97
|
janito/event_bus/event.py,sha256=MtgcBPD7cvCuubiLIyo-BWcsNSO-941HLk6bScHTJtQ,427
|
@@ -102,7 +102,7 @@ janito/i18n/messages.py,sha256=fBuwOTFoygyHPkYphm6Y0r1iE8497Z4iryVAmPhMEkg,1851
|
|
102
102
|
janito/i18n/pt.py,sha256=NlTgpDSftUfFG7FGbs7TK54vQlJVMyaZDHGcWjelwMc,4168
|
103
103
|
janito/llm/README.md,sha256=6GRqCu_a9va5HCB1YqNqbshyWKFyAGlnXugrjom-xj8,1213
|
104
104
|
janito/llm/__init__.py,sha256=dpyVH51qVRCw-PDyAFLAxq0zd4jl5MDcuV6Cri0D-dQ,134
|
105
|
-
janito/llm/agent.py,sha256=
|
105
|
+
janito/llm/agent.py,sha256=OlVNhfyHby4snzJOGUQZiCD_ZDTvUckICf7CDRRBDiY,20589
|
106
106
|
janito/llm/auth.py,sha256=8Dl_orUEPhn2X6XjkO2Nr-j1HFT2YDxk1qJl9hSFI88,2286
|
107
107
|
janito/llm/driver.py,sha256=mepQ00QK0ouK8LHz4blQctUTolzlDatXNWWQEmSdpO8,10037
|
108
108
|
janito/llm/driver_config.py,sha256=OW0ae49EfgKDqaThuDjZBiaN78voNzwiZ6szERMqJos,1406
|
@@ -113,10 +113,10 @@ janito/llm/model.py,sha256=42hjcffZDTuzjAJoVhDcDqwIXm6rUmmi5UwTOYopf5w,1131
|
|
113
113
|
janito/llm/provider.py,sha256=lfIJnh06F0kf8--Pg_W7ALhkbIzn7N4iItQ93pntyuM,7978
|
114
114
|
janito/providers/__init__.py,sha256=AY_mYBUuPP85TTIrx0-lMwbf8-biTLaCo_mZQBy0sck,282
|
115
115
|
janito/providers/dashscope.bak.zip,sha256=BwXxRmZreEivvRtmqbr5BR62IFVlNjAf4y6DrF2BVJo,5998
|
116
|
-
janito/providers/provider_static_info.py,sha256=
|
116
|
+
janito/providers/provider_static_info.py,sha256=sDehA8gd6EEYGXa62WJTyz4KcdV4ciMIAIWOa5gbtxA,508
|
117
117
|
janito/providers/registry.py,sha256=Ygwv9eVrTXOKhv0EKxSWQXO5WMHvajWE2Q_Lc3p7dKo,730
|
118
|
-
janito/providers/anthropic/model_info.py,sha256=
|
119
|
-
janito/providers/anthropic/provider.py,sha256=
|
118
|
+
janito/providers/anthropic/model_info.py,sha256=MEkG7D3Z93qjPVDUyqIGqObnYj4rC-xYczce_LCR-lA,1167
|
119
|
+
janito/providers/anthropic/provider.py,sha256=xzjYukIgd-n2F6z1Iw8qktxIo9VVS7AgwQx6HlZzI8I,3021
|
120
120
|
janito/providers/azure_openai/model_info.py,sha256=TMSqEpQROIIYUGAyulYJ5xGhj7CbLoaKL_JXeLbXaG0,689
|
121
121
|
janito/providers/azure_openai/provider.py,sha256=7RtYYjKa4HYi11XSiB4QQI2czzvpQ2btOWn7i-sHS8g,5154
|
122
122
|
janito/providers/deepseek/__init__.py,sha256=4sISEpq4bJO29vxFK9cfnO-SRUmKoD7oSdeCvz0hVno,36
|
@@ -136,63 +136,64 @@ janito/tools/README.md,sha256=5HkLpF5k4PENJER7SlDPRXj0yo9mpHvAHW4uuzhq4ak,115
|
|
136
136
|
janito/tools/__init__.py,sha256=-hiAfmntq3uVgvLip8hwvsVifj8JoLlmIds4xVt43PM,1167
|
137
137
|
janito/tools/inspect_registry.py,sha256=Jo7PrMPRKLuR-j_mBAk9PBcTzeJf1eQrS1ChGofgQk0,538
|
138
138
|
janito/tools/outline_file.bak.zip,sha256=EeI2cBXCwTdWVgJDNiroxKeYlkjwo6NLKeXz3J-2iZI,15607
|
139
|
+
janito/tools/path_security.py,sha256=1ySpG7naOmS2U5FKHobm18IJe2Q11TMtXCRbyWrh_es,7629
|
139
140
|
janito/tools/permissions.py,sha256=8lsfT7L6pyuvjZAgIXX5WrZZYSjZXPWUBpW7LXDBJ6M,1496
|
140
141
|
janito/tools/permissions_parse.py,sha256=OY_Uojjg_QCp6UsfVk5iHhrKRbeFgzfm8UUIoYDe18I,382
|
141
142
|
janito/tools/tool_base.py,sha256=-yzl7Kki8eNlyyU-Z83ReXR-iJ0RkHpD6uksLYneyoE,3629
|
142
143
|
janito/tools/tool_events.py,sha256=czRtC2TYakAySBZvfHS_Q6_NY_7_krxzAzAL1ggRFWA,1527
|
143
144
|
janito/tools/tool_run_exception.py,sha256=43yWgTaGBGEtRteo6FvTrane6fEVGo9FU1uOdjMRWJE,525
|
144
|
-
janito/tools/tool_use_tracker.py,sha256=
|
145
|
+
janito/tools/tool_use_tracker.py,sha256=Iw9Mz62KPDJLmJkhemVMv2sX0ITpVuwaHeK6G8HP_Jc,2725
|
145
146
|
janito/tools/tool_utils.py,sha256=37jCQe3TuXoiI0411-vBg_CgK-p1Wl4pTTGhLfVXbZY,1223
|
146
|
-
janito/tools/tools_adapter.py,sha256=
|
147
|
+
janito/tools/tools_adapter.py,sha256=2wn6PHk4TIeYQJh2-o5Y4DQIQsr-8SA9GWqxtXm8d5Q,13591
|
147
148
|
janito/tools/tools_schema.py,sha256=rGrKrmpPNR07VXHAJ_haGBRRO-YGLOF51BlYRep9AAQ,4415
|
148
149
|
janito/tools/adapters/__init__.py,sha256=XKixOKtUJs1R-rGwGDXSLVLg5-Kp090gvWbsseWT4LI,92
|
149
|
-
janito/tools/adapters/local/__init__.py,sha256=
|
150
|
-
janito/tools/adapters/local/adapter.py,sha256=
|
150
|
+
janito/tools/adapters/local/__init__.py,sha256=HkNkqrw1w4oC7yr9jOuki6KXSKU4AoS_aPP_q6in23A,2104
|
151
|
+
janito/tools/adapters/local/adapter.py,sha256=tEkg8tH-bdARiwtzhpJmOj9A3joQ97GZ_5QRyqFXTC4,6766
|
151
152
|
janito/tools/adapters/local/ask_user.py,sha256=9aR7gwRdrSQGXR8mvuo5x_8SKNk2Ep7GwUDv3latyac,3598
|
152
153
|
janito/tools/adapters/local/copy_file.py,sha256=I2GAMxy55w-fZwNUde_paUD2kof7Szgk9uNoDOW_TDA,3580
|
153
|
-
janito/tools/adapters/local/create_directory.py,sha256=
|
154
|
-
janito/tools/adapters/local/create_file.py,sha256=
|
155
|
-
janito/tools/adapters/local/delete_text_in_file.py,sha256=
|
154
|
+
janito/tools/adapters/local/create_directory.py,sha256=xzLamkrlxO8cmR4VSrKeZmQkMFms3QF38nFtLVUHC8E,2563
|
155
|
+
janito/tools/adapters/local/create_file.py,sha256=yI3m-ou9W5Kw5lzA9FblD4VwNBHZii7GWzvRdnzw_iw,3456
|
156
|
+
janito/tools/adapters/local/delete_text_in_file.py,sha256=OjEhdokSD8MqHXefdqr6lirRzIbVE41Ib9njpF_e3dY,5084
|
156
157
|
janito/tools/adapters/local/fetch_url.py,sha256=1nVM1DWPS7FKV20CwtzyyJF8tFupSZ6rV-xjHtLd2co,3867
|
157
|
-
janito/tools/adapters/local/find_files.py,sha256=
|
158
|
+
janito/tools/adapters/local/find_files.py,sha256=Dery91Z7gPJeeV6iBIFo807QQUzTkDIMw659K1EqTns,6017
|
158
159
|
janito/tools/adapters/local/move_file.py,sha256=FktO0bvk9OsztVM1BnR-1Q3rbDbhEezDsPOzzpADNaI,4614
|
159
|
-
janito/tools/adapters/local/open_html_in_browser.py,sha256=
|
160
|
+
janito/tools/adapters/local/open_html_in_browser.py,sha256=sZIcRuAU_fqfPdpvsQNWwC0wAw5p9N86zUyockLd0TE,1823
|
160
161
|
janito/tools/adapters/local/open_url.py,sha256=FOLxRu-41oq_1PG6hPn3-aX-ZbobVlofCHbtq5XuXoo,1400
|
161
162
|
janito/tools/adapters/local/python_code_run.py,sha256=R_Pmq2iU9C5teUigtT8n8ImutGMAzzSGF1-Hd26HyTQ,6679
|
162
163
|
janito/tools/adapters/local/python_command_run.py,sha256=Guk68Z1N_T_8N4GavPYxJsX0431P05iMfDPtqH3eCZM,6619
|
163
|
-
janito/tools/adapters/local/python_file_run.py,sha256=
|
164
|
-
janito/tools/adapters/local/
|
165
|
-
janito/tools/adapters/local/
|
166
|
-
janito/tools/adapters/local/
|
167
|
-
janito/tools/adapters/local/
|
164
|
+
janito/tools/adapters/local/python_file_run.py,sha256=U-mjQLSVLUPcTULclY8THfERpw4ldpdP5P6qcEQI6rQ,6464
|
165
|
+
janito/tools/adapters/local/read_files.py,sha256=4ArUBNuzI0xl-2rLgBX6qVZFl2U2lX7njpJLIh1eOIk,1797
|
166
|
+
janito/tools/adapters/local/remove_directory.py,sha256=86FhviczQ-Copa49LsYZmkCaVmm5rorO5T1z77nW9P4,1828
|
167
|
+
janito/tools/adapters/local/remove_file.py,sha256=F0Ep6jk72GtIZGaq062i87O_JY151PQtK5TV6ugwZ_g,2088
|
168
|
+
janito/tools/adapters/local/replace_text_in_file.py,sha256=6YGwIwIQxmkxQy7y_gTRNAs7pbzQ92FYA8cQdYmTPXo,10789
|
169
|
+
janito/tools/adapters/local/run_bash_command.py,sha256=-NePyGW4XVXBAUxBn4sdOlOCylmgKaJz_1T3ef8lfCY,7621
|
168
170
|
janito/tools/adapters/local/run_powershell_command.py,sha256=Kt2mHFdrMAPzB7mSydGB1IAXHSYMrn2oWtDecuACc3k,9258
|
169
|
-
janito/tools/adapters/local/view_file.py,sha256
|
171
|
+
janito/tools/adapters/local/view_file.py,sha256=-6Li0SegDUcUdH9jAulunQZj-Bm4A2MhSVbmtBFXtXQ,7137
|
170
172
|
janito/tools/adapters/local/get_file_outline/__init__.py,sha256=OKV_BHnoD9h-vkcVoW6AHmsuDjjauHPCKNK0nVFl4sU,37
|
171
|
-
janito/tools/adapters/local/get_file_outline/core.py,sha256=
|
173
|
+
janito/tools/adapters/local/get_file_outline/core.py,sha256=BQuF2vwsXe2vJpFFs_K-I9FgylIiXrOZ5cK3p3t3wJs,4371
|
172
174
|
janito/tools/adapters/local/get_file_outline/java_outline.py,sha256=5xCX7zMOpTljwNTxKmc4ewTnCykCOC9TDd62gZzP_BU,1685
|
173
175
|
janito/tools/adapters/local/get_file_outline/markdown_outline.py,sha256=bXEBg0D93tEBDNy8t-wh4i7WxsxfpQ2C3dX1_rmtj08,434
|
174
176
|
janito/tools/adapters/local/get_file_outline/python_outline.py,sha256=RAcf9Vxec08lA06drYaNre5HCJ2lTzrRAskZ3rlyE-U,10326
|
175
|
-
janito/tools/adapters/local/get_file_outline/
|
176
|
-
janito/tools/adapters/local/get_file_outline/search_outline.py,sha256=s5S1eMBvqW30lPoScza3bDxENiJY4C0akrGjGN12HpY,1225
|
177
|
+
janito/tools/adapters/local/get_file_outline/search_outline.py,sha256=am8f3u6FXQD5TJbaFqiZAu2WoJBG_e71Coq9rSrBW3o,1195
|
177
178
|
janito/tools/adapters/local/search_text/__init__.py,sha256=FEYpF5tTtf0fiAyRGIGSn-kV-MJDkhdFIbus16mYW8Y,34
|
178
179
|
janito/tools/adapters/local/search_text/core.py,sha256=xuaZstYmLp0rhXoNpNFItoshd-dc_9nFP5pFSEm2cvI,7701
|
179
180
|
janito/tools/adapters/local/search_text/match_lines.py,sha256=2l0r8_1l5gnmu9vJSdkxu0JwbPNHx7m84Ei2s4V0hcQ,2141
|
180
|
-
janito/tools/adapters/local/search_text/pattern_utils.py,sha256=
|
181
|
-
janito/tools/adapters/local/search_text/traverse_directory.py,sha256=
|
181
|
+
janito/tools/adapters/local/search_text/pattern_utils.py,sha256=wQm78OCmpJd0E0-P9tf6skPIayxLyg-Oo23vEkY-Jvg,2364
|
182
|
+
janito/tools/adapters/local/search_text/traverse_directory.py,sha256=AX-YCqcmg-K8I-85yTj45Q4nbnDuzYH6W-WXWeRN3w4,4014
|
182
183
|
janito/tools/adapters/local/validate_file_syntax/__init__.py,sha256=P53RHmas4BbHL90cMxH9m-RpMCJI8JquoJb0rpkPVVk,29
|
183
|
-
janito/tools/adapters/local/validate_file_syntax/core.py,sha256=
|
184
|
-
janito/tools/adapters/local/validate_file_syntax/css_validator.py,sha256=
|
185
|
-
janito/tools/adapters/local/validate_file_syntax/html_validator.py,sha256=
|
186
|
-
janito/tools/adapters/local/validate_file_syntax/js_validator.py,sha256=
|
187
|
-
janito/tools/adapters/local/validate_file_syntax/json_validator.py,sha256=
|
188
|
-
janito/tools/adapters/local/validate_file_syntax/markdown_validator.py,sha256=
|
189
|
-
janito/tools/adapters/local/validate_file_syntax/ps1_validator.py,sha256=
|
190
|
-
janito/tools/adapters/local/validate_file_syntax/python_validator.py,sha256=
|
191
|
-
janito/tools/adapters/local/validate_file_syntax/xml_validator.py,sha256=
|
192
|
-
janito/tools/adapters/local/validate_file_syntax/yaml_validator.py,sha256=
|
193
|
-
janito-2.
|
194
|
-
janito-2.
|
195
|
-
janito-2.
|
196
|
-
janito-2.
|
197
|
-
janito-2.
|
198
|
-
janito-2.
|
184
|
+
janito/tools/adapters/local/validate_file_syntax/core.py,sha256=5mZBeMcX1XgUSKI4i_ZcX31GbBx0pKAVM50y4mznwYk,3334
|
185
|
+
janito/tools/adapters/local/validate_file_syntax/css_validator.py,sha256=jE5d26C_fU9k9azujbGVISn2WIRL-Ys6de4dsCq30bo,1351
|
186
|
+
janito/tools/adapters/local/validate_file_syntax/html_validator.py,sha256=pJ5aWI8UKAVr3A2Wr5PWoM1aUNV9i0aS45e8LUEz5Tw,3029
|
187
|
+
janito/tools/adapters/local/validate_file_syntax/js_validator.py,sha256=42LvgyMVhG9c2EAaSz3J9pu-yuh1oyIvRp0wN2rHiDQ,998
|
188
|
+
janito/tools/adapters/local/validate_file_syntax/json_validator.py,sha256=muCB0-bdxk9zNulzH1It3hWpYzJC3hD8LbxCnE0P5is,150
|
189
|
+
janito/tools/adapters/local/validate_file_syntax/markdown_validator.py,sha256=k4UT88fXvtclygz-nFhCMHJL5sk5WlGD-fP_cWqWMyU,3511
|
190
|
+
janito/tools/adapters/local/validate_file_syntax/ps1_validator.py,sha256=TeIkPt08t_-w2JiKksXHHK9lJNT348ZDkWoSTzMtRrI,1152
|
191
|
+
janito/tools/adapters/local/validate_file_syntax/python_validator.py,sha256=BfCO_K18qy92m-2ZVvHsbEU5e11OPo1pO9Vz4G4616E,130
|
192
|
+
janito/tools/adapters/local/validate_file_syntax/xml_validator.py,sha256=AijlsP_PgNuC8ZbGsC5vOTt3Jur76otQzkd_7qR0QFY,284
|
193
|
+
janito/tools/adapters/local/validate_file_syntax/yaml_validator.py,sha256=TgyI0HRL6ug_gBcWEm5TGJJuA4E34ZXcIzMpAbv3oJs,155
|
194
|
+
janito-2.6.1.dist-info/licenses/LICENSE,sha256=GSAKapQH5ZIGWlpQTA7v5YrfECyaxaohUb1vJX-qepw,1090
|
195
|
+
janito-2.6.1.dist-info/METADATA,sha256=wAkuZD3NvUgoiHB6fwecZhKZRPJSsLXPbyDuwZ1RpU8,16272
|
196
|
+
janito-2.6.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
197
|
+
janito-2.6.1.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
|
198
|
+
janito-2.6.1.dist-info/top_level.txt,sha256=m0NaVCq0-ivxbazE2-ND0EA9Hmuijj_OGkmCbnBcCig,7
|
199
|
+
janito-2.6.1.dist-info/RECORD,,
|
@@ -1,113 +0,0 @@
|
|
1
|
-
from janito.llm.driver import LLMDriver
|
2
|
-
from janito.llm.driver_config import LLMDriverConfig
|
3
|
-
from janito.driver_events import (
|
4
|
-
GenerationStarted,
|
5
|
-
GenerationFinished,
|
6
|
-
RequestStarted,
|
7
|
-
RequestFinished,
|
8
|
-
ResponseReceived,
|
9
|
-
)
|
10
|
-
from janito.llm.message_parts import TextMessagePart
|
11
|
-
import uuid
|
12
|
-
import traceback
|
13
|
-
import time
|
14
|
-
|
15
|
-
# Safe import of anthropic SDK
|
16
|
-
try:
|
17
|
-
import anthropic
|
18
|
-
|
19
|
-
DRIVER_AVAILABLE = True
|
20
|
-
DRIVER_UNAVAILABLE_REASON = None
|
21
|
-
except ImportError:
|
22
|
-
DRIVER_AVAILABLE = False
|
23
|
-
DRIVER_UNAVAILABLE_REASON = "Missing dependency: anthropic (pip install anthropic)"
|
24
|
-
|
25
|
-
|
26
|
-
class AnthropicModelDriver(LLMDriver):
|
27
|
-
available = False
|
28
|
-
unavailable_reason = "AnthropicModelDriver is not implemented yet."
|
29
|
-
|
30
|
-
@classmethod
|
31
|
-
def is_available(cls):
|
32
|
-
return cls.available
|
33
|
-
|
34
|
-
"""
|
35
|
-
LLMDriver for Anthropic's Claude API (v3), using the anthropic SDK.
|
36
|
-
"""
|
37
|
-
required_config = ["api_key", "model"]
|
38
|
-
|
39
|
-
def __init__(self, tools_adapter=None):
|
40
|
-
raise ImportError(self.unavailable_reason)
|
41
|
-
|
42
|
-
def _create_client(self):
|
43
|
-
try:
|
44
|
-
import anthropic
|
45
|
-
except ImportError:
|
46
|
-
raise Exception(
|
47
|
-
"The 'anthropic' Python SDK is required. Please install via `pip install anthropic`."
|
48
|
-
)
|
49
|
-
return anthropic.Anthropic(api_key=self.api_key)
|
50
|
-
|
51
|
-
def _run_generation(
|
52
|
-
self, messages_or_prompt, system_prompt=None, tools=None, **kwargs
|
53
|
-
):
|
54
|
-
request_id = str(uuid.uuid4())
|
55
|
-
client = self._create_client()
|
56
|
-
try:
|
57
|
-
prompt = ""
|
58
|
-
if isinstance(messages_or_prompt, str):
|
59
|
-
prompt = messages_or_prompt
|
60
|
-
elif isinstance(messages_or_prompt, list):
|
61
|
-
chat = []
|
62
|
-
for msg in messages_or_prompt:
|
63
|
-
if msg.get("role") == "user":
|
64
|
-
chat.append("Human: " + msg.get("content", ""))
|
65
|
-
elif msg.get("role") == "assistant":
|
66
|
-
chat.append("Assistant: " + msg.get("content", ""))
|
67
|
-
prompt = "\n".join(chat)
|
68
|
-
if system_prompt:
|
69
|
-
prompt = f"System: {system_prompt}\n{prompt}"
|
70
|
-
|
71
|
-
self.publish(
|
72
|
-
GenerationStarted,
|
73
|
-
request_id,
|
74
|
-
conversation_history=list(getattr(self, "_history", [])),
|
75
|
-
)
|
76
|
-
self.publish(RequestStarted, request_id, payload={})
|
77
|
-
start_time = time.time()
|
78
|
-
response = client.completions.create(
|
79
|
-
model=self.model_name,
|
80
|
-
max_tokens_to_sample=int(getattr(self.config, "max_response", 1024)),
|
81
|
-
prompt=prompt,
|
82
|
-
temperature=float(getattr(self.config, "default_temp", 0.7)),
|
83
|
-
)
|
84
|
-
duration = time.time() - start_time
|
85
|
-
content = response.completion if hasattr(response, "completion") else None
|
86
|
-
self.publish(
|
87
|
-
RequestFinished,
|
88
|
-
request_id,
|
89
|
-
response=content,
|
90
|
-
status=RequestStatus.SUCCESS,
|
91
|
-
usage={},
|
92
|
-
)
|
93
|
-
parts = []
|
94
|
-
if content:
|
95
|
-
parts.append(TextMessagePart(content=content))
|
96
|
-
self.publish(
|
97
|
-
ResponseReceived,
|
98
|
-
request_id=request_id,
|
99
|
-
parts=parts,
|
100
|
-
tool_results=[],
|
101
|
-
timestamp=time.time(),
|
102
|
-
metadata={"raw_response": response},
|
103
|
-
)
|
104
|
-
self.publish(GenerationFinished, request_id, total_turns=1)
|
105
|
-
except Exception as e:
|
106
|
-
self.publish(
|
107
|
-
RequestFinished,
|
108
|
-
request_id,
|
109
|
-
status=RequestStatus.ERROR,
|
110
|
-
error=str(e),
|
111
|
-
exception=e,
|
112
|
-
traceback=traceback.format_exc(),
|
113
|
-
)
|
@@ -1,156 +0,0 @@
|
|
1
|
-
import re
|
2
|
-
from typing import List
|
3
|
-
|
4
|
-
|
5
|
-
def extract_signature_and_decorators(lines, start_idx):
|
6
|
-
"""
|
7
|
-
Extracts the signature line and leading decorators for a given function/class/method.
|
8
|
-
Returns (signature:str, decorators:List[str], signature_lineno:int)
|
9
|
-
"""
|
10
|
-
decorators = []
|
11
|
-
sig_line = None
|
12
|
-
sig_lineno = start_idx
|
13
|
-
for i in range(start_idx - 1, -1, -1):
|
14
|
-
striped = lines[i].strip()
|
15
|
-
if striped.startswith("@"):
|
16
|
-
decorators.insert(0, striped)
|
17
|
-
sig_lineno = i
|
18
|
-
elif not striped:
|
19
|
-
continue
|
20
|
-
else:
|
21
|
-
break
|
22
|
-
# Find the signature line itself
|
23
|
-
for k in range(start_idx, len(lines)):
|
24
|
-
striped = lines[k].strip()
|
25
|
-
if striped.startswith("def ") or striped.startswith("class "):
|
26
|
-
sig_line = striped
|
27
|
-
sig_lineno = k
|
28
|
-
break
|
29
|
-
return sig_line, decorators, sig_lineno
|
30
|
-
|
31
|
-
|
32
|
-
def extract_docstring(lines, start_idx, end_idx):
|
33
|
-
"""Extracts a docstring from lines[start_idx:end_idx] if present."""
|
34
|
-
for i in range(start_idx, min(end_idx, len(lines))):
|
35
|
-
line = lines[i].lstrip()
|
36
|
-
if not line:
|
37
|
-
continue
|
38
|
-
if line.startswith('"""') or line.startswith("'''"):
|
39
|
-
quote = line[:3]
|
40
|
-
doc = line[3:]
|
41
|
-
if doc.strip().endswith(quote):
|
42
|
-
return doc.strip()[:-3].strip()
|
43
|
-
docstring_lines = [doc]
|
44
|
-
for j in range(i + 1, min(end_idx, len(lines))):
|
45
|
-
line = lines[j]
|
46
|
-
if line.strip().endswith(quote):
|
47
|
-
docstring_lines.append(line.strip()[:-3])
|
48
|
-
return "\n".join([d.strip() for d in docstring_lines]).strip()
|
49
|
-
docstring_lines.append(line)
|
50
|
-
break
|
51
|
-
else:
|
52
|
-
break
|
53
|
-
return ""
|
54
|
-
|
55
|
-
|
56
|
-
def build_outline_entry(obj, lines, outline):
|
57
|
-
obj_type, name, start, end, parent, indent = obj
|
58
|
-
# Determine if this is a method
|
59
|
-
if obj_type == "function" and parent:
|
60
|
-
outline_type = "method"
|
61
|
-
elif obj_type == "function":
|
62
|
-
outline_type = "function"
|
63
|
-
else:
|
64
|
-
outline_type = obj_type
|
65
|
-
docstring = extract_docstring(lines, start, end)
|
66
|
-
signature, decorators, signature_lineno = extract_signature_and_decorators(
|
67
|
-
lines, start - 1
|
68
|
-
)
|
69
|
-
outline.append(
|
70
|
-
{
|
71
|
-
"type": outline_type,
|
72
|
-
"name": name,
|
73
|
-
"start": start,
|
74
|
-
"end": end,
|
75
|
-
"parent": parent,
|
76
|
-
"signature": signature,
|
77
|
-
"decorators": decorators,
|
78
|
-
"docstring": docstring,
|
79
|
-
}
|
80
|
-
)
|
81
|
-
|
82
|
-
|
83
|
-
def parse_python_outline_v2(lines: List[str]):
|
84
|
-
class_pat = re.compile(r"^(\s*)class\s+(\w+)")
|
85
|
-
func_pat = re.compile(r"^(\s*)def\s+(\w+)")
|
86
|
-
assign_pat = re.compile(r"^(\s*)([A-Za-z_][A-Za-z0-9_]*)\s*=.*")
|
87
|
-
main_pat = re.compile(r"^\s*if\s+__name__\s*==\s*[\'\"]__main__[\'\"]\s*:")
|
88
|
-
outline = []
|
89
|
-
stack = []
|
90
|
-
obj_ranges = []
|
91
|
-
last_top_obj = None
|
92
|
-
for idx, line in enumerate(lines):
|
93
|
-
class_match = class_pat.match(line)
|
94
|
-
func_match = func_pat.match(line)
|
95
|
-
assign_match = assign_pat.match(line)
|
96
|
-
indent = len(line) - len(line.lstrip())
|
97
|
-
parent = ""
|
98
|
-
for s in reversed(stack):
|
99
|
-
if s[0] == "class" and indent > s[2]:
|
100
|
-
parent = s[1]
|
101
|
-
break
|
102
|
-
if class_match:
|
103
|
-
obj = ("class", class_match.group(2), idx + 1, None, parent, indent)
|
104
|
-
stack.append(obj)
|
105
|
-
last_top_obj = obj
|
106
|
-
elif func_match:
|
107
|
-
obj = ("function", func_match.group(2), idx + 1, None, parent, indent)
|
108
|
-
stack.append(obj)
|
109
|
-
last_top_obj = obj
|
110
|
-
elif assign_match and indent == 0:
|
111
|
-
outline.append(
|
112
|
-
{
|
113
|
-
"type": "const" if assign_match.group(2).isupper() else "var",
|
114
|
-
"name": assign_match.group(2),
|
115
|
-
"start": idx + 1,
|
116
|
-
"end": idx + 1,
|
117
|
-
"parent": "",
|
118
|
-
"signature": line.strip(),
|
119
|
-
"decorators": [],
|
120
|
-
"docstring": "",
|
121
|
-
}
|
122
|
-
)
|
123
|
-
if line.strip().startswith("if __name__ == "):
|
124
|
-
outline.append(
|
125
|
-
{
|
126
|
-
"type": "main",
|
127
|
-
"name": "__main__",
|
128
|
-
"start": idx + 1,
|
129
|
-
"end": idx + 1,
|
130
|
-
"parent": "",
|
131
|
-
"signature": line.strip(),
|
132
|
-
"decorators": [],
|
133
|
-
"docstring": "",
|
134
|
-
}
|
135
|
-
)
|
136
|
-
# Close stack objects if indent falls back
|
137
|
-
while stack and indent <= stack[-1][5] and idx + 1 > stack[-1][2]:
|
138
|
-
finished = stack.pop()
|
139
|
-
outline_entry = finished[:2] + (
|
140
|
-
finished[2],
|
141
|
-
idx + 1,
|
142
|
-
finished[4],
|
143
|
-
finished[5],
|
144
|
-
)
|
145
|
-
build_outline_entry(outline_entry, lines, outline)
|
146
|
-
# Close any remaining objects
|
147
|
-
while stack:
|
148
|
-
finished = stack.pop()
|
149
|
-
outline_entry = finished[:2] + (
|
150
|
-
finished[2],
|
151
|
-
len(lines),
|
152
|
-
finished[4],
|
153
|
-
finished[5],
|
154
|
-
)
|
155
|
-
build_outline_entry(outline_entry, lines, outline)
|
156
|
-
return outline
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|