janito 1.14.3__py3-none-any.whl → 2.0.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.
Files changed (282) hide show
  1. janito/__init__.py +6 -1
  2. janito/__main__.py +1 -1
  3. janito/agent/setup_agent.py +139 -0
  4. janito/agent/templates/profiles/{system_prompt_template_base.txt.j2 → system_prompt_template_main.txt.j2} +1 -1
  5. janito/cli/__init__.py +9 -0
  6. janito/cli/chat_mode/bindings.py +37 -0
  7. janito/cli/chat_mode/chat_entry.py +23 -0
  8. janito/cli/chat_mode/prompt_style.py +19 -0
  9. janito/cli/chat_mode/session.py +272 -0
  10. janito/{shell/prompt/completer.py → cli/chat_mode/shell/autocomplete.py} +7 -6
  11. janito/cli/chat_mode/shell/commands/__init__.py +55 -0
  12. janito/cli/chat_mode/shell/commands/base.py +9 -0
  13. janito/cli/chat_mode/shell/commands/clear.py +12 -0
  14. janito/{shell → cli/chat_mode/shell}/commands/conversation_restart.py +34 -30
  15. janito/cli/chat_mode/shell/commands/edit.py +25 -0
  16. janito/cli/chat_mode/shell/commands/help.py +16 -0
  17. janito/cli/chat_mode/shell/commands/history_view.py +93 -0
  18. janito/cli/chat_mode/shell/commands/lang.py +25 -0
  19. janito/cli/chat_mode/shell/commands/last.py +137 -0
  20. janito/cli/chat_mode/shell/commands/livelogs.py +49 -0
  21. janito/cli/chat_mode/shell/commands/multi.py +51 -0
  22. janito/cli/chat_mode/shell/commands/prompt.py +64 -0
  23. janito/cli/chat_mode/shell/commands/role.py +36 -0
  24. janito/cli/chat_mode/shell/commands/session.py +40 -0
  25. janito/{shell → cli/chat_mode/shell}/commands/session_control.py +2 -2
  26. janito/cli/chat_mode/shell/commands/termweb_log.py +92 -0
  27. janito/cli/chat_mode/shell/commands/tools.py +32 -0
  28. janito/{shell → cli/chat_mode/shell}/commands/utility.py +4 -7
  29. janito/{shell → cli/chat_mode/shell}/commands/verbose.py +5 -5
  30. janito/cli/chat_mode/shell/session/__init__.py +1 -0
  31. janito/{shell → cli/chat_mode/shell}/session/manager.py +9 -1
  32. janito/cli/chat_mode/toolbar.py +90 -0
  33. janito/cli/cli_commands/list_models.py +35 -0
  34. janito/cli/cli_commands/list_providers.py +9 -0
  35. janito/cli/cli_commands/list_tools.py +53 -0
  36. janito/cli/cli_commands/model_selection.py +50 -0
  37. janito/cli/cli_commands/model_utils.py +84 -0
  38. janito/cli/cli_commands/set_api_key.py +19 -0
  39. janito/cli/cli_commands/show_config.py +51 -0
  40. janito/cli/cli_commands/show_system_prompt.py +62 -0
  41. janito/cli/config.py +28 -0
  42. janito/cli/console.py +3 -0
  43. janito/cli/core/__init__.py +4 -0
  44. janito/cli/core/event_logger.py +59 -0
  45. janito/cli/core/getters.py +31 -0
  46. janito/cli/core/runner.py +141 -0
  47. janito/cli/core/setters.py +174 -0
  48. janito/cli/core/unsetters.py +54 -0
  49. janito/cli/main.py +8 -196
  50. janito/cli/main_cli.py +312 -0
  51. janito/cli/prompt_core.py +230 -0
  52. janito/cli/prompt_handler.py +6 -0
  53. janito/cli/rich_terminal_reporter.py +101 -0
  54. janito/cli/single_shot_mode/__init__.py +6 -0
  55. janito/cli/single_shot_mode/handler.py +137 -0
  56. janito/cli/termweb_starter.py +73 -24
  57. janito/cli/utils.py +25 -0
  58. janito/cli/verbose_output.py +196 -0
  59. janito/config.py +5 -0
  60. janito/config_manager.py +110 -0
  61. janito/conversation_history.py +30 -0
  62. janito/{agent/tools_utils/dir_walk_utils.py → dir_walk_utils.py} +3 -2
  63. janito/driver_events.py +98 -0
  64. janito/drivers/anthropic/driver.py +113 -0
  65. janito/drivers/azure_openai/driver.py +36 -0
  66. janito/drivers/driver_registry.py +33 -0
  67. janito/drivers/google_genai/driver.py +54 -0
  68. janito/drivers/google_genai/schema_generator.py +67 -0
  69. janito/drivers/mistralai/driver.py +41 -0
  70. janito/drivers/openai/driver.py +334 -0
  71. janito/event_bus/__init__.py +2 -0
  72. janito/event_bus/bus.py +68 -0
  73. janito/event_bus/event.py +15 -0
  74. janito/event_bus/handler.py +31 -0
  75. janito/event_bus/queue_bus.py +57 -0
  76. janito/exceptions.py +23 -0
  77. janito/formatting_token.py +54 -0
  78. janito/i18n/pt.py +1 -0
  79. janito/llm/__init__.py +5 -0
  80. janito/llm/agent.py +443 -0
  81. janito/llm/auth.py +62 -0
  82. janito/llm/driver.py +239 -0
  83. janito/llm/driver_config.py +34 -0
  84. janito/llm/driver_config_builder.py +34 -0
  85. janito/llm/driver_input.py +12 -0
  86. janito/llm/message_parts.py +60 -0
  87. janito/llm/model.py +38 -0
  88. janito/llm/provider.py +187 -0
  89. janito/perf_singleton.py +3 -0
  90. janito/performance_collector.py +167 -0
  91. janito/provider_config.py +98 -0
  92. janito/provider_registry.py +152 -0
  93. janito/providers/__init__.py +7 -0
  94. janito/providers/anthropic/model_info.py +22 -0
  95. janito/providers/anthropic/provider.py +65 -0
  96. janito/providers/azure_openai/model_info.py +15 -0
  97. janito/providers/azure_openai/provider.py +72 -0
  98. janito/providers/deepseek/__init__.py +1 -0
  99. janito/providers/deepseek/model_info.py +16 -0
  100. janito/providers/deepseek/provider.py +91 -0
  101. janito/providers/google/__init__.py +1 -0
  102. janito/providers/google/model_info.py +40 -0
  103. janito/providers/google/provider.py +69 -0
  104. janito/providers/mistralai/model_info.py +37 -0
  105. janito/providers/mistralai/provider.py +69 -0
  106. janito/providers/openai/__init__.py +1 -0
  107. janito/providers/openai/model_info.py +137 -0
  108. janito/providers/openai/provider.py +107 -0
  109. janito/providers/openai/schema_generator.py +63 -0
  110. janito/providers/provider_static_info.py +21 -0
  111. janito/providers/registry.py +26 -0
  112. janito/report_events.py +38 -0
  113. janito/termweb/app.py +1 -1
  114. janito/tools/__init__.py +16 -0
  115. janito/tools/adapters/__init__.py +1 -0
  116. janito/tools/adapters/local/__init__.py +54 -0
  117. janito/tools/adapters/local/adapter.py +92 -0
  118. janito/{agent/tools → tools/adapters/local}/ask_user.py +30 -13
  119. janito/tools/adapters/local/copy_file.py +84 -0
  120. janito/{agent/tools → tools/adapters/local}/create_directory.py +11 -10
  121. janito/tools/adapters/local/create_file.py +82 -0
  122. janito/tools/adapters/local/delete_text_in_file.py +136 -0
  123. janito/{agent/tools → tools/adapters/local}/fetch_url.py +18 -19
  124. janito/tools/adapters/local/find_files.py +140 -0
  125. janito/tools/adapters/local/get_file_outline/core.py +151 -0
  126. janito/{agent/tools → tools/adapters/local}/get_file_outline/python_outline.py +125 -0
  127. janito/tools/adapters/local/get_file_outline/python_outline_v2.py +156 -0
  128. janito/{agent/tools → tools/adapters/local}/get_file_outline/search_outline.py +12 -7
  129. janito/{agent/tools → tools/adapters/local}/move_file.py +13 -9
  130. janito/{agent/tools → tools/adapters/local}/open_url.py +7 -5
  131. janito/tools/adapters/local/python_code_run.py +165 -0
  132. janito/tools/adapters/local/python_command_run.py +163 -0
  133. janito/tools/adapters/local/python_file_run.py +162 -0
  134. janito/{agent/tools → tools/adapters/local}/remove_directory.py +15 -9
  135. janito/{agent/tools → tools/adapters/local}/remove_file.py +17 -14
  136. janito/{agent/tools → tools/adapters/local}/replace_text_in_file.py +27 -22
  137. janito/tools/adapters/local/run_bash_command.py +176 -0
  138. janito/tools/adapters/local/run_powershell_command.py +219 -0
  139. janito/{agent/tools → tools/adapters/local}/search_text/core.py +32 -12
  140. janito/{agent/tools → tools/adapters/local}/search_text/match_lines.py +13 -4
  141. janito/{agent/tools → tools/adapters/local}/search_text/pattern_utils.py +12 -4
  142. janito/{agent/tools → tools/adapters/local}/search_text/traverse_directory.py +15 -2
  143. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/core.py +12 -11
  144. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/css_validator.py +1 -1
  145. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/html_validator.py +1 -1
  146. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/js_validator.py +1 -1
  147. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/json_validator.py +1 -1
  148. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/markdown_validator.py +1 -1
  149. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/ps1_validator.py +1 -1
  150. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/python_validator.py +1 -1
  151. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/xml_validator.py +1 -1
  152. janito/{agent/tools → tools/adapters/local}/validate_file_syntax/yaml_validator.py +1 -1
  153. janito/{agent/tools/get_lines.py → tools/adapters/local/view_file.py} +45 -27
  154. janito/tools/inspect_registry.py +17 -0
  155. janito/tools/tool_base.py +105 -0
  156. janito/tools/tool_events.py +58 -0
  157. janito/tools/tool_run_exception.py +12 -0
  158. janito/{agent → tools}/tool_use_tracker.py +2 -4
  159. janito/{agent/tools_utils/utils.py → tools/tool_utils.py} +18 -9
  160. janito/tools/tools_adapter.py +207 -0
  161. janito/tools/tools_schema.py +104 -0
  162. janito/utils.py +11 -0
  163. janito/version.py +4 -0
  164. janito-2.0.0.dist-info/METADATA +232 -0
  165. janito-2.0.0.dist-info/RECORD +180 -0
  166. janito/agent/__init__.py +0 -0
  167. janito/agent/api_exceptions.py +0 -4
  168. janito/agent/config.py +0 -147
  169. janito/agent/config_defaults.py +0 -12
  170. janito/agent/config_utils.py +0 -0
  171. janito/agent/content_handler.py +0 -0
  172. janito/agent/conversation.py +0 -238
  173. janito/agent/conversation_api.py +0 -306
  174. janito/agent/conversation_exceptions.py +0 -18
  175. janito/agent/conversation_tool_calls.py +0 -39
  176. janito/agent/conversation_ui.py +0 -17
  177. janito/agent/event.py +0 -24
  178. janito/agent/event_dispatcher.py +0 -24
  179. janito/agent/event_handler_protocol.py +0 -5
  180. janito/agent/event_system.py +0 -15
  181. janito/agent/llm_conversation_history.py +0 -82
  182. janito/agent/message_handler.py +0 -20
  183. janito/agent/message_handler_protocol.py +0 -5
  184. janito/agent/openai_client.py +0 -149
  185. janito/agent/openai_schema_generator.py +0 -187
  186. janito/agent/profile_manager.py +0 -96
  187. janito/agent/queued_message_handler.py +0 -50
  188. janito/agent/rich_live.py +0 -32
  189. janito/agent/rich_message_handler.py +0 -115
  190. janito/agent/runtime_config.py +0 -36
  191. janito/agent/test_handler_protocols.py +0 -47
  192. janito/agent/test_openai_schema_generator.py +0 -93
  193. janito/agent/tests/__init__.py +0 -1
  194. janito/agent/tool_base.py +0 -63
  195. janito/agent/tool_executor.py +0 -122
  196. janito/agent/tool_registry.py +0 -49
  197. janito/agent/tools/__init__.py +0 -47
  198. janito/agent/tools/create_file.py +0 -59
  199. janito/agent/tools/delete_text_in_file.py +0 -97
  200. janito/agent/tools/find_files.py +0 -106
  201. janito/agent/tools/get_file_outline/core.py +0 -81
  202. janito/agent/tools/present_choices.py +0 -64
  203. janito/agent/tools/python_command_runner.py +0 -201
  204. janito/agent/tools/python_file_runner.py +0 -199
  205. janito/agent/tools/python_stdin_runner.py +0 -208
  206. janito/agent/tools/replace_file.py +0 -72
  207. janito/agent/tools/run_bash_command.py +0 -218
  208. janito/agent/tools/run_powershell_command.py +0 -251
  209. janito/agent/tools_utils/__init__.py +0 -1
  210. janito/agent/tools_utils/action_type.py +0 -7
  211. janito/agent/tools_utils/test_gitignore_utils.py +0 -46
  212. janito/cli/_livereload_log_utils.py +0 -13
  213. janito/cli/_print_config.py +0 -96
  214. janito/cli/_termweb_log_utils.py +0 -17
  215. janito/cli/_utils.py +0 -9
  216. janito/cli/arg_parser.py +0 -272
  217. janito/cli/cli_main.py +0 -281
  218. janito/cli/config_commands.py +0 -211
  219. janito/cli/config_runner.py +0 -35
  220. janito/cli/formatting_runner.py +0 -12
  221. janito/cli/livereload_starter.py +0 -60
  222. janito/cli/logging_setup.py +0 -38
  223. janito/cli/one_shot.py +0 -80
  224. janito/livereload/app.py +0 -25
  225. janito/rich_utils.py +0 -59
  226. janito/shell/__init__.py +0 -0
  227. janito/shell/commands/__init__.py +0 -61
  228. janito/shell/commands/config.py +0 -22
  229. janito/shell/commands/edit.py +0 -24
  230. janito/shell/commands/history_view.py +0 -18
  231. janito/shell/commands/lang.py +0 -19
  232. janito/shell/commands/livelogs.py +0 -42
  233. janito/shell/commands/prompt.py +0 -62
  234. janito/shell/commands/termweb_log.py +0 -94
  235. janito/shell/commands/tools.py +0 -26
  236. janito/shell/commands/track.py +0 -36
  237. janito/shell/main.py +0 -326
  238. janito/shell/prompt/load_prompt.py +0 -57
  239. janito/shell/prompt/session_setup.py +0 -57
  240. janito/shell/session/config.py +0 -109
  241. janito/shell/session/history.py +0 -0
  242. janito/shell/ui/interactive.py +0 -226
  243. janito/termweb/static/editor.css +0 -158
  244. janito/termweb/static/editor.css.bak +0 -145
  245. janito/termweb/static/editor.html +0 -46
  246. janito/termweb/static/editor.html.bak +0 -46
  247. janito/termweb/static/editor.js +0 -265
  248. janito/termweb/static/editor.js.bak +0 -259
  249. janito/termweb/static/explorer.html.bak +0 -59
  250. janito/termweb/static/favicon.ico +0 -0
  251. janito/termweb/static/favicon.ico.bak +0 -0
  252. janito/termweb/static/index.html +0 -53
  253. janito/termweb/static/index.html.bak +0 -54
  254. janito/termweb/static/index.html.bak.bak +0 -175
  255. janito/termweb/static/landing.html.bak +0 -36
  256. janito/termweb/static/termicon.svg +0 -1
  257. janito/termweb/static/termweb.css +0 -214
  258. janito/termweb/static/termweb.css.bak +0 -237
  259. janito/termweb/static/termweb.js +0 -162
  260. janito/termweb/static/termweb.js.bak +0 -168
  261. janito/termweb/static/termweb.js.bak.bak +0 -157
  262. janito/termweb/static/termweb_quickopen.js +0 -135
  263. janito/termweb/static/termweb_quickopen.js.bak +0 -125
  264. janito/tests/test_rich_utils.py +0 -44
  265. janito/web/__init__.py +0 -0
  266. janito/web/__main__.py +0 -25
  267. janito/web/app.py +0 -145
  268. janito-1.14.3.dist-info/METADATA +0 -313
  269. janito-1.14.3.dist-info/RECORD +0 -162
  270. janito-1.14.3.dist-info/licenses/LICENSE +0 -21
  271. /janito/{shell → cli/chat_mode/shell}/input_history.py +0 -0
  272. /janito/{shell/commands/session.py → cli/chat_mode/shell/session/history.py} +0 -0
  273. /janito/{agent/tools_utils/formatting.py → formatting.py} +0 -0
  274. /janito/{agent/tools_utils/gitignore_utils.py → gitignore_utils.py} +0 -0
  275. /janito/{agent/platform_discovery.py → platform_discovery.py} +0 -0
  276. /janito/{agent/tools → tools/adapters/local}/get_file_outline/__init__.py +0 -0
  277. /janito/{agent/tools → tools/adapters/local}/get_file_outline/markdown_outline.py +0 -0
  278. /janito/{agent/tools → tools/adapters/local}/search_text/__init__.py +0 -0
  279. /janito/{agent/tools → tools/adapters/local}/validate_file_syntax/__init__.py +0 -0
  280. {janito-1.14.3.dist-info → janito-2.0.0.dist-info}/WHEEL +0 -0
  281. {janito-1.14.3.dist-info → janito-2.0.0.dist-info}/entry_points.txt +0 -0
  282. {janito-1.14.3.dist-info → janito-2.0.0.dist-info}/top_level.txt +0 -0
File without changes
File without changes
@@ -1,53 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>TermWeb &mdash; janito.dev</title>
6
- <link rel="icon" type="image/svg+xml" href="/static/termicon.svg">
7
- <link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico">
8
- <link rel="stylesheet" href="/static/termweb.css">
9
- <!-- CodeMirror CSS -->
10
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.13/codemirror.min.css">
11
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.13/theme/dracula.min.css">
12
- </head>
13
- <body>
14
- <!-- Quick Open Modal (Ctrl+P) -->
15
- <div id="quickopen-modal" style="display:none;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1000;background:rgba(0,0,0,0.35);align-items:center;justify-content:center;">
16
- <div style="background:#222;padding:2em 2em 1em 2em;border-radius:1em;box-shadow:0 8px 32px #000a;min-width:340px;max-width:90vw;">
17
- <input id="quickopen-input" type="text" placeholder="Type to search files..." autocomplete="off" />
18
- <ul id="quickopen-results"></ul>
19
- <div style="text-align:right;margin-top:0.5em;"><small>Pressione Esc para fechar</small></div>
20
- </div>
21
- </div>
22
-
23
- <div class="header">
24
- <img src="/static/termicon.svg" alt="TermWeb Logo" class="header-logo">
25
- <span class="header-title">TermWeb</span>
26
- <span class="header-subtitle">Explorador de Projetos com IA</span>
27
- </div>
28
- <div class="toolbar" id="explorer-toolbar">
29
-
30
- </div>
31
- <div class="main">
32
- <div id="explorer-main"></div>
33
- <div id="explorer-preview" class="preview-pane"></div>
34
- </div>
35
- <div class="footer">
36
- <div class="subtitle">
37
- Desenvolvido por <a href="https://janito.dev" target="_blank">janito.dev</a> &mdash; agente de programação com IA
38
- </div>
39
- <ul>
40
- <li>🌐 <a href="https://janito.dev" target="_blank">janito.dev</a></li>
41
- <li>📚 <a href="https://docs.janito.dev" target="_blank">Documentação</a></li>
42
- <li>💻 <a href="https://github.com/joaompinto/janito" target="_blank">GitHub</a></li>
43
- </ul>
44
- <span style="font-size:0.9em;opacity:0.7;">_generated by janito.dev_</span>
45
- </div>
46
- <script src="/static/termweb.js"></script>
47
- <script src="/static/termweb_quickopen.js"></script>
48
- <!-- CodeMirror JS -->
49
- <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.13/codemirror.min.js"></script>
50
- <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.13/mode/python/python.min.js"></script>
51
- <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.13/theme/dracula.min.js"></script>
52
- </body>
53
- </html>
@@ -1,54 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title>TermWeb &mdash; janito.dev</title>
6
- <link rel="icon" type="image/svg+xml" href="/static/termicon.svg">
7
- <link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico">
8
- <link rel="stylesheet" href="/static/termweb.css">
9
- <!-- CodeMirror CSS -->
10
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.13/codemirror.min.css">
11
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.13/theme/dracula.min.css">
12
- </head>
13
- <body>
14
- <!-- Quick Open Modal (Ctrl+P) -->
15
- <div id="quickopen-modal" style="display:none;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1000;background:rgba(0,0,0,0.35);align-items:center;justify-content:center;">
16
- <div style="background:#222;padding:2em 2em 1em 2em;border-radius:1em;box-shadow:0 8px 32px #000a;min-width:340px;max-width:90vw;">
17
- <input id="quickopen-input" type="text" placeholder="Type to search files..." autocomplete="off" />
18
- <ul id="quickopen-results"></ul>
19
- <div style="text-align:right;margin-top:0.5em;"><small>Pressione Esc para fechar</small></div>
20
- </div>
21
- </div>
22
-
23
- <div class="header">
24
- <img src="/static/termicon.svg" alt="TermWeb Logo" class="header-logo">
25
- <span class="header-title">TermWeb</span>
26
- <span class="header-subtitle">Explorador de Projetos com IA</span>
27
- <button class="theme-switcher" id="theme-switcher" title="Alternate tema"><span id="theme-icon">🌙</span></button>
28
- </div>
29
- <div class="toolbar" id="explorer-toolbar">
30
-
31
- </div>
32
- <div class="main">
33
- <div id="explorer-main"></div>
34
- <div id="explorer-preview" class="preview-pane"></div>
35
- </div>
36
- <div class="footer">
37
- <div class="subtitle">
38
- Desenvolvido por <a href="https://janito.dev" target="_blank">janito.dev</a> &mdash; agente de programação com IA
39
- </div>
40
- <ul>
41
- <li>🌐 <a href="https://janito.dev" target="_blank">janito.dev</a></li>
42
- <li>📚 <a href="https://docs.janito.dev" target="_blank">Documentação</a></li>
43
- <li>💻 <a href="https://github.com/joaompinto/janito" target="_blank">GitHub</a></li>
44
- </ul>
45
- <span style="font-size:0.9em;opacity:0.7;">_generated by janito.dev_</span>
46
- </div>
47
- <script src="/static/termweb.js"></script>
48
- <script src="/static/termweb_quickopen.js"></script>
49
- <!-- CodeMirror JS -->
50
- <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.13/codemirror.min.js"></script>
51
- <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.13/mode/python/python.min.js"></script>
52
- <script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.13/theme/dracula.min.js"></script>
53
- </body>
54
- </html>
@@ -1,175 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <link rel="icon" type="image/svg+xml" href="/static/termicon.svg">
5
- <link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico">
6
- <meta charset="UTF-8">
7
- <title>Welcome to TermWeb &mdash; janito.dev</title>
8
- <link rel="stylesheet" href="/static/termweb.css">
9
- <style>
10
- /* Additional enhancements */
11
- .header {
12
- display: flex;
13
- align-items: center;
14
- justify-content: flex-start;
15
- gap: 1.2em;
16
- position: relative;
17
- padding-top: 1.2em;
18
- padding-bottom: 1.2em;
19
- }
20
- .header-logo {
21
- width: 2.4em;
22
- height: 2.4em;
23
- margin-right: 0.5em;
24
- vertical-align: middle;
25
- }
26
- .header-title {
27
- font-size: 1.7em;
28
- font-weight: bold;
29
- letter-spacing: 0.04em;
30
- color: #8be9fd;
31
- text-shadow: 0 2px 8px #222a, 0 1px 0 #222a;
32
- }
33
- .header-subtitle {
34
- font-size: 1.1em;
35
- font-weight: 400;
36
- opacity: 0.7;
37
- margin-left: 0.5em;
38
- color: #90caf9;
39
- }
40
- .toolbar {
41
- display: flex;
42
- justify-content: flex-end;
43
- align-items: center;
44
- gap: 0.7em;
45
- background: #23272b;
46
- border-bottom: 1px solid #1a73e8;
47
- padding: 0.7em 2em;
48
- margin-bottom: 0.5em;
49
- box-shadow: 0 2px 8px #0002;
50
- }
51
- .view-toggle {
52
- background: #23272b;
53
- color: #90caf9;
54
- border: 1px solid #1a73e8;
55
- border-radius: 0.5em;
56
- padding: 0.5em 1.2em;
57
- font-size: 1.1em;
58
- cursor: pointer;
59
- transition: background 0.15s, color 0.15s, box-shadow 0.15s;
60
- margin-left: 0.2em;
61
- }
62
- .view-toggle.active, .view-toggle:hover {
63
- background: #1a73e8;
64
- color: #fff;
65
- box-shadow: 0 2px 8px #1976d255;
66
- }
67
- .main {
68
- display: flex;
69
- flex-direction: row;
70
- gap: 2em;
71
- padding: 2em;
72
- min-height: 60vh;
73
- background: transparent;
74
- }
75
- #explorer-main, #explorer-preview {
76
- background: #22262b;
77
- border-radius: 1.1em;
78
- box-shadow: 0 4px 24px #0004;
79
- border: 1px solid #1a73e8;
80
- padding: 1.5em 1.2em;
81
- min-height: 40vh;
82
- overflow: auto;
83
- }
84
- #explorer-main {
85
- margin-right: 0.5em;
86
- }
87
- #explorer-preview {
88
- margin-left: 0.5em;
89
- }
90
- @media (max-width: 900px) {
91
- .main {
92
- flex-direction: column;
93
- gap: 1em;
94
- padding: 1em;
95
- }
96
- #explorer-main, #explorer-preview {
97
- min-height: 20vh;
98
- padding: 1em 0.7em;
99
- }
100
- }
101
- </style>
102
- </head>
103
- <body>
104
- <!-- Quick Open Modal (Ctrl+P) -->
105
- <div id="quickopen-modal" style="display:none;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1000;background:rgba(0,0,0,0.35);align-items:center;justify-content:center;">
106
- <div style="background:#222;padding:2em 2em 1em 2em;border-radius:1em;box-shadow:0 8px 32px #000a;min-width:340px;max-width:90vw;">
107
- <input id="quickopen-input" type="text" placeholder="Type to search files..." style="width:100%;padding:0.7em 1em;font-size:1.1em;background:#111;color:#fff;border:1px solid #444;border-radius:0.5em;outline:none;" autocomplete="off" />
108
- <ul id="quickopen-results" style="margin:1em 0 0 0;padding:0;list-style:none;max-height:260px;overflow-y:auto;"></ul>
109
- <div style="text-align:right;margin-top:0.5em;"><small>Press Esc to close</small></div>
110
- </div>
111
- </div>
112
-
113
- <div class="header">
114
- <img src="/static/termicon.svg" alt="TermWeb Logo" class="header-logo">
115
- <span class="header-title">TermWeb</span>
116
- <span class="header-subtitle">AI-powered Project Explorer</span>
117
- <button class="theme-switcher" id="theme-switcher">Switch to Light Theme</button>
118
- </div>
119
- <div class="toolbar" id="explorer-toolbar">
120
- <button id="view-list" class="view-toggle active" title="List View">&#9776; List</button>
121
- <button id="view-icons" class="view-toggle" title="Icon View">&#9632; Icons</button>
122
- </div>
123
- <div class="main">
124
- <div id="explorer-main" style="flex:0 0 440px;min-width:0;"></div>
125
- <div id="explorer-preview" class="preview-pane" style="flex:1 1 0;min-width:0;display:flex;flex-direction:column;"></div>
126
- </div>
127
- <div class="footer">
128
- <div class="subtitle">
129
- Powered by <a href="https://janito.dev" target="_blank">janito.dev</a> &mdash; AI-powered coding agent
130
- </div>
131
- <ul>
132
- <li>🌐 <a href="https://janito.dev" target="_blank">janito.dev</a></li>
133
- <li>📚 <a href="https://docs.janito.dev" target="_blank">Documentation</a></li>
134
- <li>💻 <a href="https://github.com/joaompinto/janito" target="_blank">GitHub</a></li>
135
- </ul>
136
- <span style="font-size:0.9em;opacity:0.7;">_generated by janito.dev_</span>
137
- </div>
138
- <script src="/static/termweb.js"></script>
139
- <script src="/static/termweb_quickopen.js"></script>
140
- <script>
141
- // Theme switcher logic
142
- function setTheme(dark) {
143
- if (dark) {
144
- document.body.classList.add('dark-theme');
145
- document.body.classList.remove('light-theme');
146
- localStorage.setItem('theme', 'dark');
147
- document.getElementById('theme-switcher').textContent = 'Switch to Light Theme';
148
- } else {
149
- document.body.classList.remove('dark-theme');
150
- document.body.classList.add('light-theme');
151
- localStorage.setItem('theme', 'light');
152
- document.getElementById('theme-switcher').textContent = 'Switch to Dark Theme';
153
- }
154
- }
155
- document.addEventListener('DOMContentLoaded', function() {
156
- // Initial theme
157
- var theme = localStorage.getItem('theme') || 'dark';
158
- setTheme(theme === 'dark');
159
- document.getElementById('theme-switcher').onclick = function() {
160
- setTheme(document.body.classList.contains('light-theme'));
161
- };
162
- renderExplorer('.')
163
- setExplorerView(localStorage.getItem('explorerView') || 'list');
164
- document.getElementById('view-list').onclick = function() {
165
- setExplorerView('list');
166
- renderExplorer('.')
167
- };
168
- document.getElementById('view-icons').onclick = function() {
169
- setExplorerView('icons');
170
- renderExplorer('.')
171
- };
172
- });
173
- </script>
174
- </body>
175
- </html>
@@ -1,36 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <link rel="icon" type="image/svg+xml" href="/static/termicon.svg">
5
- <link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico">
6
- <meta charset="UTF-8">
7
- <title>Welcome to TermWeb &mdash; janito.dev</title>
8
- <link rel="stylesheet" href="/static/termweb.css">
9
- <script>
10
- // Automatically redirect to explorer on load
11
- window.onload = function() {
12
- window.location.href = '/explorer/.';
13
- };
14
- </script>
15
- </head>
16
- <body>
17
- <div class="header">
18
- Welcome to TermWeb
19
- </div>
20
- <div class="main" style="text-align:center;margin-top:60px;">
21
- <h2>AI-powered Coding Agent</h2>
22
- <!-- Directory explorer now loads automatically -->
23
- </div>
24
- <div class="footer">
25
- <div class="subtitle">
26
- Powered by <a href="https://janito.dev" target="_blank">janito.dev</a> &mdash; AI-powered coding agent
27
- </div>
28
- <ul>
29
- <li>🌐 <a href="https://janito.dev" target="_blank">janito.dev</a></li>
30
- <li>📚 <a href="https://docs.janito.dev" target="_blank">Documentation</a></li>
31
- <li>💻 <a href="https://github.com/joaompinto/janito" target="_blank">GitHub</a></li>
32
- </ul>
33
- <span style="font-size:0.9em;opacity:0.7;">_generated by janito.dev_</span>
34
- </div>
35
- </body>
36
- </html>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="12" fill="#222"/><text x="50%" y="50%" text-anchor="middle" dy=".35em" font-size="32" fill="#0f0" font-family="monospace">$</text></svg>
@@ -1,214 +0,0 @@
1
- /* --- Layout and Theme --- */
2
- html, body {
3
- height: 100%;
4
- margin: 0;
5
- padding: 0;
6
- }
7
- body {
8
- display: flex;
9
- flex-direction: column;
10
- min-height: 100vh;
11
- background: #181a1b;
12
- color: #f1f1f1;
13
- transition: background 0.2s, color 0.2s;
14
- }
15
- body.light-theme {
16
- background: #f5f5f5;
17
- color: #181a1b;
18
- }
19
-
20
- .header {
21
- background: #23272b;
22
- color: #f1f1f1;
23
- padding: 0.2em 2em 1em 2em;
24
- font-size: 1.5em;
25
- font-weight: bold;
26
- letter-spacing: 0.04em;
27
- border-bottom: 2px solid #1a73e8;
28
- position: relative;
29
- transition: background 0.2s, color 0.2s;
30
- }
31
- body.dark-theme .header {
32
- background: #181a1b;
33
- color: #f1f1f1;
34
- border-bottom: 2px solid #1976d2;
35
- }
36
- body.light-theme .header {
37
- background: #eaeaea;
38
- color: #181a1b;
39
- border-bottom: 2px solid #1565c0;
40
- }
41
-
42
- /* --- Enhanced Header --- */
43
- .header-logo {
44
- width: 2.4em;
45
- height: 2.4em;
46
- margin-right: 0.5em;
47
- vertical-align: middle;
48
- }
49
- .header-title {
50
- font-size: 1.7em;
51
- font-weight: bold;
52
- letter-spacing: 0.04em;
53
- color: #8be9fd;
54
- text-shadow: 0 2px 8px #222a, 0 1px 0 #222a;
55
- }
56
- .header-subtitle {
57
- font-size: 1.1em;
58
- font-weight: 400;
59
- opacity: 0.7;
60
- margin-left: 0.5em;
61
- color: #90caf9;
62
- }
63
-
64
- /* --- Explorer Entry Flex Alignment --- */
65
- .explorer-entry {
66
- display: flex;
67
- align-items: center;
68
- gap: 0.7em;
69
- }
70
- .explorer-icon {
71
- font-size: 1.2em;
72
- min-width: 1.6em;
73
- text-align: center;
74
- margin-right: 0.2em;
75
- }
76
- .explorer-name {
77
- font-size: 1em;
78
- word-break: break-all;
79
- }
80
-
81
- .main {
82
- flex: 1 1 auto;
83
- display: flex;
84
- flex-direction: row;
85
- gap: 2em;
86
- padding: 2em;
87
- min-height: 60vh;
88
- background: transparent;
89
- }
90
- #explorer-main, #explorer-preview {
91
- background: #22262b;
92
- border-radius: 1.1em;
93
- box-shadow: 0 4px 24px #0004;
94
- border: 1px solid #1a73e8;
95
- padding: 1.5em 1.2em;
96
- min-height: 40vh;
97
- overflow: auto;
98
- }
99
- #explorer-main {
100
- margin-right: 0.5em;
101
- }
102
- #explorer-preview {
103
- margin-left: 0.5em;
104
- display: flex;
105
- flex-direction: column;
106
- flex: 1 1 0;
107
- min-width: 0;
108
- }
109
-
110
- /* --- CodeMirror Integration for Preview --- */
111
- #explorer-codemirror-preview {
112
- flex: 1 1 auto;
113
- min-height: 0;
114
- min-width: 0;
115
- display: flex;
116
- flex-direction: column;
117
- }
118
- .CodeMirror {
119
- flex: 1 1 auto;
120
- height: 60vh !important;
121
- min-height: 0;
122
- font-size: 1.1em;
123
- background: #23272b;
124
- color: #f8f8f2;
125
- border-radius: 0.5em;
126
- border: none;
127
- transition: background 0.2s, color 0.2s;
128
- }
129
- body.light-theme .CodeMirror {
130
- background: #fff;
131
- color: #181a1b;
132
- }
133
-
134
- .footer {
135
- flex-shrink: 0;
136
- background: #23272b;
137
- color: #f1f1f1;
138
- padding: 1.2em 2em 1em 2em;
139
- font-size: 1em;
140
- border-top: 2px solid #1a73e8;
141
- text-align: center;
142
- display: flex;
143
- flex-direction: column;
144
- align-items: center;
145
- justify-content: center;
146
- position: fixed;
147
- left: 0;
148
- bottom: 0;
149
- width: 100%;
150
- z-index: 100;
151
- transition: background 0.2s, color 0.2s;
152
- }
153
- body.dark-theme .footer {
154
- background: #181a1b;
155
- color: #f1f1f1;
156
- border-top: 2px solid #1976d2;
157
- }
158
- body.light-theme .footer {
159
- background: #eaeaea;
160
- color: #181a1b;
161
- border-top: 2px solid #1565c0;
162
- }
163
- .footer a {
164
- color: #90caf9;
165
- text-decoration: underline;
166
- }
167
- body.light-theme .footer a {
168
- color: #1976d2;
169
- }
170
- .footer ul {
171
- list-style: none;
172
- padding: 0;
173
- margin: 0.5em 0 0 0;
174
- display: flex;
175
- gap: 1.5em;
176
- justify-content: center;
177
- align-items: center;
178
- }
179
- .footer li {
180
- display: inline;
181
- }
182
-
183
-
184
- /* Explorer file/dir links */
185
- .explorer-link, .explorer-link:visited {
186
- color: #90caf9;
187
- text-decoration: none;
188
- font-weight: 500;
189
- }
190
- body.light-theme .explorer-link, body.light-theme .explorer-link:visited {
191
- color: #1976d2;
192
- }
193
- .explorer-link:hover {
194
- text-decoration: underline;
195
- color: #42a5f5;
196
- }
197
- body.light-theme .explorer-link:hover {
198
- color: #1565c0;
199
- }
200
-
201
- @media (max-width: 900px) {
202
- .main {
203
- flex-direction: column;
204
- gap: 1em;
205
- padding: 1em;
206
- }
207
- #explorer-main, #explorer-preview {
208
- min-height: 20vh;
209
- padding: 1em 0.7em;
210
- }
211
- #explorer-preview {
212
- margin-left: 0;
213
- }
214
- }