auto-coder 0.1.354__tar.gz → 0.1.355__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.354 → auto_coder-0.1.355}/PKG-INFO +1 -1
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/auto_coder.egg-info/PKG-INFO +1 -1
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/auto_coder.egg-info/SOURCES.txt +3 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/agentic_filter.py +1 -1
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/auto_coder.py +8 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/auto_coder_runner.py +50 -77
- auto_coder-0.1.355/src/autocoder/chat/conf_command.py +270 -0
- auto_coder-0.1.355/src/autocoder/chat/models_command.py +485 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/chat_auto_coder.py +29 -24
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/chat_auto_coder_lang.py +26 -2
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/commands/auto_command.py +1 -1
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/commands/auto_web.py +1 -1
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/__init__.py +2 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/command_completer.py +58 -12
- auto_coder-0.1.355/src/autocoder/common/command_completer_v2.py +576 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/global_cancel.py +53 -16
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit.py +3 -3
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_agentic_editblock_manager.py +9 -9
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_diff_manager.py +2 -2
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_editblock_manager.py +11 -10
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_strict_diff_manager.py +3 -2
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/dispacher/actions/action.py +6 -6
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/dispacher/actions/plugins/action_regex_project.py +2 -2
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/events/event_manager_singleton.py +1 -1
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/index/index.py +2 -2
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/cache/local_byzer_storage_cache.py +1 -1
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/cache/local_duckdb_storage_cache.py +8 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/auto_coder_utils/chat_stream_out.py +3 -4
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/thread_utils.py +9 -27
- auto_coder-0.1.355/src/autocoder/version.py +1 -0
- auto_coder-0.1.354/src/autocoder/version.py +0 -1
- {auto_coder-0.1.354 → auto_coder-0.1.355}/LICENSE +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/README.md +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/setup.cfg +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/setup.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/auto_coder.egg-info/dependency_links.txt +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/auto_coder.egg-info/entry_points.txt +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/auto_coder.egg-info/requires.txt +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/auto_coder.egg-info/top_level.txt +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/auto_demand_organizer.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/auto_filegroup.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/auto_guess_query.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/auto_learn_from_commit.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/auto_review_commit.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/auto_tool.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/coder.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/designer.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/planner.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/agent/project_reader.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/auto_coder_rag.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/auto_coder_server.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/benchmark.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/chat/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/command_args.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/command_parser.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/commands/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/commands/tools.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/JupyterClient.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/ShellClient.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/action_yml_file_manager.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/anything2images.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/anything2img.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/audio.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/auto_coder_lang.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/auto_configure.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/buildin_tokenizer.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/chunk_validation.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/cleaner.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/code_auto_execute.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/code_auto_generate.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/code_auto_generate_diff.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/code_auto_generate_editblock.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/code_auto_generate_strict_diff.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/code_auto_merge.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/code_auto_merge_diff.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/code_auto_merge_editblock.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/code_auto_merge_strict_diff.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/code_modification_ranker.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/command_generator.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/command_templates.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/computer_use.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/conf_import_export.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/conf_utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/conf_validator.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/const.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/context_pruner.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/conversation_pruner.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/conversations/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/conversations/compatibility.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/conversations/conversation_manager.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/conversations/example.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/file_monitor/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/file_monitor/monitor.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/files.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/git_utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/ignorefiles/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/ignorefiles/ignore_file_utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/ignorefiles/test_ignore_file_utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/image_to_page.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/index_import_export.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/interpreter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/llm_rerank.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/mcp_hub.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/mcp_server.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/mcp_server_install.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/mcp_server_types.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/mcp_servers/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/mcp_servers/mcp_server_gpt4o_mini_search.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/mcp_servers/mcp_server_perplexity.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/mcp_tools.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/memory_manager.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/model_speed_tester.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/openai_content.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/printer.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/recall_validation.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/result_manager.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/rulefiles/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/rulefiles/autocoderrules_utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/run_cmd.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/save_formatted_log.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/screenshots.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/search.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/search_replace.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/shells.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/stats_panel.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/stream_out_type.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/sys_prompt.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/test_run_cmd.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/text.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/token_cost_caculate.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/types.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/utils_code_auto_generate.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/ask_followup_question_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/attempt_completion_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/base_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/execute_command_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/list_code_definition_names_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/list_files_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/list_package_info_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/plan_mode_respond_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/read_file_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/replace_in_file_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/search_files_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/test_search_files_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/use_mcp_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_tools/write_to_file_tool_resolver.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_edit_types.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/agent/agentic_tool_display.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_auto_generate.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_auto_generate_diff.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_auto_generate_editblock.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_auto_generate_strict_diff.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_auto_merge.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_auto_merge_diff.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_auto_merge_editblock.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_auto_merge_strict_diff.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/common/v2/code_manager.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/base_compiler.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/compiler_config_api.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/compiler_config_manager.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/compiler_factory.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/java_compiler.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/models.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/provided_compiler.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/python_compiler.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/reactjs_compiler.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/shadow_compiler.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/compilers/vue_compiler.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/data/byzerllm.md +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/data/tokenizer.json +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/db/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/db/store.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/dispacher/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/dispacher/actions/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/dispacher/actions/copilot.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/dispacher/actions/plugins/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/events/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/events/event_content.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/events/event_manager.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/events/event_store.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/events/event_types.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/helper/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/helper/project_creator.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/helper/rag_doc_creator.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/index/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/index/entry.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/index/filter/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/index/filter/normal_filter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/index/filter/quick_filter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/index/for_command.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/index/symbols_utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/index/types.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/lang.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/linters/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/linters/base_linter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/linters/linter_factory.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/linters/models.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/linters/python_linter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/linters/reactjs_linter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/linters/shadow_linter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/linters/vue_linter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/memory/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/memory/active_context_manager.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/memory/active_package.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/memory/async_processor.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/memory/directory_mapper.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/models.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/plugins/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/plugins/dynamic_completion_example.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/plugins/git_helper_plugin.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/plugins/sample_plugin.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/plugins/token_helper_plugin.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/plugins/utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/privacy/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/privacy/model_filter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/pyproject/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/api_server.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/cache/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/cache/base_cache.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/cache/byzer_storage_cache.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/cache/cache_result_merge.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/cache/failed_files_utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/cache/file_monitor_cache.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/cache/rag_file_meta.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/cache/simple_cache.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/conversation_to_queries.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/doc_filter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/document_retriever.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/lang.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/llm_wrapper.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/loaders/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/loaders/docx_loader.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/loaders/excel_loader.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/loaders/filter_utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/loaders/image_loader.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/loaders/pdf_loader.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/loaders/ppt_loader.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/loaders/test_image_loader.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/long_context_rag.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/qa_conversation_strategy.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/rag_config.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/rag_entry.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/raw_rag.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/relevant_utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/searchable.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/simple_directory_reader.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/simple_rag.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/stream_event/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/stream_event/event_writer.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/stream_event/types.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/token_checker.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/token_counter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/token_limiter.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/token_limiter_utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/types.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/utils.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/rag/variable_holder.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/regexproject/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/run_context.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/shadows/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/shadows/shadow_manager.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/suffixproject/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/tsproject/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/_markitdown.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/auto_coder_utils/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/auto_project_type.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/chat_auto_coder_utils/__init__.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/conversation_store.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/llm_client_interceptors.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/llms.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/log_capture.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/model_provider_selector.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/multi_turn.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/operate_config_api.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/print_table.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/project_structure.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/queue_communicate.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/request_event_queue.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/request_queue.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/rest.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/stream_thinking.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/tests.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/src/autocoder/utils/types.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/tests/test_action_regex_project.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/tests/test_action_yml_file_manager.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/tests/test_chat_auto_coder.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/tests/test_code_auto_merge_editblock.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/tests/test_command_completer.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/tests/test_planner.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/tests/test_plugins.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/tests/test_privacy.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/tests/test_queue_communicate.py +0 -0
- {auto_coder-0.1.354 → auto_coder-0.1.355}/tests/test_symbols_utils.py +0 -0
|
@@ -34,6 +34,8 @@ src/autocoder/agent/designer.py
|
|
|
34
34
|
src/autocoder/agent/planner.py
|
|
35
35
|
src/autocoder/agent/project_reader.py
|
|
36
36
|
src/autocoder/chat/__init__.py
|
|
37
|
+
src/autocoder/chat/conf_command.py
|
|
38
|
+
src/autocoder/chat/models_command.py
|
|
37
39
|
src/autocoder/commands/__init__.py
|
|
38
40
|
src/autocoder/commands/auto_command.py
|
|
39
41
|
src/autocoder/commands/auto_web.py
|
|
@@ -61,6 +63,7 @@ src/autocoder/common/code_auto_merge_editblock.py
|
|
|
61
63
|
src/autocoder/common/code_auto_merge_strict_diff.py
|
|
62
64
|
src/autocoder/common/code_modification_ranker.py
|
|
63
65
|
src/autocoder/common/command_completer.py
|
|
66
|
+
src/autocoder/common/command_completer_v2.py
|
|
64
67
|
src/autocoder/common/command_generator.py
|
|
65
68
|
src/autocoder/common/command_templates.py
|
|
66
69
|
src/autocoder/common/computer_use.py
|
|
@@ -676,7 +676,7 @@ class AgenticFilter:
|
|
|
676
676
|
)
|
|
677
677
|
|
|
678
678
|
while True:
|
|
679
|
-
global_cancel.check_and_raise()
|
|
679
|
+
global_cancel.check_and_raise(token=self.args.event_file)
|
|
680
680
|
# print(json.dumps(conversations, ensure_ascii=False, indent=4))
|
|
681
681
|
model_name = ",".join(llms_utils.get_llm_names(self.llm))
|
|
682
682
|
start_time = time.monotonic()
|
|
@@ -184,6 +184,14 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
184
184
|
f.write("\n/actions/")
|
|
185
185
|
f.write("\n/output.txt")
|
|
186
186
|
|
|
187
|
+
# 生成 .autocoderignore 文件,采用 .gitignore 格式
|
|
188
|
+
autocoderignore_path = os.path.join(source_dir, ".autocoderignore")
|
|
189
|
+
autocoderignore_content = (
|
|
190
|
+
"target\n"
|
|
191
|
+
)
|
|
192
|
+
with open(autocoderignore_path, "w", encoding="utf-8") as f:
|
|
193
|
+
f.write(autocoderignore_content)
|
|
194
|
+
|
|
187
195
|
print(
|
|
188
196
|
f"""Successfully initialized auto-coder project in {os.path.abspath(args.source_dir)}."""
|
|
189
197
|
)
|
|
@@ -34,7 +34,7 @@ from rich.console import Console
|
|
|
34
34
|
from rich.panel import Panel
|
|
35
35
|
from rich.table import Table
|
|
36
36
|
from rich.live import Live
|
|
37
|
-
|
|
37
|
+
# Removed Text import as it's only used in the deleted print_conf
|
|
38
38
|
from rich.live import Live
|
|
39
39
|
from rich.markdown import Markdown
|
|
40
40
|
from byzerllm.utils.nontext import Image
|
|
@@ -53,6 +53,7 @@ from autocoder.common.memory_manager import get_global_memory_file_paths
|
|
|
53
53
|
from autocoder import models as models_module
|
|
54
54
|
import shlex
|
|
55
55
|
from autocoder.utils.llms import get_single_llm
|
|
56
|
+
import fnmatch
|
|
56
57
|
import pkg_resources
|
|
57
58
|
from autocoder.common.printer import Printer
|
|
58
59
|
from autocoder.utils.thread_utils import run_in_raw_thread
|
|
@@ -541,7 +542,7 @@ def find_files_in_project(patterns: List[str]) -> List[str]:
|
|
|
541
542
|
def convert_config_value(key, value):
|
|
542
543
|
field_info = AutoCoderArgs.model_fields.get(key)
|
|
543
544
|
if field_info:
|
|
544
|
-
if value.lower() in ["true", "false"]:
|
|
545
|
+
if isinstance(value, str) and value.lower() in ["true", "false"]:
|
|
545
546
|
return value.lower() == "true"
|
|
546
547
|
elif "int" in str(field_info.annotation):
|
|
547
548
|
return int(value)
|
|
@@ -652,15 +653,15 @@ def load_memory():
|
|
|
652
653
|
_memory = json.load(f)
|
|
653
654
|
# clear memory
|
|
654
655
|
memory.clear()
|
|
655
|
-
memory.update(_memory)
|
|
656
|
-
completer.update_current_files(memory["current_files"]["files"])
|
|
656
|
+
memory.update(_memory)
|
|
657
657
|
return memory
|
|
658
658
|
|
|
659
659
|
def get_memory():
|
|
660
660
|
return load_memory()
|
|
661
661
|
|
|
662
662
|
|
|
663
|
-
|
|
663
|
+
from autocoder.common.command_completer_v2 import CommandCompleterV2
|
|
664
|
+
completer = CommandCompleterV2(commands,
|
|
664
665
|
file_system_model=CCFileSystemModel(project_root=project_root,
|
|
665
666
|
defaut_exclude_dirs=defaut_exclude_dirs,
|
|
666
667
|
get_all_file_names_in_project=get_all_file_names_in_project,
|
|
@@ -669,57 +670,8 @@ completer = CommandCompleter(commands,
|
|
|
669
670
|
get_all_file_in_project_with_dot=get_all_file_in_project_with_dot,
|
|
670
671
|
get_symbol_list=get_symbol_list
|
|
671
672
|
),
|
|
672
|
-
memory_model=CCMemoryModel(
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
def print_conf(content:Dict[str,Any]):
|
|
679
|
-
"""Display configuration dictionary in a Rich table format with enhanced visual styling.
|
|
680
|
-
|
|
681
|
-
Args:
|
|
682
|
-
conf (Dict[str, Any]): Configuration dictionary to display
|
|
683
|
-
"""
|
|
684
|
-
console = Console()
|
|
685
|
-
|
|
686
|
-
# Create a styled table with rounded borders
|
|
687
|
-
table = Table(
|
|
688
|
-
show_header=True,
|
|
689
|
-
header_style="bold magenta",
|
|
690
|
-
title=get_message("conf_title"),
|
|
691
|
-
title_style="bold blue",
|
|
692
|
-
border_style="blue",
|
|
693
|
-
show_lines=True
|
|
694
|
-
)
|
|
695
|
-
|
|
696
|
-
# Add columns with explicit width and alignment
|
|
697
|
-
table.add_column(get_message("conf_key"), style="cyan", justify="right", width=30, no_wrap=False)
|
|
698
|
-
table.add_column(get_message("conf_value"), style="green", justify="left", width=50, no_wrap=False)
|
|
699
|
-
|
|
700
|
-
# Sort keys for consistent display
|
|
701
|
-
for key in sorted(content.keys()):
|
|
702
|
-
value = content[key]
|
|
703
|
-
# Format value based on type
|
|
704
|
-
if isinstance(value, (dict, list)):
|
|
705
|
-
formatted_value = Text(json.dumps(value, indent=2), style="yellow")
|
|
706
|
-
elif isinstance(value, bool):
|
|
707
|
-
formatted_value = Text(str(value), style="bright_green" if value else "red")
|
|
708
|
-
elif isinstance(value, (int, float)):
|
|
709
|
-
formatted_value = Text(str(value), style="bright_cyan")
|
|
710
|
-
else:
|
|
711
|
-
formatted_value = Text(str(value), style="green")
|
|
712
|
-
|
|
713
|
-
table.add_row(str(key), formatted_value)
|
|
714
|
-
|
|
715
|
-
# Add padding and print with a panel
|
|
716
|
-
console.print(Panel(
|
|
717
|
-
table,
|
|
718
|
-
padding=(1, 2),
|
|
719
|
-
subtitle=f"[italic]{get_message('conf_subtitle')}[/italic]",
|
|
720
|
-
border_style="blue"
|
|
721
|
-
))
|
|
722
|
-
|
|
673
|
+
memory_model=CCMemoryModel(get_memory_func=get_memory,
|
|
674
|
+
save_memory_func=save_memory))
|
|
723
675
|
def revert():
|
|
724
676
|
result_manager = ResultManager()
|
|
725
677
|
last_yaml_file = get_last_yaml_file("actions")
|
|
@@ -1025,7 +977,6 @@ def add_files(args: List[str]):
|
|
|
1025
977
|
result_manager.append(content=f"No files matched.",
|
|
1026
978
|
meta={"action": "add_files","success":False, "input":{ "args": args}})
|
|
1027
979
|
|
|
1028
|
-
completer.update_current_files(memory["current_files"]["files"])
|
|
1029
980
|
save_memory()
|
|
1030
981
|
|
|
1031
982
|
|
|
@@ -1038,39 +989,61 @@ def remove_files(file_names: List[str]):
|
|
|
1038
989
|
memory["current_files"]["files"] = []
|
|
1039
990
|
memory["current_files"]["current_groups"] = []
|
|
1040
991
|
printer.print_in_terminal("remove_files_all", style="green")
|
|
1041
|
-
result_manager.append(content="All files removed.",
|
|
992
|
+
result_manager.append(content="All files removed.",
|
|
1042
993
|
meta={"action": "remove_files","success":True, "input":{ "file_names": file_names}})
|
|
1043
994
|
else:
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
995
|
+
files_to_remove = set()
|
|
996
|
+
current_files_abs = memory["current_files"]["files"]
|
|
997
|
+
|
|
998
|
+
for pattern in file_names:
|
|
999
|
+
pattern = pattern.strip() # Remove leading/trailing whitespace
|
|
1000
|
+
if not pattern:
|
|
1001
|
+
continue
|
|
1002
|
+
|
|
1003
|
+
is_wildcard = "*" in pattern or "?" in pattern
|
|
1004
|
+
|
|
1005
|
+
for file_path_abs in current_files_abs:
|
|
1006
|
+
relative_path = os.path.relpath(file_path_abs, project_root)
|
|
1007
|
+
basename = os.path.basename(file_path_abs)
|
|
1008
|
+
|
|
1009
|
+
matched = False
|
|
1010
|
+
if is_wildcard:
|
|
1011
|
+
# Match pattern against relative path or basename
|
|
1012
|
+
if fnmatch.fnmatch(relative_path, pattern) or fnmatch.fnmatch(basename, pattern):
|
|
1013
|
+
matched = True
|
|
1014
|
+
else:
|
|
1015
|
+
# Exact match against relative path, absolute path, or basename
|
|
1016
|
+
if relative_path == pattern or file_path_abs == pattern or basename == pattern:
|
|
1017
|
+
matched = True
|
|
1018
|
+
|
|
1019
|
+
if matched:
|
|
1020
|
+
files_to_remove.add(file_path_abs)
|
|
1021
|
+
|
|
1022
|
+
removed_files_list = list(files_to_remove)
|
|
1023
|
+
if removed_files_list:
|
|
1024
|
+
# Update memory by filtering out the files to remove
|
|
1025
|
+
memory["current_files"]["files"] = [
|
|
1026
|
+
f for f in current_files_abs if f not in files_to_remove
|
|
1027
|
+
]
|
|
1028
|
+
|
|
1029
|
+
table = Table(
|
|
1030
|
+
show_header=True,
|
|
1056
1031
|
header_style="bold magenta"
|
|
1057
1032
|
)
|
|
1058
|
-
table.add_column("
|
|
1059
|
-
for f in
|
|
1033
|
+
table.add_column(printer.get_message_from_key("file_column_title"), style="green")
|
|
1034
|
+
for f in removed_files_list:
|
|
1060
1035
|
table.add_row(os.path.relpath(f, project_root))
|
|
1061
1036
|
|
|
1062
1037
|
console = Console()
|
|
1063
1038
|
console.print(
|
|
1064
1039
|
Panel(table, border_style="green",
|
|
1065
|
-
title=printer.get_message_from_key("files_removed")))
|
|
1066
|
-
result_manager.append(content=f"Removed files: {', '.join(
|
|
1040
|
+
title=printer.get_message_from_key("files_removed")))
|
|
1041
|
+
result_manager.append(content=f"Removed files: {', '.join(removed_files_list)}",
|
|
1067
1042
|
meta={"action": "remove_files","success":True, "input":{ "file_names": file_names}})
|
|
1068
1043
|
else:
|
|
1069
1044
|
printer.print_in_terminal("remove_files_none", style="yellow")
|
|
1070
1045
|
result_manager.append(content=printer.get_message_from_key("remove_files_none"),
|
|
1071
|
-
meta={"action": "remove_files","success":False, "input":{ "file_names": file_names}})
|
|
1072
|
-
|
|
1073
|
-
completer.update_current_files(memory["current_files"]["files"])
|
|
1046
|
+
meta={"action": "remove_files","success":False, "input":{ "file_names": file_names}})
|
|
1074
1047
|
save_memory()
|
|
1075
1048
|
|
|
1076
1049
|
@run_in_raw_thread()
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
|
|
2
|
+
import os
|
|
3
|
+
import io
|
|
4
|
+
import contextlib
|
|
5
|
+
import fnmatch
|
|
6
|
+
import json
|
|
7
|
+
from typing import Dict, Any, List, Callable, Optional
|
|
8
|
+
from rich.console import Console
|
|
9
|
+
from rich.panel import Panel
|
|
10
|
+
from rich.table import Table
|
|
11
|
+
from rich.text import Text
|
|
12
|
+
from autocoder.auto_coder_runner import save_memory # Import save_memory
|
|
13
|
+
from autocoder.common.conf_validator import ConfigValidator
|
|
14
|
+
from autocoder.common.auto_coder_lang import get_message, get_message_with_format
|
|
15
|
+
|
|
16
|
+
# Helper function to print the configuration table (internal implementation)
|
|
17
|
+
def _print_conf_table(content: Dict[str, Any], title: str = "Configuration Settings"):
|
|
18
|
+
"""Display configuration dictionary in a Rich table format."""
|
|
19
|
+
console = Console(file=io.StringIO(), force_terminal=True, color_system="truecolor") # Capture output
|
|
20
|
+
|
|
21
|
+
# Create a styled table with rounded borders
|
|
22
|
+
table = Table(
|
|
23
|
+
show_header=True,
|
|
24
|
+
header_style="bold magenta",
|
|
25
|
+
title=title,
|
|
26
|
+
title_style="bold blue",
|
|
27
|
+
border_style="blue",
|
|
28
|
+
show_lines=True
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
# Add columns with explicit width and alignment
|
|
32
|
+
table.add_column(get_message("conf_key"), style="cyan", justify="right", width=30, no_wrap=False)
|
|
33
|
+
table.add_column(get_message("conf_value"), style="green", justify="left", width=50, no_wrap=False)
|
|
34
|
+
|
|
35
|
+
# Sort keys for consistent display
|
|
36
|
+
for key in sorted(content.keys()):
|
|
37
|
+
value = content[key]
|
|
38
|
+
# Format value based on type
|
|
39
|
+
if isinstance(value, (dict, list)):
|
|
40
|
+
formatted_value = Text(json.dumps(value, indent=2), style="yellow")
|
|
41
|
+
elif isinstance(value, bool):
|
|
42
|
+
formatted_value = Text(str(value), style="bright_green" if value else "red")
|
|
43
|
+
elif isinstance(value, (int, float)):
|
|
44
|
+
formatted_value = Text(str(value), style="bright_cyan")
|
|
45
|
+
else:
|
|
46
|
+
formatted_value = Text(str(value), style="green")
|
|
47
|
+
|
|
48
|
+
table.add_row(str(key), formatted_value)
|
|
49
|
+
|
|
50
|
+
# Add padding and print with a panel
|
|
51
|
+
console.print(Panel(
|
|
52
|
+
table,
|
|
53
|
+
padding=(1, 2),
|
|
54
|
+
subtitle=f"[italic]{get_message('conf_subtitle')}[/italic]",
|
|
55
|
+
border_style="blue"
|
|
56
|
+
))
|
|
57
|
+
return console.file.getvalue() # Return captured string
|
|
58
|
+
|
|
59
|
+
# --- Command Handlers ---
|
|
60
|
+
|
|
61
|
+
def _handle_list_conf(memory: Dict[str, Any], args: List[str]) -> str:
|
|
62
|
+
"""Handles listing configuration settings, supports wildcard filtering."""
|
|
63
|
+
conf = memory.get("conf", {})
|
|
64
|
+
pattern = args[0] if args else "*" # Default to all if no pattern
|
|
65
|
+
|
|
66
|
+
if pattern == "*":
|
|
67
|
+
title = get_message("conf_title")
|
|
68
|
+
filtered_conf = conf
|
|
69
|
+
else:
|
|
70
|
+
title = f"Filtered Configuration (Pattern: {pattern})"
|
|
71
|
+
filtered_conf = {k: v for k, v in conf.items() if fnmatch.fnmatch(k, pattern)}
|
|
72
|
+
if not filtered_conf:
|
|
73
|
+
return f"No configuration keys found matching pattern: {pattern}"
|
|
74
|
+
|
|
75
|
+
if not filtered_conf and pattern == "*":
|
|
76
|
+
return "No configurations set."
|
|
77
|
+
|
|
78
|
+
return _print_conf_table(filtered_conf, title)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def _handle_get_conf(memory: Dict[str, Any], args: List[str]) -> str:
|
|
82
|
+
"""Handles getting a specific configuration setting."""
|
|
83
|
+
if len(args) != 1:
|
|
84
|
+
return "Error: 'get' command requires exactly one argument (the key). Usage: /conf get <key>"
|
|
85
|
+
key = args[0]
|
|
86
|
+
conf = memory.get("conf", {})
|
|
87
|
+
value = conf.get(key)
|
|
88
|
+
if value is None:
|
|
89
|
+
return f"Error: Configuration key '{key}' not found."
|
|
90
|
+
else:
|
|
91
|
+
# Format value for better readability
|
|
92
|
+
if isinstance(value, (list, dict)):
|
|
93
|
+
formatted_value = json.dumps(value, indent=2)
|
|
94
|
+
else:
|
|
95
|
+
formatted_value = repr(value)
|
|
96
|
+
return f"{key}: {formatted_value}"
|
|
97
|
+
|
|
98
|
+
def _parse_value(value_str: str) -> Any:
|
|
99
|
+
"""Attempts to parse the value string into common types."""
|
|
100
|
+
value_str = value_str.strip()
|
|
101
|
+
if value_str.lower() == 'true':
|
|
102
|
+
return True
|
|
103
|
+
if value_str.lower() == 'false':
|
|
104
|
+
return False
|
|
105
|
+
if value_str.lower() == 'none' or value_str.lower() == 'null':
|
|
106
|
+
return None
|
|
107
|
+
# Keep quoted strings as strings without quotes
|
|
108
|
+
if (value_str.startswith('"') and value_str.endswith('"')) or \
|
|
109
|
+
(value_str.startswith("'") and value_str.endswith("'")):
|
|
110
|
+
return value_str[1:-1]
|
|
111
|
+
|
|
112
|
+
try:
|
|
113
|
+
# Try int first
|
|
114
|
+
return int(value_str)
|
|
115
|
+
except ValueError:
|
|
116
|
+
pass
|
|
117
|
+
try:
|
|
118
|
+
# Then try float
|
|
119
|
+
return float(value_str)
|
|
120
|
+
except ValueError:
|
|
121
|
+
pass
|
|
122
|
+
# If none of the above, return as string
|
|
123
|
+
return value_str
|
|
124
|
+
|
|
125
|
+
def _handle_set_conf(memory: Dict[str, Any], args: List[str]) -> str:
|
|
126
|
+
"""Handles setting or updating a configuration setting."""
|
|
127
|
+
if len(args) < 2:
|
|
128
|
+
return "Error: 'set' command requires at least two arguments (key and value). Usage: /conf set <key> <value>"
|
|
129
|
+
key = args[0]
|
|
130
|
+
# Join the rest of the arguments to form the value string
|
|
131
|
+
value_str = " ".join(args[1:])
|
|
132
|
+
try:
|
|
133
|
+
parsed_value = _parse_value(value_str)
|
|
134
|
+
|
|
135
|
+
# Validate before setting
|
|
136
|
+
product_mode = memory.get("conf", {}).get("product_mode", "lite")
|
|
137
|
+
ConfigValidator.validate(key, str(parsed_value), product_mode) # Validate the parsed value as string initially if needed, or adjust validation
|
|
138
|
+
|
|
139
|
+
if "conf" not in memory:
|
|
140
|
+
memory["conf"] = {}
|
|
141
|
+
memory["conf"][key] = parsed_value
|
|
142
|
+
save_memory() # Save after modification
|
|
143
|
+
# Use repr for confirmation message for clarity
|
|
144
|
+
return f"Configuration updated: {key} = {repr(parsed_value)}"
|
|
145
|
+
except Exception as e:
|
|
146
|
+
return f"Error setting configuration for key '{key}': {e}"
|
|
147
|
+
|
|
148
|
+
def _handle_delete_conf(memory: Dict[str, Any], args: List[str]) -> str:
|
|
149
|
+
"""Handles deleting a configuration setting."""
|
|
150
|
+
if len(args) != 1:
|
|
151
|
+
return "Error: 'delete' command requires exactly one argument (the key). Usage: /conf delete <key>"
|
|
152
|
+
key = args[0]
|
|
153
|
+
conf = memory.get("conf", {})
|
|
154
|
+
if key in conf:
|
|
155
|
+
try:
|
|
156
|
+
del memory["conf"][key]
|
|
157
|
+
save_memory() # Save after modification
|
|
158
|
+
return f"Configuration deleted: {key}"
|
|
159
|
+
except Exception as e:
|
|
160
|
+
return f"Error deleting key '{key}': {e}"
|
|
161
|
+
else:
|
|
162
|
+
return f"Error: Configuration key '{key}' not found."
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def _handle_help(memory: Dict[str, Any], args: List[str]) -> str:
|
|
166
|
+
"""Provides help text for the /conf command."""
|
|
167
|
+
if args:
|
|
168
|
+
return f"Error: 'help' command takes no arguments. Usage: /conf help"
|
|
169
|
+
|
|
170
|
+
help_text = """
|
|
171
|
+
/conf command usage:
|
|
172
|
+
/conf [pattern] - Show configurations. Optional wildcard pattern (e.g., *_model, api*).
|
|
173
|
+
/conf get <key> - Get the value of a specific configuration key.
|
|
174
|
+
/conf set <key>:<value> - Set or update a configuration key.
|
|
175
|
+
Value parsed (bool, int, float, None) or treated as string.
|
|
176
|
+
Use quotes ("value with spaces") for explicit strings.
|
|
177
|
+
/conf /drop <key> - Delete a configuration key.
|
|
178
|
+
/conf /export <path> - Export current configuration to a file.
|
|
179
|
+
/conf /import <path> - Import configuration from a file.
|
|
180
|
+
/conf help - Show this help message.
|
|
181
|
+
"""
|
|
182
|
+
return help_text.strip()
|
|
183
|
+
|
|
184
|
+
# Command dispatch table
|
|
185
|
+
COMMAND_HANDLERS: Dict[str, Callable[[Dict[str, Any], List[str]], str]] = {
|
|
186
|
+
"list": _handle_list_conf,
|
|
187
|
+
"show": _handle_list_conf, # Alias
|
|
188
|
+
"get": _handle_get_conf,
|
|
189
|
+
"set": _handle_set_conf,
|
|
190
|
+
"delete": _handle_delete_conf,
|
|
191
|
+
"del": _handle_delete_conf, # Alias
|
|
192
|
+
"rm": _handle_delete_conf, # Alias
|
|
193
|
+
"help": _handle_help,
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
def handle_conf_command(command_args: str, memory: Dict[str, Any]) -> str:
|
|
197
|
+
"""
|
|
198
|
+
Handles the /conf command, its subcommands, and wildcard listing.
|
|
199
|
+
|
|
200
|
+
Args:
|
|
201
|
+
command_args: The arguments string following the /conf command.
|
|
202
|
+
Example: "key:value", "get key", "set key value", "*_model", "/export path"
|
|
203
|
+
memory: The current session memory dictionary.
|
|
204
|
+
|
|
205
|
+
Returns:
|
|
206
|
+
A string response to be displayed to the user.
|
|
207
|
+
"""
|
|
208
|
+
conf_str = command_args.strip()
|
|
209
|
+
|
|
210
|
+
# Handle special subcommands first
|
|
211
|
+
if conf_str.startswith("/export"):
|
|
212
|
+
from autocoder.common.conf_import_export import export_conf
|
|
213
|
+
export_path = conf_str[len("/export"):].strip()
|
|
214
|
+
if not export_path:
|
|
215
|
+
return "Error: Please specify a path for export. Usage: /conf /export <path>"
|
|
216
|
+
try:
|
|
217
|
+
export_conf(os.getcwd(), export_path)
|
|
218
|
+
return f"Configuration exported successfully to {export_path}"
|
|
219
|
+
except Exception as e:
|
|
220
|
+
return f"Error exporting configuration: {e}"
|
|
221
|
+
elif conf_str.startswith("/import"):
|
|
222
|
+
from autocoder.common.conf_import_export import import_conf
|
|
223
|
+
import_path = conf_str[len("/import"):].strip()
|
|
224
|
+
if not import_path:
|
|
225
|
+
return "Error: Please specify a path for import. Usage: /conf /import <path>"
|
|
226
|
+
try:
|
|
227
|
+
import_conf(os.getcwd(), import_path)
|
|
228
|
+
# Reload memory after import might be needed depending on import_conf implementation
|
|
229
|
+
# load_memory() # Consider if import_conf modifies the passed memory or global state
|
|
230
|
+
return f"Configuration imported successfully from {import_path}. Use '/conf' to see changes."
|
|
231
|
+
except Exception as e:
|
|
232
|
+
return f"Error importing configuration: {e}"
|
|
233
|
+
|
|
234
|
+
# Handle regular commands and listing/filtering
|
|
235
|
+
args = conf_str.split()
|
|
236
|
+
|
|
237
|
+
if not args:
|
|
238
|
+
# Default action: list all configurations
|
|
239
|
+
return _handle_list_conf(memory, [])
|
|
240
|
+
else:
|
|
241
|
+
command = args[0].lower()
|
|
242
|
+
command_args_list = args[1:]
|
|
243
|
+
|
|
244
|
+
# Check if the first argument is a known command or potentially a pattern
|
|
245
|
+
handler = COMMAND_HANDLERS.get(command)
|
|
246
|
+
|
|
247
|
+
if handler:
|
|
248
|
+
# It's a known command (list, get, set, delete, help)
|
|
249
|
+
try:
|
|
250
|
+
return handler(memory, command_args_list)
|
|
251
|
+
except Exception as e:
|
|
252
|
+
return f"An unexpected error occurred while executing '/conf {command}': {e}"
|
|
253
|
+
elif "*" in command or "?" in command:
|
|
254
|
+
# Treat as a list/filter pattern if it contains wildcards and is not a known command
|
|
255
|
+
return _handle_list_conf(memory, [command]) # Pass the pattern as the argument to list
|
|
256
|
+
else:
|
|
257
|
+
# Handle legacy key:value format for setting (optional, can be removed if only set command is preferred)
|
|
258
|
+
if ":" in conf_str and len(args) == 1: # Check if it looks like key:value and is a single "word"
|
|
259
|
+
parts = conf_str.split(":", 1)
|
|
260
|
+
if len(parts) == 2:
|
|
261
|
+
key, value_str = parts[0].strip(), parts[1].strip()
|
|
262
|
+
if key and value_str:
|
|
263
|
+
return _handle_set_conf(memory, [key, value_str])
|
|
264
|
+
else:
|
|
265
|
+
return f"Error: Invalid key:value format in '{conf_str}'. Use '/conf set {key} {value_str}' or '/conf help'."
|
|
266
|
+
else:
|
|
267
|
+
return f"Error: Unknown command or invalid format '{conf_str}'. Type '/conf help' for available commands."
|
|
268
|
+
else:
|
|
269
|
+
# If it's not a known command, not a wildcard, and not key:value format
|
|
270
|
+
return f"Error: Unknown command '/conf {command}'. Type '/conf help' for available commands."
|