auto-coder 0.1.235__tar.gz → 0.1.238__tar.gz
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.
Potentially problematic release.
This version of auto-coder might be problematic. Click here for more details.
- {auto_coder-0.1.235 → auto_coder-0.1.238}/PKG-INFO +2 -2
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/auto_coder.egg-info/PKG-INFO +2 -2
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/auto_coder.egg-info/SOURCES.txt +1 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/auto_coder.egg-info/requires.txt +1 -1
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/auto_coder.py +3 -2
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/chat_auto_coder.py +91 -87
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/chat_auto_coder_lang.py +69 -17
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/auto_coder_lang.py +59 -4
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/code_auto_merge.py +12 -9
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/code_auto_merge_diff.py +5 -4
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/code_auto_merge_editblock.py +35 -33
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/code_auto_merge_strict_diff.py +5 -4
- auto_coder-0.1.238/src/autocoder/common/code_modification_ranker.py +150 -0
- auto_coder-0.1.238/src/autocoder/common/printer.py +49 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/dispacher/actions/action.py +51 -18
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/index/entry.py +19 -6
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/index/filter/quick_filter.py +1 -1
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/index/index.py +20 -14
- auto_coder-0.1.238/src/autocoder/utils/types.py +0 -0
- auto_coder-0.1.238/src/autocoder/version.py +1 -0
- auto_coder-0.1.235/src/autocoder/common/code_modification_ranker.py +0 -120
- auto_coder-0.1.235/src/autocoder/common/printer.py +0 -36
- auto_coder-0.1.235/src/autocoder/version.py +0 -1
- {auto_coder-0.1.235 → auto_coder-0.1.238}/LICENSE +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/README.md +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/setup.cfg +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/setup.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/auto_coder.egg-info/dependency_links.txt +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/auto_coder.egg-info/entry_points.txt +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/auto_coder.egg-info/top_level.txt +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/agent/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/agent/auto_demand_organizer.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/agent/auto_filegroup.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/agent/auto_guess_query.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/agent/auto_tool.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/agent/coder.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/agent/designer.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/agent/planner.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/agent/project_reader.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/auto_coder_rag.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/auto_coder_rag_client_mcp.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/auto_coder_rag_mcp.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/auto_coder_server.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/benchmark.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/chat/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/command_args.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/JupyterClient.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/ShellClient.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/anything2images.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/anything2img.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/audio.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/buildin_tokenizer.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/chunk_validation.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/cleaner.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/code_auto_execute.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/code_auto_generate.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/code_auto_generate_diff.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/code_auto_generate_editblock.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/code_auto_generate_strict_diff.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/command_completer.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/command_generator.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/command_templates.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/const.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/files.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/git_utils.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/image_to_page.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/interpreter.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/llm_rerank.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/mcp_hub.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/mcp_server.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/mcp_servers/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/mcp_servers/mcp_server_perplexity.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/mcp_tools.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/memory_manager.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/recall_validation.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/screenshots.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/search.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/search_replace.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/sys_prompt.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/text.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/types.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/common/utils_code_auto_generate.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/data/tokenizer.json +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/db/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/db/store.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/dispacher/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/dispacher/actions/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/dispacher/actions/copilot.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/dispacher/actions/plugins/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/dispacher/actions/plugins/action_regex_project.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/dispacher/actions/plugins/action_translate.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/index/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/index/filter/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/index/filter/normal_filter.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/index/for_command.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/index/symbols_utils.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/index/types.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/lang.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/models.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/pyproject/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/api_server.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/cache/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/cache/base_cache.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/cache/byzer_storage_cache.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/cache/file_monitor_cache.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/cache/simple_cache.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/doc_filter.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/document_retriever.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/llm_wrapper.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/loaders/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/loaders/docx_loader.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/loaders/excel_loader.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/loaders/pdf_loader.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/loaders/ppt_loader.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/long_context_rag.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/rag_config.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/rag_entry.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/raw_rag.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/relevant_utils.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/simple_directory_reader.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/simple_rag.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/stream_event/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/stream_event/event_writer.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/stream_event/types.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/token_checker.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/token_counter.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/token_limiter.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/types.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/utils.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/rag/variable_holder.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/regexproject/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/suffixproject/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/tsproject/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/_markitdown.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/auto_coder_utils/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/auto_coder_utils/chat_stream_out.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/chat_auto_coder_utils/__init__.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/conversation_store.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/llm_client_interceptors.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/llms.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/log_capture.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/multi_turn.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/operate_config_api.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/print_table.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/queue_communicate.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/request_event_queue.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/request_queue.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/rest.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/src/autocoder/utils/tests.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/tests/test_action_regex_project.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/tests/test_chat_auto_coder.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/tests/test_code_auto_merge_editblock.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/tests/test_command_completer.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/tests/test_planner.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/tests/test_queue_communicate.py +0 -0
- {auto_coder-0.1.235 → auto_coder-0.1.238}/tests/test_symbols_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: auto-coder
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.238
|
|
4
4
|
Summary: AutoCoder: AutoCoder
|
|
5
5
|
Author: allwefantasy
|
|
6
6
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
@@ -26,7 +26,7 @@ Requires-Dist: tabulate
|
|
|
26
26
|
Requires-Dist: jupyter_client
|
|
27
27
|
Requires-Dist: prompt-toolkit
|
|
28
28
|
Requires-Dist: tokenizers
|
|
29
|
-
Requires-Dist: byzerllm[saas]>=0.1.
|
|
29
|
+
Requires-Dist: byzerllm[saas]>=0.1.154
|
|
30
30
|
Requires-Dist: patch
|
|
31
31
|
Requires-Dist: diff_match_patch
|
|
32
32
|
Requires-Dist: GitPython
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: auto-coder
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.238
|
|
4
4
|
Summary: AutoCoder: AutoCoder
|
|
5
5
|
Author: allwefantasy
|
|
6
6
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
@@ -26,7 +26,7 @@ Requires-Dist: tabulate
|
|
|
26
26
|
Requires-Dist: jupyter_client
|
|
27
27
|
Requires-Dist: prompt-toolkit
|
|
28
28
|
Requires-Dist: tokenizers
|
|
29
|
-
Requires-Dist: byzerllm[saas]>=0.1.
|
|
29
|
+
Requires-Dist: byzerllm[saas]>=0.1.154
|
|
30
30
|
Requires-Dist: patch
|
|
31
31
|
Requires-Dist: diff_match_patch
|
|
32
32
|
Requires-Dist: GitPython
|
|
@@ -142,6 +142,7 @@ src/autocoder/utils/request_event_queue.py
|
|
|
142
142
|
src/autocoder/utils/request_queue.py
|
|
143
143
|
src/autocoder/utils/rest.py
|
|
144
144
|
src/autocoder/utils/tests.py
|
|
145
|
+
src/autocoder/utils/types.py
|
|
145
146
|
src/autocoder/utils/auto_coder_utils/__init__.py
|
|
146
147
|
src/autocoder/utils/auto_coder_utils/chat_stream_out.py
|
|
147
148
|
src/autocoder/utils/chat_auto_coder_utils/__init__.py
|
|
@@ -44,7 +44,7 @@ from autocoder.common.memory_manager import save_to_memory_file
|
|
|
44
44
|
from autocoder import models as models_module
|
|
45
45
|
from autocoder.common.utils_code_auto_generate import stream_chat_with_continue
|
|
46
46
|
from autocoder.utils.auto_coder_utils.chat_stream_out import stream_out
|
|
47
|
-
|
|
47
|
+
from autocoder.common.printer import Printer
|
|
48
48
|
console = Console()
|
|
49
49
|
|
|
50
50
|
|
|
@@ -1307,7 +1307,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1307
1307
|
save_to_memory_file(ask_conversation=chat_history["ask_conversation"],
|
|
1308
1308
|
query=args.query,
|
|
1309
1309
|
response=result)
|
|
1310
|
-
|
|
1310
|
+
printer = Printer()
|
|
1311
|
+
printer.print_in_terminal("memory_save_success")
|
|
1311
1312
|
return {}
|
|
1312
1313
|
|
|
1313
1314
|
if "rag" in args.action:
|
|
@@ -53,6 +53,8 @@ from autocoder import models
|
|
|
53
53
|
import shlex
|
|
54
54
|
from autocoder.utils.llms import get_single_llm
|
|
55
55
|
import pkg_resources
|
|
56
|
+
from autocoder.common.printer import Printer
|
|
57
|
+
from byzerllm.utils.langutil import run_in_thread,run_in_thread_with_cancel
|
|
56
58
|
|
|
57
59
|
class SymbolItem(BaseModel):
|
|
58
60
|
symbol_name: str
|
|
@@ -537,32 +539,31 @@ def redirect_stdout():
|
|
|
537
539
|
|
|
538
540
|
|
|
539
541
|
def configure(conf: str, skip_print=False):
|
|
542
|
+
printer = Printer()
|
|
540
543
|
parts = conf.split(None, 1)
|
|
541
544
|
if len(parts) == 2 and parts[0] in ["/drop", "/unset", "/remove"]:
|
|
542
545
|
key = parts[1].strip()
|
|
543
546
|
if key in memory["conf"]:
|
|
544
547
|
del memory["conf"][key]
|
|
545
548
|
save_memory()
|
|
546
|
-
|
|
549
|
+
printer.print_in_terminal("config_delete_success", style="green", key=key)
|
|
547
550
|
else:
|
|
548
|
-
|
|
551
|
+
printer.print_in_terminal("config_not_found", style="yellow", key=key)
|
|
549
552
|
else:
|
|
550
553
|
parts = conf.split(":", 1)
|
|
551
554
|
if len(parts) != 2:
|
|
552
|
-
|
|
553
|
-
"\033[91mError: Invalid configuration format. Use 'key:value' or '/drop key'.\033[0m"
|
|
554
|
-
)
|
|
555
|
+
printer.print_in_terminal("config_invalid_format", style="red")
|
|
555
556
|
return
|
|
556
557
|
key, value = parts
|
|
557
558
|
key = key.strip()
|
|
558
559
|
value = value.strip()
|
|
559
560
|
if not value:
|
|
560
|
-
|
|
561
|
+
printer.print_in_terminal("config_value_empty", style="red")
|
|
561
562
|
return
|
|
562
563
|
memory["conf"][key] = value
|
|
563
564
|
save_memory()
|
|
564
565
|
if not skip_print:
|
|
565
|
-
|
|
566
|
+
printer.print_in_terminal("config_set_success", style="green", key=key, value=value)
|
|
566
567
|
|
|
567
568
|
# word_completer = WordCompleter(commands)
|
|
568
569
|
|
|
@@ -1031,15 +1032,10 @@ def add_files(args: List[str]):
|
|
|
1031
1032
|
groups_info = memory["current_files"]["groups_info"]
|
|
1032
1033
|
|
|
1033
1034
|
console = Console()
|
|
1035
|
+
printer = Printer()
|
|
1034
1036
|
|
|
1035
1037
|
if not args:
|
|
1036
|
-
|
|
1037
|
-
Panel(
|
|
1038
|
-
"Please provide arguments for the /add_files command.",
|
|
1039
|
-
title="Error",
|
|
1040
|
-
border_style="red",
|
|
1041
|
-
)
|
|
1042
|
-
)
|
|
1038
|
+
printer.print_in_terminal("add_files_no_args", style="red")
|
|
1043
1039
|
return
|
|
1044
1040
|
|
|
1045
1041
|
if args[0] == "/refresh":
|
|
@@ -1253,7 +1249,7 @@ def add_files(args: List[str]):
|
|
|
1253
1249
|
if files_to_add:
|
|
1254
1250
|
memory["current_files"]["files"].extend(files_to_add)
|
|
1255
1251
|
table = Table(
|
|
1256
|
-
title="
|
|
1252
|
+
title=get_message("add_files_added_files"),
|
|
1257
1253
|
show_header=True,
|
|
1258
1254
|
header_style="bold magenta",
|
|
1259
1255
|
show_lines=True, # 这会在每行之间添加分割线
|
|
@@ -1268,29 +1264,20 @@ def add_files(args: List[str]):
|
|
|
1268
1264
|
)
|
|
1269
1265
|
console.print(Panel(table, border_style="green"))
|
|
1270
1266
|
else:
|
|
1271
|
-
|
|
1272
|
-
Panel(
|
|
1273
|
-
"All specified files are already in the current session or no matches found.",
|
|
1274
|
-
title="No Files Added",
|
|
1275
|
-
border_style="yellow",
|
|
1276
|
-
)
|
|
1277
|
-
)
|
|
1267
|
+
printer.print_in_terminal("add_files_matched", style="yellow")
|
|
1278
1268
|
|
|
1279
1269
|
completer.update_current_files(memory["current_files"]["files"])
|
|
1280
1270
|
save_memory()
|
|
1281
1271
|
|
|
1282
1272
|
|
|
1283
1273
|
def remove_files(file_names: List[str]):
|
|
1284
|
-
console = Console()
|
|
1285
1274
|
project_root = os.getcwd()
|
|
1275
|
+
printer = Printer()
|
|
1286
1276
|
|
|
1287
1277
|
if "/all" in file_names:
|
|
1288
1278
|
memory["current_files"]["files"] = []
|
|
1289
1279
|
memory["current_files"]["current_groups"] = []
|
|
1290
|
-
|
|
1291
|
-
Panel("Removed all files.",
|
|
1292
|
-
title="Files Removed", border_style="green")
|
|
1293
|
-
)
|
|
1280
|
+
printer.print_in_terminal("remove_files_all", style="green")
|
|
1294
1281
|
else:
|
|
1295
1282
|
removed_files = []
|
|
1296
1283
|
for file in memory["current_files"]["files"]:
|
|
@@ -1302,26 +1289,25 @@ def remove_files(file_names: List[str]):
|
|
|
1302
1289
|
memory["current_files"]["files"].remove(file)
|
|
1303
1290
|
|
|
1304
1291
|
if removed_files:
|
|
1305
|
-
table = Table(
|
|
1306
|
-
|
|
1292
|
+
table = Table(
|
|
1293
|
+
show_header=True,
|
|
1294
|
+
header_style="bold magenta"
|
|
1307
1295
|
)
|
|
1308
1296
|
table.add_column("File", style="green")
|
|
1309
1297
|
for f in removed_files:
|
|
1310
1298
|
table.add_row(os.path.relpath(f, project_root))
|
|
1311
|
-
|
|
1312
|
-
|
|
1299
|
+
|
|
1300
|
+
console = Console()
|
|
1313
1301
|
console.print(
|
|
1314
|
-
Panel(
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
)
|
|
1319
|
-
)
|
|
1302
|
+
Panel(table, border_style="green",
|
|
1303
|
+
title=printer.get_message_from_key("files_removed")))
|
|
1304
|
+
else:
|
|
1305
|
+
printer.print_in_terminal("remove_files_none", style="yellow")
|
|
1320
1306
|
|
|
1321
1307
|
completer.update_current_files(memory["current_files"]["files"])
|
|
1322
1308
|
save_memory()
|
|
1323
1309
|
|
|
1324
|
-
|
|
1310
|
+
@run_in_thread()
|
|
1325
1311
|
def ask(query: str):
|
|
1326
1312
|
conf = memory.get("conf", {})
|
|
1327
1313
|
yaml_config = {
|
|
@@ -1371,7 +1357,6 @@ def get_llm_friendly_package_docs(
|
|
|
1371
1357
|
docs = []
|
|
1372
1358
|
|
|
1373
1359
|
if not os.path.exists(llm_friendly_packages_dir):
|
|
1374
|
-
print("llm_friendly_packages directory not found.")
|
|
1375
1360
|
return docs
|
|
1376
1361
|
|
|
1377
1362
|
libs = list(memory.get("libs", {}).keys())
|
|
@@ -1422,10 +1407,11 @@ def convert_yaml_to_config(yaml_file: str):
|
|
|
1422
1407
|
setattr(args, key, value)
|
|
1423
1408
|
return args
|
|
1424
1409
|
|
|
1425
|
-
|
|
1410
|
+
@run_in_thread()
|
|
1426
1411
|
def mcp(query: str):
|
|
1427
1412
|
query = query.strip()
|
|
1428
1413
|
mcp_server = get_mcp_server()
|
|
1414
|
+
printer = Printer()
|
|
1429
1415
|
|
|
1430
1416
|
# Handle remove command
|
|
1431
1417
|
if query.startswith("/remove"):
|
|
@@ -1433,29 +1419,29 @@ def mcp(query: str):
|
|
|
1433
1419
|
response = mcp_server.send_request(
|
|
1434
1420
|
McpRemoveRequest(server_name=server_name))
|
|
1435
1421
|
if response.error:
|
|
1436
|
-
|
|
1422
|
+
printer.print_in_terminal("mcp_remove_error", style="red", error=response.error)
|
|
1437
1423
|
else:
|
|
1438
|
-
|
|
1424
|
+
printer.print_in_terminal("mcp_remove_success", style="green", result=response.result)
|
|
1439
1425
|
return
|
|
1440
1426
|
|
|
1441
1427
|
# Handle list command
|
|
1442
1428
|
if query.startswith("/list_running"):
|
|
1443
1429
|
response = mcp_server.send_request(McpListRunningRequest())
|
|
1444
1430
|
if response.error:
|
|
1445
|
-
|
|
1431
|
+
printer.print_in_terminal("mcp_list_running_error", style="red", error=response.error)
|
|
1446
1432
|
else:
|
|
1447
|
-
|
|
1448
|
-
|
|
1433
|
+
printer.print_in_terminal("mcp_list_running_title")
|
|
1434
|
+
printer.print_str_in_terminal(response.result)
|
|
1449
1435
|
return
|
|
1450
1436
|
|
|
1451
1437
|
# Handle list command
|
|
1452
1438
|
if query.startswith("/list"):
|
|
1453
1439
|
response = mcp_server.send_request(McpListRequest())
|
|
1454
1440
|
if response.error:
|
|
1455
|
-
|
|
1441
|
+
printer.print_in_terminal("mcp_list_builtin_error", style="red", error=response.error)
|
|
1456
1442
|
else:
|
|
1457
|
-
|
|
1458
|
-
|
|
1443
|
+
printer.print_in_terminal("mcp_list_builtin_title")
|
|
1444
|
+
printer.print_str_in_terminal(response.result)
|
|
1459
1445
|
return
|
|
1460
1446
|
|
|
1461
1447
|
# Handle refresh command
|
|
@@ -1463,9 +1449,9 @@ def mcp(query: str):
|
|
|
1463
1449
|
server_name = query.replace("/refresh", "", 1).strip()
|
|
1464
1450
|
response = mcp_server.send_request(McpRefreshRequest(name=server_name or None))
|
|
1465
1451
|
if response.error:
|
|
1466
|
-
|
|
1452
|
+
printer.print_in_terminal("mcp_refresh_error", style="red", error=response.error)
|
|
1467
1453
|
else:
|
|
1468
|
-
|
|
1454
|
+
printer.print_in_terminal("mcp_refresh_success", style="green")
|
|
1469
1455
|
return
|
|
1470
1456
|
|
|
1471
1457
|
# Handle add command
|
|
@@ -1475,9 +1461,9 @@ def mcp(query: str):
|
|
|
1475
1461
|
response = mcp_server.send_request(request)
|
|
1476
1462
|
|
|
1477
1463
|
if response.error:
|
|
1478
|
-
|
|
1464
|
+
printer.print_in_terminal("mcp_install_error", style="red", error=response.error)
|
|
1479
1465
|
else:
|
|
1480
|
-
|
|
1466
|
+
printer.print_in_terminal("mcp_install_success", style="green", result=response.result)
|
|
1481
1467
|
return
|
|
1482
1468
|
|
|
1483
1469
|
# Handle default query
|
|
@@ -1513,13 +1499,16 @@ def mcp(query: str):
|
|
|
1513
1499
|
model=args.inference_model or args.model
|
|
1514
1500
|
)
|
|
1515
1501
|
)
|
|
1516
|
-
|
|
1502
|
+
|
|
1517
1503
|
if response.error:
|
|
1518
|
-
|
|
1504
|
+
printer.print_panel(
|
|
1519
1505
|
f"Error from MCP server: {response.error}",
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1506
|
+
text_options={"justify": "left"},
|
|
1507
|
+
panel_options={
|
|
1508
|
+
"title": printer.get_message_from_key("mcp_error_title"),
|
|
1509
|
+
"border_style": "red"
|
|
1510
|
+
}
|
|
1511
|
+
)
|
|
1523
1512
|
else:
|
|
1524
1513
|
# Save conversation
|
|
1525
1514
|
mcp_dir = os.path.join(".auto-coder", "mcp", "conversations")
|
|
@@ -1528,19 +1517,23 @@ def mcp(query: str):
|
|
|
1528
1517
|
file_path = os.path.join(mcp_dir, f"{timestamp}.md")
|
|
1529
1518
|
|
|
1530
1519
|
# Format response as markdown
|
|
1531
|
-
markdown_content = f"#
|
|
1520
|
+
markdown_content = f"# {printer.get_message_from_key('mcp_response_title')}\n\n{response.result}"
|
|
1532
1521
|
|
|
1533
1522
|
# Save to file
|
|
1534
1523
|
with open(file_path, "w", encoding="utf-8") as f:
|
|
1535
1524
|
f.write(markdown_content)
|
|
1536
1525
|
|
|
1537
1526
|
# Print with markdown formatting
|
|
1538
|
-
|
|
1539
|
-
Markdown(markdown_content),
|
|
1540
|
-
|
|
1541
|
-
|
|
1527
|
+
printer.print_panel(
|
|
1528
|
+
Markdown(markdown_content),
|
|
1529
|
+
text_options={"justify": "left"},
|
|
1530
|
+
panel_options={
|
|
1531
|
+
"border_style": "green"
|
|
1532
|
+
}
|
|
1533
|
+
)
|
|
1542
1534
|
|
|
1543
1535
|
|
|
1536
|
+
@run_in_thread()
|
|
1544
1537
|
def code_next(query: str):
|
|
1545
1538
|
conf = memory.get("conf", {})
|
|
1546
1539
|
yaml_config = {
|
|
@@ -1620,6 +1613,7 @@ def code_next(query: str):
|
|
|
1620
1613
|
)
|
|
1621
1614
|
|
|
1622
1615
|
|
|
1616
|
+
@run_in_thread()
|
|
1623
1617
|
def commit(query: str):
|
|
1624
1618
|
conf = memory.get("conf", {})
|
|
1625
1619
|
product_mode = conf.get("product_mode", "lite")
|
|
@@ -1701,6 +1695,7 @@ def commit(query: str):
|
|
|
1701
1695
|
os.remove(execute_file)
|
|
1702
1696
|
|
|
1703
1697
|
|
|
1698
|
+
@run_in_thread()
|
|
1704
1699
|
def coding(query: str):
|
|
1705
1700
|
console = Console()
|
|
1706
1701
|
is_apply = query.strip().startswith("/apply")
|
|
@@ -1850,6 +1845,7 @@ def code_review(query: str) -> str:
|
|
|
1850
1845
|
"""
|
|
1851
1846
|
|
|
1852
1847
|
|
|
1848
|
+
@run_in_thread()
|
|
1853
1849
|
def chat(query: str):
|
|
1854
1850
|
conf = memory.get("conf", {})
|
|
1855
1851
|
|
|
@@ -1937,6 +1933,7 @@ def chat(query: str):
|
|
|
1937
1933
|
os.remove(execute_file)
|
|
1938
1934
|
|
|
1939
1935
|
|
|
1936
|
+
@run_in_thread()
|
|
1940
1937
|
def summon(query: str):
|
|
1941
1938
|
conf = memory.get("conf", {})
|
|
1942
1939
|
current_files = memory["current_files"]["files"]
|
|
@@ -1993,6 +1990,7 @@ def summon(query: str):
|
|
|
1993
1990
|
os.remove(execute_file)
|
|
1994
1991
|
|
|
1995
1992
|
|
|
1993
|
+
@run_in_thread()
|
|
1996
1994
|
def design(query: str):
|
|
1997
1995
|
|
|
1998
1996
|
conf = memory.get("conf", {})
|
|
@@ -2070,6 +2068,7 @@ def voice_input():
|
|
|
2070
2068
|
os.remove(execute_file)
|
|
2071
2069
|
|
|
2072
2070
|
|
|
2071
|
+
@run_in_thread()
|
|
2073
2072
|
def generate_shell_command(input_text):
|
|
2074
2073
|
conf = memory.get("conf", {})
|
|
2075
2074
|
yaml_config = {
|
|
@@ -2104,11 +2103,11 @@ def manage_models(params, query: str):
|
|
|
2104
2103
|
/models /add_model name=xxx base_url=xxx ... - Add model with custom params
|
|
2105
2104
|
/models /remove <name> - Remove model by name
|
|
2106
2105
|
"""
|
|
2107
|
-
|
|
2106
|
+
printer = Printer()
|
|
2108
2107
|
console = Console()
|
|
2109
2108
|
|
|
2110
2109
|
if params.product_mode != "lite":
|
|
2111
|
-
|
|
2110
|
+
printer.print_in_terminal("models_lite_only", style="red")
|
|
2112
2111
|
return
|
|
2113
2112
|
|
|
2114
2113
|
models_data = models.load_models()
|
|
@@ -2128,17 +2127,21 @@ def manage_models(params, query: str):
|
|
|
2128
2127
|
if "/remove" in query:
|
|
2129
2128
|
subcmd = "/remove"
|
|
2130
2129
|
query = query.replace("/remove", "", 1).strip()
|
|
2130
|
+
|
|
2131
2131
|
if not subcmd:
|
|
2132
|
-
|
|
2132
|
+
printer.print_in_terminal("models_usage")
|
|
2133
2133
|
return
|
|
2134
2134
|
|
|
2135
2135
|
if subcmd == "/list":
|
|
2136
2136
|
if models_data:
|
|
2137
|
-
table = Table(
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2137
|
+
table = Table(
|
|
2138
|
+
title=printer.get_message_from_key("models_title"),
|
|
2139
|
+
expand=True,
|
|
2140
|
+
show_lines=True
|
|
2141
|
+
)
|
|
2142
|
+
table.add_column("Name", style="cyan", width=40, no_wrap=False)
|
|
2143
|
+
table.add_column("Model Name", style="magenta", width=30, overflow="fold")
|
|
2144
|
+
table.add_column("Description", style="white", width=50, overflow="fold")
|
|
2142
2145
|
for m in models_data:
|
|
2143
2146
|
# Check if api_key_path exists and file exists
|
|
2144
2147
|
api_key_path = m.get("api_key_path", "")
|
|
@@ -2146,17 +2149,16 @@ def manage_models(params, query: str):
|
|
|
2146
2149
|
if api_key_path:
|
|
2147
2150
|
api_key_file = os.path.expanduser(f"~/.auto-coder/keys/{api_key_path}")
|
|
2148
2151
|
if os.path.exists(api_key_file):
|
|
2149
|
-
name = f"{name}*"
|
|
2150
|
-
|
|
2152
|
+
name = f"{name}*"
|
|
2153
|
+
|
|
2151
2154
|
table.add_row(
|
|
2152
|
-
name,
|
|
2153
|
-
m.get("model_type", ""),
|
|
2155
|
+
name,
|
|
2154
2156
|
m.get("model_name", ""),
|
|
2155
2157
|
m.get("description", "")
|
|
2156
2158
|
)
|
|
2157
2159
|
console.print(table)
|
|
2158
2160
|
else:
|
|
2159
|
-
|
|
2161
|
+
printer.print_in_terminal("models_no_models", style="yellow")
|
|
2160
2162
|
|
|
2161
2163
|
elif subcmd == "/add":
|
|
2162
2164
|
# Support both simplified and legacy formats
|
|
@@ -2166,11 +2168,11 @@ def manage_models(params, query: str):
|
|
|
2166
2168
|
name, api_key = args[0], args[1]
|
|
2167
2169
|
result = models.update_model_with_api_key(name, api_key)
|
|
2168
2170
|
if result:
|
|
2169
|
-
|
|
2171
|
+
printer.print_in_terminal("models_added", style="green", name=name)
|
|
2170
2172
|
else:
|
|
2171
|
-
|
|
2173
|
+
printer.print_in_terminal("models_add_failed", style="red", name=name)
|
|
2172
2174
|
else:
|
|
2173
|
-
|
|
2175
|
+
printer.print_in_terminal("models_add_usage", style="red")
|
|
2174
2176
|
|
|
2175
2177
|
elif subcmd == "/add_model":
|
|
2176
2178
|
# Parse key=value pairs: /models /add_model name=abc base_url=http://xx ...
|
|
@@ -2179,19 +2181,19 @@ def manage_models(params, query: str):
|
|
|
2179
2181
|
data_dict = {}
|
|
2180
2182
|
for pair in kv_pairs:
|
|
2181
2183
|
if '=' not in pair:
|
|
2182
|
-
|
|
2184
|
+
printer.print_in_terminal("models_add_model_params", style="red")
|
|
2183
2185
|
continue
|
|
2184
2186
|
k, v = pair.split('=', 1)
|
|
2185
2187
|
data_dict[k.strip()] = v.strip()
|
|
2186
2188
|
|
|
2187
2189
|
# Name is required
|
|
2188
2190
|
if "name" not in data_dict:
|
|
2189
|
-
|
|
2191
|
+
printer.print_in_terminal("models_add_model_name_required", style="red")
|
|
2190
2192
|
return
|
|
2191
2193
|
|
|
2192
2194
|
# Check duplication
|
|
2193
2195
|
if any(m["name"] == data_dict["name"] for m in models_data):
|
|
2194
|
-
|
|
2196
|
+
printer.print_in_terminal("models_add_model_exists", style="yellow", name=data_dict["name"])
|
|
2195
2197
|
return
|
|
2196
2198
|
|
|
2197
2199
|
# Create model with defaults
|
|
@@ -2207,23 +2209,23 @@ def manage_models(params, query: str):
|
|
|
2207
2209
|
|
|
2208
2210
|
models_data.append(final_model)
|
|
2209
2211
|
models.save_models(models_data)
|
|
2210
|
-
|
|
2212
|
+
printer.print_in_terminal("models_add_model_success", style="green", name=data_dict["name"])
|
|
2211
2213
|
|
|
2212
2214
|
elif subcmd == "/remove":
|
|
2213
2215
|
args = query.strip().split(" ")
|
|
2214
2216
|
if len(args) < 1:
|
|
2215
|
-
|
|
2217
|
+
printer.print_in_terminal("models_add_usage", style="red")
|
|
2216
2218
|
return
|
|
2217
2219
|
name = args[0]
|
|
2218
2220
|
filtered_models = [m for m in models_data if m["name"] != name]
|
|
2219
2221
|
if len(filtered_models) == len(models_data):
|
|
2220
|
-
|
|
2222
|
+
printer.print_in_terminal("models_add_model_remove", style="yellow", name=name)
|
|
2221
2223
|
return
|
|
2222
2224
|
models.save_models(filtered_models)
|
|
2223
|
-
|
|
2225
|
+
printer.print_in_terminal("models_add_model_removed", style="green", name=name)
|
|
2224
2226
|
|
|
2225
2227
|
else:
|
|
2226
|
-
|
|
2228
|
+
printer.print_in_terminal("models_unknown_subcmd", style="yellow", subcmd=subcmd)
|
|
2227
2229
|
|
|
2228
2230
|
def exclude_dirs(dir_names: List[str]):
|
|
2229
2231
|
new_dirs = dir_names
|
|
@@ -2239,7 +2241,7 @@ def exclude_dirs(dir_names: List[str]):
|
|
|
2239
2241
|
save_memory()
|
|
2240
2242
|
completer.refresh_files()
|
|
2241
2243
|
|
|
2242
|
-
|
|
2244
|
+
@run_in_thread()
|
|
2243
2245
|
def index_build():
|
|
2244
2246
|
conf = memory.get("conf", {})
|
|
2245
2247
|
yaml_config = {
|
|
@@ -2265,6 +2267,7 @@ def index_build():
|
|
|
2265
2267
|
os.remove(yaml_file)
|
|
2266
2268
|
|
|
2267
2269
|
|
|
2270
|
+
@run_in_thread()
|
|
2268
2271
|
def index_query(query: str):
|
|
2269
2272
|
conf = memory.get("conf", {})
|
|
2270
2273
|
yaml_config = {
|
|
@@ -2314,6 +2317,7 @@ def list_files():
|
|
|
2314
2317
|
)
|
|
2315
2318
|
|
|
2316
2319
|
|
|
2320
|
+
@run_in_thread()
|
|
2317
2321
|
def execute_shell_command(command: str):
|
|
2318
2322
|
console = Console()
|
|
2319
2323
|
try:
|