janito 1.8.1__py3-none-any.whl → 1.10.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 (142) hide show
  1. janito/__init__.py +1 -1
  2. janito/agent/api_exceptions.py +4 -0
  3. janito/agent/config.py +1 -1
  4. janito/agent/config_defaults.py +2 -3
  5. janito/agent/config_utils.py +0 -9
  6. janito/agent/conversation.py +177 -114
  7. janito/agent/conversation_api.py +179 -159
  8. janito/agent/conversation_tool_calls.py +11 -8
  9. janito/agent/llm_conversation_history.py +70 -0
  10. janito/agent/openai_client.py +44 -21
  11. janito/agent/openai_schema_generator.py +164 -128
  12. janito/agent/platform_discovery.py +134 -77
  13. janito/agent/profile_manager.py +5 -5
  14. janito/agent/rich_message_handler.py +80 -31
  15. janito/agent/templates/profiles/system_prompt_template_base.txt.j2 +9 -8
  16. janito/agent/test_openai_schema_generator.py +93 -0
  17. janito/agent/tool_base.py +7 -2
  18. janito/agent/tool_executor.py +63 -50
  19. janito/agent/tool_registry.py +5 -2
  20. janito/agent/tool_use_tracker.py +42 -5
  21. janito/agent/tools/__init__.py +13 -12
  22. janito/agent/tools/create_directory.py +9 -6
  23. janito/agent/tools/create_file.py +35 -54
  24. janito/agent/tools/delete_text_in_file.py +97 -0
  25. janito/agent/tools/fetch_url.py +50 -5
  26. janito/agent/tools/find_files.py +40 -26
  27. janito/agent/tools/get_file_outline/__init__.py +1 -0
  28. janito/agent/tools/{outline_file/__init__.py → get_file_outline/core.py} +14 -18
  29. janito/agent/tools/get_file_outline/python_outline.py +134 -0
  30. janito/agent/tools/{search_outline.py → get_file_outline/search_outline.py} +11 -0
  31. janito/agent/tools/get_lines.py +21 -12
  32. janito/agent/tools/move_file.py +13 -12
  33. janito/agent/tools/present_choices.py +3 -1
  34. janito/agent/tools/python_command_runner.py +150 -0
  35. janito/agent/tools/python_file_runner.py +148 -0
  36. janito/agent/tools/python_stdin_runner.py +154 -0
  37. janito/agent/tools/remove_directory.py +4 -2
  38. janito/agent/tools/remove_file.py +15 -13
  39. janito/agent/tools/replace_file.py +72 -0
  40. janito/agent/tools/replace_text_in_file.py +7 -5
  41. janito/agent/tools/run_bash_command.py +29 -72
  42. janito/agent/tools/run_powershell_command.py +142 -102
  43. janito/agent/tools/search_text.py +177 -131
  44. janito/agent/tools/validate_file_syntax/__init__.py +1 -0
  45. janito/agent/tools/validate_file_syntax/core.py +94 -0
  46. janito/agent/tools/validate_file_syntax/css_validator.py +35 -0
  47. janito/agent/tools/validate_file_syntax/html_validator.py +77 -0
  48. janito/agent/tools/validate_file_syntax/js_validator.py +27 -0
  49. janito/agent/tools/validate_file_syntax/json_validator.py +6 -0
  50. janito/agent/tools/validate_file_syntax/markdown_validator.py +66 -0
  51. janito/agent/tools/validate_file_syntax/ps1_validator.py +32 -0
  52. janito/agent/tools/validate_file_syntax/python_validator.py +5 -0
  53. janito/agent/tools/validate_file_syntax/xml_validator.py +11 -0
  54. janito/agent/tools/validate_file_syntax/yaml_validator.py +6 -0
  55. janito/agent/tools_utils/__init__.py +1 -0
  56. janito/agent/tools_utils/action_type.py +7 -0
  57. janito/agent/tools_utils/dir_walk_utils.py +24 -0
  58. janito/agent/tools_utils/formatting.py +49 -0
  59. janito/agent/tools_utils/gitignore_utils.py +69 -0
  60. janito/agent/tools_utils/test_gitignore_utils.py +46 -0
  61. janito/agent/tools_utils/utils.py +30 -0
  62. janito/cli/_livereload_log_utils.py +13 -0
  63. janito/cli/_print_config.py +63 -61
  64. janito/cli/arg_parser.py +57 -14
  65. janito/cli/cli_main.py +270 -0
  66. janito/cli/livereload_starter.py +60 -0
  67. janito/cli/main.py +166 -99
  68. janito/cli/one_shot.py +80 -0
  69. janito/cli/termweb_starter.py +2 -2
  70. janito/i18n/__init__.py +1 -1
  71. janito/livereload/app.py +25 -0
  72. janito/rich_utils.py +41 -25
  73. janito/{cli_chat_shell → shell}/commands/__init__.py +19 -14
  74. janito/{cli_chat_shell → shell}/commands/config.py +4 -4
  75. janito/shell/commands/conversation_restart.py +74 -0
  76. janito/shell/commands/edit.py +24 -0
  77. janito/shell/commands/history_view.py +18 -0
  78. janito/{cli_chat_shell → shell}/commands/lang.py +3 -0
  79. janito/shell/commands/livelogs.py +42 -0
  80. janito/{cli_chat_shell → shell}/commands/prompt.py +16 -6
  81. janito/shell/commands/session.py +35 -0
  82. janito/{cli_chat_shell → shell}/commands/session_control.py +3 -5
  83. janito/{cli_chat_shell → shell}/commands/termweb_log.py +18 -10
  84. janito/shell/commands/tools.py +26 -0
  85. janito/shell/commands/track.py +36 -0
  86. janito/shell/commands/utility.py +28 -0
  87. janito/{cli_chat_shell → shell}/commands/verbose.py +4 -5
  88. janito/shell/commands.py +40 -0
  89. janito/shell/input_history.py +62 -0
  90. janito/shell/main.py +257 -0
  91. janito/{cli_chat_shell/shell_command_completer.py → shell/prompt/completer.py} +1 -1
  92. janito/{cli_chat_shell/chat_ui.py → shell/prompt/session_setup.py} +19 -5
  93. janito/shell/session/manager.py +101 -0
  94. janito/{cli_chat_shell/ui.py → shell/ui/interactive.py} +23 -17
  95. janito/termweb/app.py +3 -3
  96. janito/termweb/static/editor.css +142 -0
  97. janito/termweb/static/editor.css.bak +27 -0
  98. janito/termweb/static/editor.html +15 -213
  99. janito/termweb/static/editor.html.bak +16 -215
  100. janito/termweb/static/editor.js +209 -0
  101. janito/termweb/static/editor.js.bak +227 -0
  102. janito/termweb/static/index.html +2 -3
  103. janito/termweb/static/index.html.bak +2 -3
  104. janito/termweb/static/termweb.css.bak +33 -84
  105. janito/termweb/static/termweb.js +15 -34
  106. janito/termweb/static/termweb.js.bak +18 -36
  107. janito/tests/test_rich_utils.py +44 -0
  108. janito/web/app.py +0 -75
  109. {janito-1.8.1.dist-info → janito-1.10.0.dist-info}/METADATA +62 -42
  110. janito-1.10.0.dist-info/RECORD +158 -0
  111. {janito-1.8.1.dist-info → janito-1.10.0.dist-info}/WHEEL +1 -1
  112. janito/agent/tools/dir_walk_utils.py +0 -16
  113. janito/agent/tools/gitignore_utils.py +0 -46
  114. janito/agent/tools/memory.py +0 -48
  115. janito/agent/tools/outline_file/formatting.py +0 -20
  116. janito/agent/tools/outline_file/python_outline.py +0 -71
  117. janito/agent/tools/present_choices_test.py +0 -18
  118. janito/agent/tools/rich_live.py +0 -44
  119. janito/agent/tools/run_python_command.py +0 -163
  120. janito/agent/tools/tools_utils.py +0 -56
  121. janito/agent/tools/utils.py +0 -33
  122. janito/agent/tools/validate_file_syntax.py +0 -163
  123. janito/cli/runner/cli_main.py +0 -180
  124. janito/cli_chat_shell/chat_loop.py +0 -163
  125. janito/cli_chat_shell/chat_state.py +0 -38
  126. janito/cli_chat_shell/commands/history_start.py +0 -37
  127. janito/cli_chat_shell/commands/session.py +0 -48
  128. janito/cli_chat_shell/commands/sum.py +0 -49
  129. janito/cli_chat_shell/commands/utility.py +0 -32
  130. janito/cli_chat_shell/session_manager.py +0 -72
  131. janito-1.8.1.dist-info/RECORD +0 -127
  132. /janito/agent/tools/{outline_file → get_file_outline}/markdown_outline.py +0 -0
  133. /janito/cli/{runner/_termweb_log_utils.py → _termweb_log_utils.py} +0 -0
  134. /janito/cli/{runner/config.py → config_runner.py} +0 -0
  135. /janito/cli/{runner/formatting.py → formatting_runner.py} +0 -0
  136. /janito/{cli/runner → shell}/__init__.py +0 -0
  137. /janito/{cli_chat_shell → shell/prompt}/load_prompt.py +0 -0
  138. /janito/{cli_chat_shell/config_shell.py → shell/session/config.py} +0 -0
  139. /janito/{cli_chat_shell/__init__.py → shell/session/history.py} +0 -0
  140. {janito-1.8.1.dist-info → janito-1.10.0.dist-info}/entry_points.txt +0 -0
  141. {janito-1.8.1.dist-info → janito-1.10.0.dist-info}/licenses/LICENSE +0 -0
  142. {janito-1.8.1.dist-info → janito-1.10.0.dist-info}/top_level.txt +0 -0
@@ -1,163 +0,0 @@
1
- from janito.agent.rich_message_handler import RichMessageHandler
2
- from .chat_state import load_chat_state, save_chat_state
3
- from .chat_ui import setup_prompt_session, print_welcome_message
4
- from .commands import handle_command
5
- from janito.agent.conversation_exceptions import EmptyResponseError, ProviderError
6
-
7
- # Track the active prompt session for cleanup
8
- active_prompt_session = None
9
-
10
-
11
- def start_chat_shell(
12
- profile_manager,
13
- continue_session=False,
14
- max_rounds=50,
15
- termweb_stdout_path=None,
16
- termweb_stderr_path=None,
17
- ):
18
- import janito.i18n as i18n
19
- from janito.agent.runtime_config import runtime_config
20
-
21
- i18n.set_locale(runtime_config.get("lang", "en"))
22
- global active_prompt_session
23
- agent = profile_manager.agent
24
- message_handler = RichMessageHandler()
25
- console = message_handler.console
26
-
27
- # Load state
28
- state = load_chat_state(continue_session)
29
- if termweb_stdout_path:
30
- state["termweb_stdout_path"] = termweb_stdout_path
31
- if termweb_stderr_path:
32
- state["termweb_stderr_path"] = termweb_stderr_path
33
- messages = state["messages"]
34
- mem_history = state["mem_history"]
35
- last_usage_info_ref = {"value": state["last_usage_info"]}
36
- last_elapsed = state["last_elapsed"]
37
-
38
- # Add system prompt if needed (skip in vanilla mode)
39
- from janito.agent.runtime_config import runtime_config
40
-
41
- if (
42
- profile_manager.system_prompt_template
43
- and (
44
- not runtime_config.get("vanilla_mode", False)
45
- or runtime_config.get("system_prompt_template")
46
- )
47
- and not any(m.get("role") == "system" for m in messages)
48
- ):
49
- messages.insert(0, {"role": "system", "content": agent.system_prompt_template})
50
-
51
- print_welcome_message(console, continued=continue_session)
52
-
53
- session = setup_prompt_session(
54
- messages, last_usage_info_ref, last_elapsed, mem_history, profile_manager, agent
55
- )
56
- active_prompt_session = session
57
-
58
- inject_message = state.get("inject_message")
59
- if "inject_message" in state:
60
- del state["inject_message"]
61
-
62
- while True:
63
- try:
64
- if inject_message is not None:
65
- user_input = inject_message
66
- inject_message = None
67
- was_paste_mode = False
68
- elif state.get("paste_mode"):
69
- console.print("")
70
- user_input = session.prompt("Multiline> ", multiline=True)
71
- was_paste_mode = True
72
- state["paste_mode"] = False
73
- else:
74
- from prompt_toolkit.formatted_text import HTML
75
-
76
- user_input = session.prompt(
77
- HTML("<inputline>💬 </inputline>"), multiline=False
78
- )
79
- was_paste_mode = False
80
- except EOFError:
81
- console.print("\n[bold red]Exiting...[/bold red]")
82
- break
83
- except KeyboardInterrupt:
84
- console.print() # Move to next line
85
- try:
86
- confirm = (
87
- session.prompt(
88
- # Use <inputline> for full-line blue background, <prompt> for icon only
89
- HTML(
90
- "<inputline>Do you really want to exit? (y/n): </inputline>"
91
- )
92
- )
93
- .strip()
94
- .lower()
95
- )
96
- except KeyboardInterrupt:
97
- message_handler.handle_message(
98
- {"type": "error", "message": "Exiting..."}
99
- )
100
- break
101
- if confirm == "y":
102
- message_handler.handle_message(
103
- {"type": "error", "message": "Exiting..."}
104
- )
105
- break
106
- else:
107
- continue
108
-
109
- cmd_input = user_input.strip().lower()
110
- if not was_paste_mode and (cmd_input.startswith("/") or cmd_input == "exit"):
111
- # Treat both '/exit' and 'exit' as commands
112
- result = handle_command(
113
- user_input.strip(),
114
- console,
115
- profile_manager=profile_manager,
116
- agent=agent,
117
- messages=messages,
118
- mem_history=mem_history,
119
- state=state,
120
- )
121
- if result == "exit":
122
- break
123
- continue
124
-
125
- if not user_input.strip():
126
- continue
127
-
128
- mem_history.append_string(user_input)
129
- messages.append({"role": "user", "content": user_input})
130
-
131
- import time
132
-
133
- start_time = time.time()
134
-
135
- # No need to propagate verbose; ToolExecutor and others fetch from runtime_config
136
-
137
- try:
138
- response = profile_manager.agent.chat(
139
- messages,
140
- max_rounds=max_rounds,
141
- message_handler=message_handler,
142
- spinner=True,
143
- )
144
- except KeyboardInterrupt:
145
- message_handler.handle_message(
146
- {"type": "info", "message": "Request interrupted. Returning to prompt."}
147
- )
148
- continue
149
- except ProviderError as e:
150
- message_handler.handle_message(
151
- {"type": "error", "message": f"Provider error: {e}"}
152
- )
153
- continue
154
- except EmptyResponseError as e:
155
- message_handler.handle_message({"type": "error", "message": f"Error: {e}"})
156
- continue
157
- last_elapsed = time.time() - start_time
158
-
159
- usage = response.get("usage")
160
- last_usage_info_ref["value"] = usage
161
-
162
- # Save conversation and input history
163
- save_chat_state(messages, mem_history, last_usage_info_ref["value"])
@@ -1,38 +0,0 @@
1
- from .session_manager import (
2
- load_last_conversation,
3
- load_input_history,
4
- save_conversation,
5
- save_input_history,
6
- )
7
- from prompt_toolkit.history import InMemoryHistory
8
-
9
-
10
- def load_chat_state(continue_session: bool):
11
- messages = []
12
- last_usage_info = {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0}
13
- last_elapsed = None
14
- history_list = load_input_history()
15
- mem_history = InMemoryHistory()
16
- for item in history_list:
17
- mem_history.append_string(item)
18
- if continue_session:
19
- msgs, prompts, usage = load_last_conversation()
20
- messages = msgs
21
- last_usage_info = usage
22
- mem_history = InMemoryHistory()
23
- for item in prompts:
24
- mem_history.append_string(item)
25
- state = {
26
- "messages": messages,
27
- "mem_history": mem_history,
28
- "history_list": history_list,
29
- "last_usage_info": last_usage_info,
30
- "last_elapsed": last_elapsed,
31
- }
32
- return state
33
-
34
-
35
- def save_chat_state(messages, mem_history, last_usage_info):
36
- prompts = [h for h in mem_history.get_strings()]
37
- save_conversation(messages, prompts, last_usage_info)
38
- save_input_history(prompts)
@@ -1,37 +0,0 @@
1
- from prompt_toolkit.history import InMemoryHistory
2
- import os
3
-
4
-
5
- def handle_start(console, state, **kwargs):
6
-
7
- save_path = os.path.join(".janito", "last_conversation.json")
8
-
9
- # Clear the terminal screen
10
- os.system("cls" if os.name == "nt" else "clear")
11
-
12
- # Clear in-memory conversation and prompt history
13
- state["messages"].clear()
14
- state["history_list"].clear()
15
- state["mem_history"] = InMemoryHistory()
16
- state["last_usage_info"] = {
17
- "prompt_tokens": 0,
18
- "completion_tokens": 0,
19
- "total_tokens": 0,
20
- }
21
- state["last_elapsed"] = None
22
-
23
- # Delete saved conversation file if exists
24
- if os.path.exists(save_path):
25
- try:
26
- os.remove(save_path)
27
- console.print(
28
- "[bold yellow]Deleted saved conversation history.[/bold yellow]"
29
- )
30
- except Exception as e:
31
- console.print(
32
- f"[bold red]Failed to delete saved conversation:[/bold red] {e}"
33
- )
34
-
35
- console.print(
36
- "[bold green]Conversation history has been started (context reset).[/bold green]"
37
- )
@@ -1,48 +0,0 @@
1
- from prompt_toolkit.history import InMemoryHistory
2
- import os
3
- import json
4
-
5
-
6
- def handle_continue(console, state, **kwargs):
7
- save_path = os.path.join(".janito", "last_conversation.json")
8
- if not os.path.exists(save_path):
9
- console.print("[bold red]No saved conversation found.[/bold red]")
10
- return
11
-
12
- with open(save_path, "r", encoding="utf-8") as f:
13
- data = json.load(f)
14
- state["messages"].clear()
15
- state["messages"].extend(data.get("messages", []))
16
- state["history_list"].clear()
17
- state["history_list"].extend(data.get("prompts", []))
18
- state["mem_history"] = InMemoryHistory()
19
- for item in state["history_list"]:
20
- state["mem_history"].append_string(item)
21
- state["last_usage_info"] = data.get("last_usage_info")
22
- console.print("[bold green]Conversation restored from last session.[/bold green]")
23
-
24
-
25
- def handle_history(console, state, *args, **kwargs):
26
- messages = state.get("messages", [])
27
- if not args:
28
- # Default: last 5 messages
29
- start = max(0, len(messages) - 5)
30
- end = len(messages)
31
- elif len(args) == 1:
32
- count = int(args[0])
33
- start = max(0, len(messages) - count)
34
- end = len(messages)
35
- elif len(args) >= 2:
36
- start = int(args[0])
37
- end = int(args[1]) + 1 # inclusive
38
- else:
39
- start = 0
40
- end = len(messages)
41
-
42
- console.print(
43
- f"[bold cyan]Showing messages {start} to {end - 1} (total {len(messages)}):[/bold cyan]"
44
- )
45
- for idx, msg in enumerate(messages[start:end], start=start):
46
- role = msg.get("role", "unknown")
47
- content = msg.get("content", "")
48
- console.print(f"[bold]{idx} [{role}]:[/bold] {content}")
@@ -1,49 +0,0 @@
1
- def handle_sum(console, state, **kwargs):
2
- """
3
- Summarize the current chat history and replace it with a summary message.
4
- """
5
- agent = kwargs.get("agent")
6
- if agent is None:
7
- console.print("[bold red]Agent not provided to /sum command.[/bold red]")
8
- return
9
-
10
- messages = state.get("messages", [])
11
- if not messages or len(messages) < 2:
12
- console.print(
13
- "[bold yellow]Not enough conversation to summarize.[/bold yellow]"
14
- )
15
- return
16
-
17
- # Find the system message if present
18
- system_msg = next((m for m in messages if m.get("role") == "system"), None)
19
-
20
- # Prepare summary prompt
21
- summary_prompt = {
22
- "role": "user",
23
- "content": "Summarize the following conversation in a concise paragraph for context. Only output the summary, do not include any tool calls or formatting.",
24
- }
25
- # Exclude system messages for the summary context
26
- convo_for_summary = [m for m in messages if m.get("role") != "system"]
27
- summary_messages = [summary_prompt] + convo_for_summary
28
-
29
- try:
30
- summary_response = agent.chat(summary_messages, spinner=True, max_tokens=256)
31
- summary_text = (
32
- summary_response["content"]
33
- if isinstance(summary_response, dict)
34
- else str(summary_response)
35
- )
36
- except Exception as e:
37
- console.print(f"[bold red]Error during summarization: {e}[/bold red]")
38
- return
39
-
40
- # Rebuild conversation history
41
- new_history = []
42
- if system_msg:
43
- new_history.append(system_msg)
44
- new_history.append({"role": "assistant", "content": summary_text})
45
- state["messages"] = new_history
46
-
47
- console.print(
48
- "[bold green]Conversation summarized and history replaced with summary.[/bold green]"
49
- )
@@ -1,32 +0,0 @@
1
- def handle_help(console, **kwargs):
2
- console.print(
3
- """
4
- [bold green]Available commands:[/bold green]
5
- /exit, exit - Exit chat mode
6
- /restart - Restart the CLI
7
- /help - Show this help message
8
- /continue - Restore last saved conversation
9
- /start - Reset conversation history
10
- /prompt - Show the system prompt
11
- /role - Change the system role
12
- /clear - Clear the terminal screen
13
- /multi - Provide multiline input as next message
14
- /config - Show or set configuration (see: /config show, /config set local|global key=value)
15
- /termweb-logs - Show the last lines of the latest termweb logs
16
- /termweb-status - Show status information about the running termweb server
17
- /verbose [on|off] - Show or set verbose mode for this session
18
- """
19
- )
20
-
21
-
22
- def handle_clear(console, **kwargs):
23
- import os
24
-
25
- os.system("cls" if os.name == "nt" else "clear")
26
-
27
-
28
- def handle_multi(console, state, **kwargs):
29
- console.print(
30
- "[bold yellow]Multiline mode activated. Provide or write your text and press Esc + Enter to submit.[/bold yellow]"
31
- )
32
- state["paste_mode"] = True
@@ -1,72 +0,0 @@
1
- import os
2
- import json
3
- from datetime import datetime
4
-
5
-
6
- def load_last_summary(path=".janito/last_conversation.json"):
7
- if not os.path.exists(path):
8
- return None
9
- with open(path, "r", encoding="utf-8") as f:
10
- data = json.load(f)
11
- return data
12
-
13
-
14
- def load_last_conversation(path=".janito/last_conversation.json"):
15
- if not os.path.exists(path):
16
- return [], [], None
17
- with open(path, "r", encoding="utf-8") as f:
18
- data = json.load(f)
19
- messages = data.get("messages", [])
20
- prompts = data.get("prompts", [])
21
- usage = data.get("last_usage_info")
22
- return messages, prompts, usage
23
-
24
-
25
- def save_conversation(
26
- messages, prompts, usage_info=None, path=".janito/last_conversation.json"
27
- ):
28
- os.makedirs(os.path.dirname(path), exist_ok=True)
29
- data = {"messages": messages, "prompts": prompts, "last_usage_info": usage_info}
30
-
31
- def usage_serializer(obj):
32
- if hasattr(obj, "to_dict"):
33
- return obj.to_dict()
34
- if hasattr(obj, "__dict__"):
35
- return obj.__dict__
36
- return str(obj)
37
-
38
- with open(path, "w", encoding="utf-8") as f:
39
- json.dump(data, f, indent=2, default=usage_serializer)
40
-
41
-
42
- def load_input_history():
43
- history_dir = os.path.join(".janito", "input_history")
44
- os.makedirs(history_dir, exist_ok=True)
45
- today_str = datetime.now().strftime("%y%m%d")
46
- history_file = os.path.join(history_dir, f"{today_str}.json")
47
- try:
48
- with open(history_file, "r", encoding="utf-8") as f:
49
- return json.load(f)
50
- except (FileNotFoundError, json.JSONDecodeError):
51
- return []
52
-
53
-
54
- def save_input_history(history_list):
55
- history_dir = os.path.join(".janito", "input_history")
56
- os.makedirs(history_dir, exist_ok=True)
57
- today_str = datetime.now().strftime("%y%m%d")
58
- history_file = os.path.join(history_dir, f"{today_str}.json")
59
- with open(history_file, "w", encoding="utf-8") as f:
60
- json.dump(history_list, f, indent=2)
61
-
62
-
63
- def last_conversation_exists(path=".janito/last_conversation.json"):
64
- if not os.path.exists(path):
65
- return False
66
- try:
67
- with open(path, "r", encoding="utf-8") as f:
68
- data = json.load(f)
69
- messages = data.get("messages", [])
70
- return bool(messages)
71
- except Exception:
72
- return False
@@ -1,127 +0,0 @@
1
- janito/__init__.py,sha256=3NV2XuiRm8gZOJqF88deLfbAoxnE_u2grAys84ntb-A,23
2
- janito/__main__.py,sha256=KKIoPBE9xPcb54PRYO2UOt0ti04iAwLeJlg8YY36vew,76
3
- janito/rich_utils.py,sha256=FZEwrRnd_G9dnhBpUus5c40dDs-XDr0tTnIoctZAEME,1128
4
- janito/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- janito/agent/config.py,sha256=SMpyt9k1LhLn8DimhHcaOFmyk_iexEPnOREM1tWcMow,4616
6
- janito/agent/config_defaults.py,sha256=mSS_NHNH8FrZOoX61ED8LktfOEUYT84Rfek0Oaue3MA,517
7
- janito/agent/config_utils.py,sha256=UmvR236wDrMc-aTy9LxVbop6YeoJaaPb1d2DBMlkSRg,254
8
- janito/agent/content_handler.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- janito/agent/conversation.py,sha256=8i6pm1gsOiE2y__nzBjt7LaigRRrqTtHkx3-SwyX_UE,7326
10
- janito/agent/conversation_api.py,sha256=q6ZqbHdyo5vkHmXeu51Yfqf6cEjELUUAazew_IxGrHg,8200
11
- janito/agent/conversation_exceptions.py,sha256=Aw7PRLb3eUfyDOGynKds5F48dgjyiOrTCEcWSprYC58,381
12
- janito/agent/conversation_tool_calls.py,sha256=CJateY04z27ZHMorb5I4DpaeqFnjhX25uBjg1Foxpb0,1459
13
- janito/agent/conversation_ui.py,sha256=y4f0IoJQoWGrFMB3yi7uIwXokuTjhFtJGK_R7zcTv3w,397
14
- janito/agent/event.py,sha256=1jcua88NT-T4jA0mGIyIF1LvqXKu2GDT8NMjlelWmCI,517
15
- janito/agent/event_dispatcher.py,sha256=eFNDfGY8o63yNLFdMe82LqfmDyGWjrAw9CpyUAcLJAM,856
16
- janito/agent/event_handler_protocol.py,sha256=uIIf9u82BWm8pha4sZxydeEwgbxDoiWVSyplBPI0knE,130
17
- janito/agent/event_system.py,sha256=QxPSQ2XeTyiWV6ejcmS8kTqTBrs7fLHRVXdhyeVHpas,608
18
- janito/agent/message_handler.py,sha256=oZJ2u0C7OewHiHwlJslT2o3RPlvY2HhPXPoRcSsBv4M,856
19
- janito/agent/message_handler_protocol.py,sha256=E8PLl9ucNvPK_xmhLEkV-vhQzfO_P_BMvzpqDvUkcVY,150
20
- janito/agent/openai_client.py,sha256=oPbDFQoYzzD7XWw9E_4C_eqERc3Y5DkWyUcYRl7L8cs,4638
21
- janito/agent/openai_schema_generator.py,sha256=WIE2kQYB0bPe_0IV3vA6OJHoW-uJr5ezHENNkmbH8bg,5762
22
- janito/agent/platform_discovery.py,sha256=yp6KTvc-_u22Dr8-J4cdjVMUS8HkCf343aeSGRu2wek,2712
23
- janito/agent/profile_manager.py,sha256=B-bwo1ZhtD2DaVPAfn0bNv1_inoduZhKGd694Pfy5GM,3231
24
- janito/agent/queued_message_handler.py,sha256=sjsZneGWkqvfuJNac9QERdHasp9lWZvNcow8dul7tVU,1844
25
- janito/agent/rich_live.py,sha256=NKWU89hRakiJ-0N6FPg40bYREOxQizqicbDv9eUfsKs,927
26
- janito/agent/rich_message_handler.py,sha256=cSeTvdgHAPoSDddd5kFQNG2RnGj9kYMfuq6nzhtyJuE,2401
27
- janito/agent/runtime_config.py,sha256=xSx0-RD-WVA9niSCEmEn2ZPLFbQfRhPwwGIa8tid_v8,901
28
- janito/agent/test_handler_protocols.py,sha256=4o1IitFDUN1fdw48oQCRizKWahahumdmEZ4URHrlmiY,1404
29
- janito/agent/tool_base.py,sha256=rf88iEX_uZ7MwkeDl4gGMtHeESg0dlFKUo2Jr_ZqDTY,1900
30
- janito/agent/tool_executor.py,sha256=ltYdegI2-xpFZXVqclh3-Dv-yJEv3vIIuxZjirJovfI,4246
31
- janito/agent/tool_registry.py,sha256=FlZ8YEoHdk2n7t8vZ26bVbu-fi4UeSE_yu2mZq8pusU,1594
32
- janito/agent/tool_use_tracker.py,sha256=WJ1Pi5VlzDLrh-iDL3hNTC9IBfqr2QRPaz3n9w32q3o,1546
33
- janito/agent/templates/profiles/system_prompt_template_base.txt.j2,sha256=-cSdepK7LC-d7iCFOreRnA5aYiaFuUvfrOSMWfz0_4s,676
34
- janito/agent/templates/profiles/system_prompt_template_base_pt.txt.j2,sha256=FX8piXbR9XNOEKkOSMt4ieZ2wn5fzQlffeQFf8d7gIc,723
35
- janito/agent/tests/__init__.py,sha256=QuXHKEzUJ_DooaKqenv_tKuNH-HabuIVZhvW5JNaeIc,52
36
- janito/agent/tools/__init__.py,sha256=ulJfUtzEJFp8iPkpF6wSkNjSwqOZzePPuTY4WuFvIWE,1063
37
- janito/agent/tools/ask_user.py,sha256=DL-jBU-njSjwhNSbgi23RZCrRBt5beDgZq_PG4yzbWM,3217
38
- janito/agent/tools/create_directory.py,sha256=KQKt4o9pRu3ruDO9hDOxkcpzuyqxUqKlez5YFudKuXw,2481
39
- janito/agent/tools/create_file.py,sha256=cmPhLIl_MozLIQZM38yQHC1a5R_jjFh8ZeqlFuWnETQ,3524
40
- janito/agent/tools/dir_walk_utils.py,sha256=aE2UjCmmpJckcBKujq-1dGUGLWu7ryyAA7EzIbXPVtw,656
41
- janito/agent/tools/fetch_url.py,sha256=ZJJXk-6avQUX7ezT982LuwrnU0R0Lryo1g1M6_fs3V8,2131
42
- janito/agent/tools/find_files.py,sha256=n8k1US3_T23uZzXVD5Zx2t_wre1uiLnqUzQMEpGLzh4,3156
43
- janito/agent/tools/get_lines.py,sha256=rYl9E6w3WKDrO3nhxLofWgYrLjncfD2R6dwUwuF-M6o,5148
44
- janito/agent/tools/gitignore_utils.py,sha256=fDLyRZmCu6Hqhp1BEN8hs7oG0FtA-1SM9TGDz4g0lbw,1470
45
- janito/agent/tools/memory.py,sha256=vvFGGTHJkh_SuLIrd1yzrEyGg_jfytVrKNhUhvUpYyA,1745
46
- janito/agent/tools/move_file.py,sha256=rkiw4sSlhn9DmUcKadg9oMVvjl2jPqNRn-qXSe1zBt0,4339
47
- janito/agent/tools/present_choices.py,sha256=e7SpOs3RIUXL6zi6PoeFc64akTVVuiQe2yLrm0rKpNs,2327
48
- janito/agent/tools/present_choices_test.py,sha256=YYFki84vV1FT4MKnBgiwamjZyxUb2g5RDFQKmFF8Vdc,625
49
- janito/agent/tools/remove_directory.py,sha256=aDNhXkUGHQU8bXIoIXjytYhODQFysjUerApBOOOa-1Y,2409
50
- janito/agent/tools/remove_file.py,sha256=B5HOFCDhB8AgHgcgzMz_0y10yzPV7BSDrMwVYuMg1i4,2336
51
- janito/agent/tools/replace_text_in_file.py,sha256=AZGPf4pjgAGqKlvvNdnbVTKZZkOgvyFEokg-5yPYE-w,9435
52
- janito/agent/tools/rich_live.py,sha256=KpAN-dF0h9LZnYvSK-UKR_sbDnnDw0jUxY3cj_EW_wQ,1215
53
- janito/agent/tools/run_bash_command.py,sha256=zJ08AC7oRMOTaRs34IVsGw3DuFM_KFicSkxWo6y86dU,7556
54
- janito/agent/tools/run_powershell_command.py,sha256=Vgy4eghQ_x0AFvzj7n_-scOCzsATBpUAfa9SnIfUSjc,7863
55
- janito/agent/tools/run_python_command.py,sha256=3cI7Vb63Aeogb0zp5AKqwNF4CysrDSMVXCaBGpeqdqs,7041
56
- janito/agent/tools/search_outline.py,sha256=ubSvovxCRszrmSZ3NTgrbqadJ_lEAO8ohq910iyd7zw,698
57
- janito/agent/tools/search_text.py,sha256=eYk70KW24syvdPtFku1-_dpdcM2vgmcu-B37XlcMJ1U,9240
58
- janito/agent/tools/tools_utils.py,sha256=NNKRfzFpqUR7gS4RKmigO7PM9WAw_M6mkQH1c4rHKDg,2090
59
- janito/agent/tools/utils.py,sha256=igD1FBUFCmzSxt8WQRbLEYqXngupXrhfdzquYaWv4ng,932
60
- janito/agent/tools/validate_file_syntax.py,sha256=ngxkb85YwDbraiJXiWwPCA3wTZJTv_KgBu8uv0KuBHY,7558
61
- janito/agent/tools/outline_file/__init__.py,sha256=Y3UK2zE8UnZyM9mOIKHMr38_8x1BhtYWWsg4luRmOVQ,3315
62
- janito/agent/tools/outline_file/formatting.py,sha256=AB44kMT6LRVW2fNqX2u2Re7B1Dy3qqObfQHRhcDd9Ow,913
63
- janito/agent/tools/outline_file/markdown_outline.py,sha256=bXEBg0D93tEBDNy8t-wh4i7WxsxfpQ2C3dX1_rmtj08,434
64
- janito/agent/tools/outline_file/python_outline.py,sha256=8Y6UYRSSrFmhndwGUTQacVIvFZvPVu8B91oqZhia4q8,2571
65
- janito/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
- janito/cli/_print_config.py,sha256=C_27QdwzhqorzeJflBFK0f46zTUtqqmdYe3EBurjOOE,3574
67
- janito/cli/_utils.py,sha256=tRAUMDWKczd81ZvKYkwpsHWSeLzQoVlOoQ-lOw9Iujw,291
68
- janito/cli/arg_parser.py,sha256=fnR9hKmQn_aIZz4hT8kr7tq31KDjkkFW-boNsrcPau8,6873
69
- janito/cli/config_commands.py,sha256=vfU7XciVMRNR5kDvn6tnCo1PLvSEXg0Y0PzLcDEFI9w,8539
70
- janito/cli/logging_setup.py,sha256=_KLF69xqq1xLPIfkXxy0EIewO-Ef2eYoxNVjqjsC0vc,1361
71
- janito/cli/main.py,sha256=Njsvs-x22p4WumR0Z4lpG3KwRz18hoSQBdiGAW9Tces,5312
72
- janito/cli/termweb_starter.py,sha256=Ky9qJPQ8nY3TOeDHmq-IZvWNZa4m68IVeCZqNTQ9RFY,2795
73
- janito/cli/runner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- janito/cli/runner/_termweb_log_utils.py,sha256=QpH40uxPhksrJHWqthW4cR7BhcSSYakpza_qTeFGABs,722
75
- janito/cli/runner/cli_main.py,sha256=7W7NfvfSDF-lF_rVCUsxXyrseoJR79R4N6jlgpLBKMs,6880
76
- janito/cli/runner/config.py,sha256=Nzam25C8P55dFlT_f6IlEj2ZvFwS63AAbnkIWe3oNsg,1702
77
- janito/cli/runner/formatting.py,sha256=k0mtHoglqR8fKcebSK81iWTT_EL-gDl7eNfjlFZRY6g,287
78
- janito/cli_chat_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
- janito/cli_chat_shell/chat_loop.py,sha256=DNuM2VM6FOjcY-2017HCiGeX6hO_9f0iBqlrTO-FpXo,5832
80
- janito/cli_chat_shell/chat_state.py,sha256=Gf8gyh60SYdD_G5rSwJTKto96UHVaPrQlkRcceoN8yU,1221
81
- janito/cli_chat_shell/chat_ui.py,sha256=3cw2Mu4u0T60malPy-SXFA3vW0MtGMCQcHAZYO-Irfw,1272
82
- janito/cli_chat_shell/config_shell.py,sha256=sG04S_z27wI7nXKMaVDcwDpBCuo6Cvd4uhutUQesJKo,3807
83
- janito/cli_chat_shell/load_prompt.py,sha256=gHedc5TtaFBKiGgwRM_u9nVnBuLHDTSa8VPlPOtoMEA,2125
84
- janito/cli_chat_shell/session_manager.py,sha256=J3K5fzObwjIDSUfyKOdr8Db2jcoFGf1M4nmtYhQXpq4,2365
85
- janito/cli_chat_shell/shell_command_completer.py,sha256=bEpfHlMqmGlTeV2wzl0xSungEl1_2eo488qxx5_ia1w,764
86
- janito/cli_chat_shell/ui.py,sha256=6wqKFSJyILPLnzwoAVpkqFc95Mh8HkLr9DN3Sl6mC-k,7213
87
- janito/cli_chat_shell/commands/__init__.py,sha256=3rpT6fFPP50qEePRQNOIQmmuU0U7bKRK9DnHZ0pNkNU,1777
88
- janito/cli_chat_shell/commands/config.py,sha256=JTQwIuSBunxDwvGsU_Cu78GkQNYCtDFTPZ7HOxNOZCY,945
89
- janito/cli_chat_shell/commands/history_start.py,sha256=JUwxaKatqMWWn0yCC5S2YDVVTfAQCpJG6oPBuW4nYWo,1139
90
- janito/cli_chat_shell/commands/lang.py,sha256=cG_gX61LUgzv_Bxk-UPTTNF1JQFfcUVaYBnPovUylNw,521
91
- janito/cli_chat_shell/commands/prompt.py,sha256=YVW1uHfYVPPNvcGoQeHWOwyfpGhCAgSmv670xjRnLs4,1713
92
- janito/cli_chat_shell/commands/session.py,sha256=64H9UYB-LRSWzMar_C7iNM06MqrKmpRm_Dk9XXIMCiM,1739
93
- janito/cli_chat_shell/commands/session_control.py,sha256=m4SolmEi7RMHe4WZiUlHQfTIzS0KDT_PYqvnetEm4fs,1398
94
- janito/cli_chat_shell/commands/sum.py,sha256=S_46ubHUnGoLNwL5_0VeDmA5YYo99aX8baZuBdU1gZ8,1829
95
- janito/cli_chat_shell/commands/termweb_log.py,sha256=6hU2K-cZUHCC1-l7bBMjyB6illSX_eB28opdGa9dz6g,3219
96
- janito/cli_chat_shell/commands/utility.py,sha256=PdCkb4UpvyE5jr5o_zZpgfiCXzH4ma_3FjAl2_y0qsU,1145
97
- janito/cli_chat_shell/commands/verbose.py,sha256=woN1-suIGBnoxTzkoZomOrK6KEl64mDPc0bgO3ToBOI,997
98
- janito/i18n/__init__.py,sha256=7HYvwOTTf51pVm4adU79rl1FCtAjgOy6GzeShfYCdQY,970
99
- janito/i18n/messages.py,sha256=fBuwOTFoygyHPkYphm6Y0r1iE8497Z4iryVAmPhMEkg,1851
100
- janito/i18n/pt.py,sha256=52-ENCIrPW4A1tXFRT28xA8TwuUFoihs6ezJj-m3-Y4,4260
101
- janito/termweb/app.py,sha256=TO_oWHGqrud4Fhf4DcExc40hCHzyO3P99pZm4oA5INM,3374
102
- janito/termweb/static/editor.html,sha256=T5IeILW4yFIm5ZbNTqUJjqDldv7ACIdHF8AsZdv7T9M,8859
103
- janito/termweb/static/editor.html.bak,sha256=rFm5Y_-Rh_03Hs19gzfVu3IBmljIsuPduen2gDKQEyg,8862
104
- janito/termweb/static/explorer.html.bak,sha256=PM1fcbaQJm545WT94mVEekUNW3jduBAHOz6rwJBR1FA,2568
105
- janito/termweb/static/favicon.ico,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
- janito/termweb/static/favicon.ico.bak,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
- janito/termweb/static/index.html,sha256=MCCF7ncTEBsE-c829jy3UnkVsIKmnfm0vt3s54cmwcQ,3124
108
- janito/termweb/static/index.html.bak,sha256=SB6bQFktnZpJzMeo1CzlC82XkYpLcpLnjv1uMS-11FQ,3123
109
- janito/termweb/static/index.html.bak.bak,sha256=dsKoC2lE0oJCGUUDTWcnIQE3s5Uoqd12WoTkWEwbH_c,6626
110
- janito/termweb/static/landing.html.bak,sha256=JGwIcATj0B8MhHXLoXg2clypqsKJwi54NtW-rRDUsMs,1403
111
- janito/termweb/static/termicon.svg,sha256=vc2Z3q-ADVK3pLzE3wnw_qpR6vDguWKEdH_pWObPjbw,229
112
- janito/termweb/static/termweb.css,sha256=9AxhC2R8CzS82NHg9bk0GD-kxKt_NeRSRFGgTyi-3zI,4870
113
- janito/termweb/static/termweb.css.bak,sha256=PICa5u6RgaXDg47EGOEn1Yt63k7Wm8mW1vc3zSUU-hs,6004
114
- janito/termweb/static/termweb.js,sha256=SgXq3FWGl4ltUeQeamT6YRQJ7RFdy9EPaD6iSvq1uSs,9093
115
- janito/termweb/static/termweb.js.bak,sha256=Y62Uew5kb3I6Fs5hZBcREArymigU7NHHrKdoaswqjyc,9131
116
- janito/termweb/static/termweb.js.bak.bak,sha256=SQeqc9YwdreCmFJ7LtCYlHOjRHi8rsoW_fZ3x5WroWQ,7692
117
- janito/termweb/static/termweb_quickopen.js,sha256=HNT85JjWAvjI5ROwukOU-oI4ZVVjCO6yg5IT115pdXI,5379
118
- janito/termweb/static/termweb_quickopen.js.bak,sha256=sk_zbEw6HJt1iZSAYlaW0qAhq0to-KcBsOKx0AZqkKA,4814
119
- janito/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
- janito/web/__main__.py,sha256=5Ck6okOZmxKYkQ-ir4mxXDH7XWMNR-9szgsm0UyQLE0,734
121
- janito/web/app.py,sha256=NarccXYgeYEMvws1lQSGZtArrzJIvw94LSNR0rW9Dq4,7331
122
- janito-1.8.1.dist-info/licenses/LICENSE,sha256=sHBqv0bvtrb29H7WRR-Z603YHm9pLtJIo3nHU_9cmgE,1091
123
- janito-1.8.1.dist-info/METADATA,sha256=Jck6xN3YFdRvzBqMmc-4VvJsi9mqKNpiruyOs9Sivis,12619
124
- janito-1.8.1.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
125
- janito-1.8.1.dist-info/entry_points.txt,sha256=wIo5zZxbmu4fC-ZMrsKD0T0vq7IqkOOLYhrqRGypkx4,48
126
- janito-1.8.1.dist-info/top_level.txt,sha256=m0NaVCq0-ivxbazE2-ND0EA9Hmuijj_OGkmCbnBcCig,7
127
- janito-1.8.1.dist-info/RECORD,,
File without changes
File without changes
File without changes