auto-coder 0.1.353__py3-none-any.whl → 0.1.355__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.
Potentially problematic release.
This version of auto-coder might be problematic. Click here for more details.
- {auto_coder-0.1.353.dist-info → auto_coder-0.1.355.dist-info}/METADATA +1 -1
- {auto_coder-0.1.353.dist-info → auto_coder-0.1.355.dist-info}/RECORD +60 -45
- autocoder/agent/agentic_filter.py +1 -1
- autocoder/auto_coder.py +8 -0
- autocoder/auto_coder_rag.py +37 -1
- autocoder/auto_coder_runner.py +58 -77
- autocoder/chat/conf_command.py +270 -0
- autocoder/chat/models_command.py +485 -0
- autocoder/chat_auto_coder.py +29 -24
- autocoder/chat_auto_coder_lang.py +26 -2
- autocoder/commands/auto_command.py +60 -132
- autocoder/commands/auto_web.py +1 -1
- autocoder/commands/tools.py +1 -1
- autocoder/common/__init__.py +3 -1
- autocoder/common/command_completer.py +58 -12
- autocoder/common/command_completer_v2.py +576 -0
- autocoder/common/conversations/__init__.py +52 -0
- autocoder/common/conversations/compatibility.py +303 -0
- autocoder/common/conversations/conversation_manager.py +502 -0
- autocoder/common/conversations/example.py +152 -0
- autocoder/common/file_monitor/__init__.py +5 -0
- autocoder/common/file_monitor/monitor.py +383 -0
- autocoder/common/global_cancel.py +53 -16
- autocoder/common/ignorefiles/__init__.py +4 -0
- autocoder/common/ignorefiles/ignore_file_utils.py +103 -0
- autocoder/common/ignorefiles/test_ignore_file_utils.py +91 -0
- autocoder/common/rulefiles/__init__.py +15 -0
- autocoder/common/rulefiles/autocoderrules_utils.py +173 -0
- autocoder/common/save_formatted_log.py +54 -0
- autocoder/common/v2/agent/agentic_edit.py +10 -39
- autocoder/common/v2/agent/agentic_edit_tools/list_files_tool_resolver.py +1 -1
- autocoder/common/v2/agent/agentic_edit_tools/search_files_tool_resolver.py +73 -43
- autocoder/common/v2/code_agentic_editblock_manager.py +9 -9
- autocoder/common/v2/code_diff_manager.py +2 -2
- autocoder/common/v2/code_editblock_manager.py +31 -18
- autocoder/common/v2/code_strict_diff_manager.py +3 -2
- autocoder/dispacher/actions/action.py +6 -6
- autocoder/dispacher/actions/plugins/action_regex_project.py +2 -2
- autocoder/events/event_manager_singleton.py +1 -1
- autocoder/index/index.py +3 -3
- autocoder/models.py +22 -9
- autocoder/rag/api_server.py +14 -2
- autocoder/rag/cache/local_byzer_storage_cache.py +1 -1
- autocoder/rag/cache/local_duckdb_storage_cache.py +8 -0
- autocoder/rag/cache/simple_cache.py +63 -33
- autocoder/rag/loaders/docx_loader.py +1 -1
- autocoder/rag/loaders/filter_utils.py +133 -76
- autocoder/rag/loaders/image_loader.py +15 -3
- autocoder/rag/loaders/pdf_loader.py +2 -2
- autocoder/rag/long_context_rag.py +11 -0
- autocoder/rag/qa_conversation_strategy.py +5 -31
- autocoder/rag/utils.py +21 -2
- autocoder/utils/_markitdown.py +66 -25
- autocoder/utils/auto_coder_utils/chat_stream_out.py +4 -4
- autocoder/utils/thread_utils.py +9 -27
- autocoder/version.py +1 -1
- {auto_coder-0.1.353.dist-info → auto_coder-0.1.355.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.353.dist-info → auto_coder-0.1.355.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.353.dist-info → auto_coder-0.1.355.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.353.dist-info → auto_coder-0.1.355.dist-info}/top_level.txt +0 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
autocoder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
autocoder/auto_coder.py,sha256=
|
|
2
|
+
autocoder/auto_coder.py,sha256=zXLdn6sg2SFtdC7xoeWZo81lq_5yCGEQiU0MCeMZHvw,67064
|
|
3
3
|
autocoder/auto_coder_lang.py,sha256=Rtupq6N3_HT7JRhDKdgCBcwRaiAnyCOR_Gsp4jUomrI,3229
|
|
4
|
-
autocoder/auto_coder_rag.py,sha256=
|
|
4
|
+
autocoder/auto_coder_rag.py,sha256=ru5o86IaKylyVRlVORmnrdf3Q1To2eWi2KLdT9FMW0k,37580
|
|
5
5
|
autocoder/auto_coder_rag_client_mcp.py,sha256=QRxUbjc6A8UmDMQ8lXgZkjgqtq3lgKYeatJbDY6rSo0,6270
|
|
6
6
|
autocoder/auto_coder_rag_mcp.py,sha256=-RrjNwFaS2e5v8XDIrKR-zlUNUE8UBaeOtojffBrvJo,8521
|
|
7
|
-
autocoder/auto_coder_runner.py,sha256=
|
|
7
|
+
autocoder/auto_coder_runner.py,sha256=WyjqqhP7Iynn-Ez9qxxmXBhbu7gy8yDc0j79AaLvsMA,111641
|
|
8
8
|
autocoder/auto_coder_server.py,sha256=bLORGEclcVdbBVfM140JCI8WtdrU0jbgqdJIVVupiEU,20578
|
|
9
9
|
autocoder/benchmark.py,sha256=Ypomkdzd1T3GE6dRICY3Hj547dZ6_inqJbBJIp5QMco,4423
|
|
10
|
-
autocoder/chat_auto_coder.py,sha256=
|
|
11
|
-
autocoder/chat_auto_coder_lang.py,sha256=
|
|
10
|
+
autocoder/chat_auto_coder.py,sha256=AuXdymLN0WivUam7yzaVGu5C-HbLyEKbgt8pcnw_BM4,26681
|
|
11
|
+
autocoder/chat_auto_coder_lang.py,sha256=HRbTy_7vqmbO75EjiLvZWZZqn64CLq-uV4jH4YUv3Vg,23305
|
|
12
12
|
autocoder/command_args.py,sha256=HxflngkYtTrV17Vfgk6lyUyiG68jP2ftSc7FYr9AXwY,30585
|
|
13
13
|
autocoder/command_parser.py,sha256=fx1g9E6GaM273lGTcJqaFQ-hoksS_Ik2glBMnVltPCE,10013
|
|
14
14
|
autocoder/lang.py,sha256=PFtATuOhHRnfpqHQkXr6p4C893JvpsgwTMif3l-GEi0,14321
|
|
15
|
-
autocoder/models.py,sha256=
|
|
15
|
+
autocoder/models.py,sha256=Gu50IATQtZtgEir1PpCfwgH6o4ygw6XqqbQRj3lx5dU,13798
|
|
16
16
|
autocoder/run_context.py,sha256=IUfSO6_gp2Wt1blFWAmOpN0b0nDrTTk4LmtCYUBIoro,1643
|
|
17
|
-
autocoder/version.py,sha256=
|
|
17
|
+
autocoder/version.py,sha256=7GECYoV2yVDzNTSWr8-Ct821UU20ZKEAwmpVukWKIPg,23
|
|
18
18
|
autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
autocoder/agent/agentic_edit.py,sha256=XsfePZ-t6M-uBSdG1VLZXk1goqXk2HPeJ_A8IYyBuWQ,58896
|
|
20
20
|
autocoder/agent/agentic_edit_types.py,sha256=oFcDd_cxJ2yH9Ed1uTpD3BipudgoIEWDMPb5pAkq4gI,3288
|
|
21
|
-
autocoder/agent/agentic_filter.py,sha256=
|
|
21
|
+
autocoder/agent/agentic_filter.py,sha256=zlInIRhawKIYTJjCiJBWqPCOV5UtMbh5VnvszfTy2vo,39824
|
|
22
22
|
autocoder/agent/auto_demand_organizer.py,sha256=URAq0gSEiHeV_W4zwhOI_83kHz0Ryfj1gcfh5jwCv_w,6501
|
|
23
23
|
autocoder/agent/auto_filegroup.py,sha256=pBsAkBcpFTff-9L5OwI8xhf2xPKpl-aZwz-skF2B6dc,6296
|
|
24
24
|
autocoder/agent/auto_guess_query.py,sha256=rDSdhpPHcOGE5MuDXvIrhCXAPR4ARS1LqpyoLsx2Jhw,11374
|
|
@@ -43,13 +43,15 @@ autocoder/agent/agentic_edit_tools/search_files_tool_resolver.py,sha256=Xx0nqrgB
|
|
|
43
43
|
autocoder/agent/agentic_edit_tools/use_mcp_tool_resolver.py,sha256=5WWH8-lEZO29dLOby9GNjkr-JH5rW8UT-7JZ1LuUtM8,2531
|
|
44
44
|
autocoder/agent/agentic_edit_tools/write_to_file_tool_resolver.py,sha256=HPX1g7Nh7H8I3P2MNmIK4HXLh8IZYaedQgRZAeGxNdc,5135
|
|
45
45
|
autocoder/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
|
+
autocoder/chat/conf_command.py,sha256=GAZ5aoJeEOEdOjHLlrizn4d7hDr6bE2vgM1qoSNERuw,11260
|
|
47
|
+
autocoder/chat/models_command.py,sha256=yISjvqNbKHVapGcXMcsIwRFfPruJ5ruSqR_e8TqhaPw,20105
|
|
46
48
|
autocoder/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
|
-
autocoder/commands/auto_command.py,sha256=
|
|
48
|
-
autocoder/commands/auto_web.py,sha256=
|
|
49
|
-
autocoder/commands/tools.py,sha256=
|
|
49
|
+
autocoder/commands/auto_command.py,sha256=mVL_UCT4K7nFYK-V9GJxWp7gTffJHjLXJGThQwC0OIs,62099
|
|
50
|
+
autocoder/commands/auto_web.py,sha256=K0Gv7lil5UqmExr_sAJNOcwNxw_q1vhvre1jjQ7tA3w,39050
|
|
51
|
+
autocoder/commands/tools.py,sha256=IX_zx5mWAvQDED7wUHTqNtrCmLNo9ztFV1aZ6AflY4o,34292
|
|
50
52
|
autocoder/common/JupyterClient.py,sha256=O-wi6pXeAEYhAY24kDa0BINrLYvKS6rKyWe98pDClS0,2816
|
|
51
53
|
autocoder/common/ShellClient.py,sha256=fM1q8t_XMSbLBl2zkCNC2J9xuyKN3eXzGm6hHhqL2WY,2286
|
|
52
|
-
autocoder/common/__init__.py,sha256=
|
|
54
|
+
autocoder/common/__init__.py,sha256=dFTuPb94BDxKBUMXpvV4GTeUPs5HzP3PRzGEbpTqZAY,14682
|
|
53
55
|
autocoder/common/action_yml_file_manager.py,sha256=DdF5P1R_B_chCnnqoA2IgogakWLZk_nItiJZUfX0_Wo,17857
|
|
54
56
|
autocoder/common/anything2images.py,sha256=0ILBbWzY02M-CiWB-vzuomb_J1hVdxRcenAfIrAXq9M,25283
|
|
55
57
|
autocoder/common/anything2img.py,sha256=iZQmg8srXlD7N5uGl5b_ONKJMBjYoW8kPmokkG6ISF0,10118
|
|
@@ -69,7 +71,8 @@ autocoder/common/code_auto_merge_diff.py,sha256=DcljWrtlejq2cb9Gj-jBjvUQzRbCE2uM
|
|
|
69
71
|
autocoder/common/code_auto_merge_editblock.py,sha256=5PLH8Ey4GYsPNMGn36pSy_IgwgZ8-j1QF5FEv-THC-0,18397
|
|
70
72
|
autocoder/common/code_auto_merge_strict_diff.py,sha256=C35pFxhkgypsm50VDAFOBAT6YXMtzKTvIpEUH1GjZZg,13209
|
|
71
73
|
autocoder/common/code_modification_ranker.py,sha256=RwswmKhYae9ZPQHUFPUI-ZW51K5NNtwhFBdOH2I65ic,13592
|
|
72
|
-
autocoder/common/command_completer.py,sha256=
|
|
74
|
+
autocoder/common/command_completer.py,sha256=MiQiJZZbtGUvREH3gUrQe9b1ElXnPTYh9uuVcUsNlTc,38659
|
|
75
|
+
autocoder/common/command_completer_v2.py,sha256=8Vg6IxOnBWdx3iEJDNbgxAVyw9bzQ5xDUTMFvZcsSQ8,30031
|
|
73
76
|
autocoder/common/command_generator.py,sha256=YwB_E818vx0fQDOpLD61GivsSgLnrIoxKrY22ka49JU,2797
|
|
74
77
|
autocoder/common/command_templates.py,sha256=HjI-lo7H-XeQGsHKUtEI3vnhFH1QFibW9X7fahim8oE,8259
|
|
75
78
|
autocoder/common/computer_use.py,sha256=Z5RL-DgkcbF55YDsqnJ37loXGcm_1tzTheukjTTayJM,35816
|
|
@@ -81,7 +84,7 @@ autocoder/common/context_pruner.py,sha256=HlU5BmxpCX7uVTJUsTFLlXvkwcOQuidI9uCKZa
|
|
|
81
84
|
autocoder/common/conversation_pruner.py,sha256=pzmrQEa7pFzA66eYSS_h7VqP6ZwUABeooDQzm0PGu0A,5770
|
|
82
85
|
autocoder/common/files.py,sha256=nPiKcnUcYZbSUn3TskKeTVnAxCJRtuehPuB_5d2imX8,4618
|
|
83
86
|
autocoder/common/git_utils.py,sha256=lGFLxxoyMKjIRgLeE_9176T3rdKI13DZMd28Lowk218,27093
|
|
84
|
-
autocoder/common/global_cancel.py,sha256=
|
|
87
|
+
autocoder/common/global_cancel.py,sha256=EYMIzdIJHQjoYP4grxhBxSIT3tCJOy3ESULNd-cR-AY,4751
|
|
85
88
|
autocoder/common/image_to_page.py,sha256=yWiTJQ49Lm3j0FngiJhQ9u7qayqE_bOGb8Rk0TmSWx0,14123
|
|
86
89
|
autocoder/common/index_import_export.py,sha256=h758AYY1df6JMTKUXYmMkSgxItfymDt82XT7O-ygEuw,4565
|
|
87
90
|
autocoder/common/interpreter.py,sha256=62-dIakOunYB4yjmX8SHC0Gdy2h8NtxdgbpdqRZJ5vk,2833
|
|
@@ -99,6 +102,7 @@ autocoder/common/printer.py,sha256=T4XTAcQp5w1ZWYx5NAUXlIGd-9500Vl0JaG1JJXMdkg,2
|
|
|
99
102
|
autocoder/common/recall_validation.py,sha256=Avt9Q9dX3kG6Pf2zsdlOHmsjd-OeSj7U1PFBDp_Cve0,1700
|
|
100
103
|
autocoder/common/result_manager.py,sha256=nBcFRj5reBC7vp13M91f4B8iPW8B8OehayHlUdeAt1g,3776
|
|
101
104
|
autocoder/common/run_cmd.py,sha256=2VrJpeqooasUoc-WKVrvFfesmRR55kOpPmmYgpQrKVc,8283
|
|
105
|
+
autocoder/common/save_formatted_log.py,sha256=oI5Ge2Xk1yeutH92pgYd6amZ3N_2v6CNb6blqfUF9sc,1756
|
|
102
106
|
autocoder/common/screenshots.py,sha256=_gA-z1HxGjPShBrtgkdideq58MG6rqFB2qMUJKjrycs,3769
|
|
103
107
|
autocoder/common/search.py,sha256=245iPFgWhMldoUK3CqCP89ltaxZiNPK73evoG6Fp1h8,16518
|
|
104
108
|
autocoder/common/search_replace.py,sha256=GphFkc57Hb673CAwmbiocqTbw8vrV7TrZxtOhD0332g,22147
|
|
@@ -111,11 +115,22 @@ autocoder/common/text.py,sha256=KGRQq314GHBmY4MWG8ossRoQi1_DTotvhxchpn78c-k,1003
|
|
|
111
115
|
autocoder/common/token_cost_caculate.py,sha256=MSWJtl7YpQSUt-gFQoqUcJMblyPqHXe2ZioiZOFkV80,10085
|
|
112
116
|
autocoder/common/types.py,sha256=Cw_4RH-rGmAgQE-Ck69maMAMqlPCDA4Yj37QmuUY0mQ,713
|
|
113
117
|
autocoder/common/utils_code_auto_generate.py,sha256=Tvb3Mqxedj0Jhi0faKyWvILuNCty9fZi341fyIs33tA,4550
|
|
118
|
+
autocoder/common/conversations/__init__.py,sha256=xGZeOFrDsgg2fkPK1zmvYBDhAyX66FtgOcZaxhYKJXU,1338
|
|
119
|
+
autocoder/common/conversations/compatibility.py,sha256=WuBXB4-dw5X9LUMsB16VWbihvRZQ1tT99m6zuBwDfqE,9606
|
|
120
|
+
autocoder/common/conversations/conversation_manager.py,sha256=ZhuhfSdOTncqgy3nHPoEU7Cg0dCsSl-VPcvLbUlL2Tk,18295
|
|
121
|
+
autocoder/common/conversations/example.py,sha256=Pz_EhO6qneUFMfHZiDmGAClZ6b0V4T1sbC8tIMxX2RM,5437
|
|
122
|
+
autocoder/common/file_monitor/__init__.py,sha256=9reL3IEnyLWU77WjPzeprM8-4lCetlSMZ94Nuxk5KNg,85
|
|
123
|
+
autocoder/common/file_monitor/monitor.py,sha256=lnav8TkNHEK_XqQGWpHIrw6l0U5s99ZoB94NH1AEHa4,16623
|
|
124
|
+
autocoder/common/ignorefiles/__init__.py,sha256=P0hq7Avu1IeXBYEkPBZLsJhFzhzyktUWTqaRIXiAFLY,75
|
|
125
|
+
autocoder/common/ignorefiles/ignore_file_utils.py,sha256=H1gUjjYLHZ_4GZel9bN5lEgpTlOyfPdIhyNRqd7no4c,3484
|
|
126
|
+
autocoder/common/ignorefiles/test_ignore_file_utils.py,sha256=EydHG6E2iPsnbt-Jt8Go-WvRgFtBW6QkHUQ9nI4cF-w,3111
|
|
114
127
|
autocoder/common/mcp_servers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
115
128
|
autocoder/common/mcp_servers/mcp_server_gpt4o_mini_search.py,sha256=TApShxgoozLluobXHOK1-oAE1zm0-9jdRoPLQB1qwMI,5688
|
|
116
129
|
autocoder/common/mcp_servers/mcp_server_perplexity.py,sha256=CIC26UkfH1lYoVCjfyY5xGGYVx8h0oz0Uj1c7YJ3OPw,5560
|
|
130
|
+
autocoder/common/rulefiles/__init__.py,sha256=babSbPdFaXk1NvdHtH2zrJLb_tWd7d2ELIyS8NApY_Y,221
|
|
131
|
+
autocoder/common/rulefiles/autocoderrules_utils.py,sha256=yQy52jNBxfTYcgOnuuEYdvyOLKdKJWkfDSNQsjUKYMs,6572
|
|
117
132
|
autocoder/common/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
118
|
-
autocoder/common/v2/code_agentic_editblock_manager.py,sha256=
|
|
133
|
+
autocoder/common/v2/code_agentic_editblock_manager.py,sha256=pAh918YMgmLenXmNKXlmDPgKyVJjOuk69901VEEQHm4,34980
|
|
119
134
|
autocoder/common/v2/code_auto_generate.py,sha256=hdhTTb0r1A8_OSuUIkxSXrwf47pXnazphufMu1vpkhI,9327
|
|
120
135
|
autocoder/common/v2/code_auto_generate_diff.py,sha256=Cd42eFxm1GiQQobiZiG9ECu9dgsCgr3lNso21onhuKI,14543
|
|
121
136
|
autocoder/common/v2/code_auto_generate_editblock.py,sha256=VaBvhMg_ryEataxM_n0L08FN_LI1Wfjoq4ecXs9jZwQ,15059
|
|
@@ -124,12 +139,12 @@ autocoder/common/v2/code_auto_merge.py,sha256=FZHrIZyFUkFmv4EbproXfIIUfGx_L3EPfv
|
|
|
124
139
|
autocoder/common/v2/code_auto_merge_diff.py,sha256=DcljWrtlejq2cb9Gj-jBjvUQzRbCE2uMNGg8SBOhEnk,19271
|
|
125
140
|
autocoder/common/v2/code_auto_merge_editblock.py,sha256=rVohrpjTzgvWEX09GNRAQ0fbjjNjcxeP1bqczhFT8F8,20741
|
|
126
141
|
autocoder/common/v2/code_auto_merge_strict_diff.py,sha256=C35pFxhkgypsm50VDAFOBAT6YXMtzKTvIpEUH1GjZZg,13209
|
|
127
|
-
autocoder/common/v2/code_diff_manager.py,sha256=
|
|
128
|
-
autocoder/common/v2/code_editblock_manager.py,sha256=
|
|
142
|
+
autocoder/common/v2/code_diff_manager.py,sha256=GbYsc8E_aB4kg-wo_HzwS4oNLI5_EKCN9l646jG_pu8,13143
|
|
143
|
+
autocoder/common/v2/code_editblock_manager.py,sha256=DMwJw-FAM6VyaBQV3p4xespHpgZW5ZRBF4qhZPRXFxk,35605
|
|
129
144
|
autocoder/common/v2/code_manager.py,sha256=C403bS-f6urixwitlKHcml-J03hci-UyNwHJOqBiY6Q,9182
|
|
130
|
-
autocoder/common/v2/code_strict_diff_manager.py,sha256=
|
|
145
|
+
autocoder/common/v2/code_strict_diff_manager.py,sha256=Bys7tFAq4G03R1zUZuxrszBTvP4QB96jIw2y5BDLyRM,9424
|
|
131
146
|
autocoder/common/v2/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
132
|
-
autocoder/common/v2/agent/agentic_edit.py,sha256=
|
|
147
|
+
autocoder/common/v2/agent/agentic_edit.py,sha256=BY31ZsniFydN7sncDNQUmAkMJFT-4mhTcnzsmuRMPTM,98524
|
|
133
148
|
autocoder/common/v2/agent/agentic_edit_conversation.py,sha256=pFgWPWHKhZ4J9EcFmIdiGsrSolTZuYcH1qkgKdD8nwk,7726
|
|
134
149
|
autocoder/common/v2/agent/agentic_edit_types.py,sha256=VJMrictg6hJ3mC45VgQGRd43DyDUPDUvPV1Rf3z72NI,4776
|
|
135
150
|
autocoder/common/v2/agent/agentic_tool_display.py,sha256=WKirt-2V346KLnbHgH3NVJiK3xvriD9oaCWj2IdvzLU,7309
|
|
@@ -140,12 +155,12 @@ autocoder/common/v2/agent/agentic_edit_tools/attempt_completion_tool_resolver.py
|
|
|
140
155
|
autocoder/common/v2/agent/agentic_edit_tools/base_tool_resolver.py,sha256=Zid2m1uZd-2wVFGc_n_KAViXZyNjbdLSpI5n7ut1RUQ,1036
|
|
141
156
|
autocoder/common/v2/agent/agentic_edit_tools/execute_command_tool_resolver.py,sha256=sX00xzczfmyW6yPG3nMm0xO8p-WARQTiD4jcoUiTxsg,3844
|
|
142
157
|
autocoder/common/v2/agent/agentic_edit_tools/list_code_definition_names_tool_resolver.py,sha256=8QoMsADUDWliqiDt_dpguz31403syB8eeW0Pcw-qfb8,3842
|
|
143
|
-
autocoder/common/v2/agent/agentic_edit_tools/list_files_tool_resolver.py,sha256=
|
|
158
|
+
autocoder/common/v2/agent/agentic_edit_tools/list_files_tool_resolver.py,sha256=FvpEyBwAfrYvnxcQ_gt7vTmfgoFoR7qr-r1OPx13Xks,5475
|
|
144
159
|
autocoder/common/v2/agent/agentic_edit_tools/list_package_info_tool_resolver.py,sha256=dIdV12VuczHpHuHgx2B1j_3BZYc9PL0jfHCuBk9ryk8,2005
|
|
145
160
|
autocoder/common/v2/agent/agentic_edit_tools/plan_mode_respond_tool_resolver.py,sha256=lGT4_QYJK6Fa9f6HVSGo0cSsGK7qCsDYgJGUowNxPzk,1499
|
|
146
161
|
autocoder/common/v2/agent/agentic_edit_tools/read_file_tool_resolver.py,sha256=9Bh0KVbL0qiIqwChlb77biiBiETQ3zekxGe5Fj7hXAg,2800
|
|
147
162
|
autocoder/common/v2/agent/agentic_edit_tools/replace_in_file_tool_resolver.py,sha256=lpD4fCbVR8GTrynqXON69IjM94nPy3nuUL62Ashm5O4,7988
|
|
148
|
-
autocoder/common/v2/agent/agentic_edit_tools/search_files_tool_resolver.py,sha256=
|
|
163
|
+
autocoder/common/v2/agent/agentic_edit_tools/search_files_tool_resolver.py,sha256=ACvygitMVOroQ8I-07v9fIvX9Xm9bO1HrIW--Xv9qKw,6894
|
|
149
164
|
autocoder/common/v2/agent/agentic_edit_tools/test_search_files_tool_resolver.py,sha256=9eBo3WLkrr77iNotwIwVmH1ZL3UY0JQgLpdAIc9wTTM,6127
|
|
150
165
|
autocoder/common/v2/agent/agentic_edit_tools/use_mcp_tool_resolver.py,sha256=wM2Xy4bcnD0TSLEmcM8rvvyyWenN5_KQnJMO6hJ8lTE,1716
|
|
151
166
|
autocoder/common/v2/agent/agentic_edit_tools/write_to_file_tool_resolver.py,sha256=UO4SrkDek3WDlRdlHH022W1roSNMdMcipJqDxRBlheM,3044
|
|
@@ -167,15 +182,15 @@ autocoder/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
167
182
|
autocoder/db/store.py,sha256=tFT66bP2ZKIqZip-uhLkHRSLaaOAUUDZfozJwcqix3c,1908
|
|
168
183
|
autocoder/dispacher/__init__.py,sha256=GTGpU9KbyAu3QMsbecnETYHMoIDBfKKP8iEVsU8gKcg,957
|
|
169
184
|
autocoder/dispacher/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
170
|
-
autocoder/dispacher/actions/action.py,sha256=
|
|
185
|
+
autocoder/dispacher/actions/action.py,sha256=lszFrNZOmmFMJC0QaIjS-OEE2du5i6a81NjuJaexamk,22765
|
|
171
186
|
autocoder/dispacher/actions/copilot.py,sha256=2nQzKt8Sr40mIDOizZWyl4ekCwaHYklvgGlVfvhOlFM,13106
|
|
172
187
|
autocoder/dispacher/actions/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
173
|
-
autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=
|
|
188
|
+
autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=mziGcOtGafeABVITyNdHzCuI_-rorUlWoo1JfsXnPuk,7863
|
|
174
189
|
autocoder/dispacher/actions/plugins/action_translate.py,sha256=GEn7dZA22jy5WyzINomjmzzB795p2Olg-CJla97lRF8,7744
|
|
175
190
|
autocoder/events/__init__.py,sha256=1x_juwr9Ows2RADDa2LyI4QlmPxOVOXZeLO1cht-slM,1443
|
|
176
191
|
autocoder/events/event_content.py,sha256=eLHf5M1BifSqhzzEBgAWKn3JD5_z_1mWeNdZ53TpMqk,12240
|
|
177
192
|
autocoder/events/event_manager.py,sha256=ObbvPfNrrhC85w5VvsnLS9oy92oHEwqMN08qGPReNNA,11884
|
|
178
|
-
autocoder/events/event_manager_singleton.py,sha256=
|
|
193
|
+
autocoder/events/event_manager_singleton.py,sha256=zIyrkcJ1g5RUh4osQlJRCo4j0GphcVmb0vp7XGbRWEg,8907
|
|
179
194
|
autocoder/events/event_store.py,sha256=y6tT3P-o3yhDptrKi-UmqI_ZBNg7v21FriI3f7lo_ME,12709
|
|
180
195
|
autocoder/events/event_types.py,sha256=W_S6PTDIBdufcuPosgz64iITzQy79flL8s3hWB-vZ9o,3638
|
|
181
196
|
autocoder/helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -187,7 +202,7 @@ autocoder/ignorefiles/test_ignore_file_utils.py,sha256=961_5ilCgzyo09Luj457A4694
|
|
|
187
202
|
autocoder/index/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
188
203
|
autocoder/index/entry.py,sha256=Eb0SmwrgshQte3_IGL4GAB4_HXC2jbatrgrd2uPxQng,15306
|
|
189
204
|
autocoder/index/for_command.py,sha256=BFvljE4t6VaMBGboZAuhUCzVK0EitCy_n5D_7FEnihw,3204
|
|
190
|
-
autocoder/index/index.py,sha256=
|
|
205
|
+
autocoder/index/index.py,sha256=07CSX_t-yRLZhGt-DQC3OvzbQEukHfuhC8fjzWJM8Zk,32803
|
|
191
206
|
autocoder/index/symbols_utils.py,sha256=_EP7E_qWXxluAxq3FGZLlLfdrfwx3FmxCdulI8VGuac,2244
|
|
192
207
|
autocoder/index/types.py,sha256=a2s_KV5FJlq7jqA2ELSo9E1sjuLwDB-JJYMhSpzBAhU,596
|
|
193
208
|
autocoder/index/filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -217,14 +232,14 @@ autocoder/privacy/__init__.py,sha256=LnIVvGu_K66zCE-yhN_-dPO8R80pQyedCsXJ7wRqQaI
|
|
|
217
232
|
autocoder/privacy/model_filter.py,sha256=-N9ZvxxDKpxU7hkn-tKv-QHyXjvkCopUaKgvJwTOGQs,3369
|
|
218
233
|
autocoder/pyproject/__init__.py,sha256=qn0_-6O_LP-ZH91nneYrn3yaIMYCYYRD1Z3MSNhXUXI,13754
|
|
219
234
|
autocoder/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
220
|
-
autocoder/rag/api_server.py,sha256=
|
|
235
|
+
autocoder/rag/api_server.py,sha256=WyX4lHfHrs6_jovFfZTbXGaewyd0127J_PaI6VtgGic,13677
|
|
221
236
|
autocoder/rag/conversation_to_queries.py,sha256=xwmErn4WbdADnhK1me-h_6fV3KYrl_y1qPNQl1aoI6o,4810
|
|
222
237
|
autocoder/rag/doc_filter.py,sha256=UduVO2mlrngwJICrefjDJTYfdmQ4GcRXrfWDQ7xXksk,14206
|
|
223
238
|
autocoder/rag/document_retriever.py,sha256=rFwbAuHTvEFJq16HQNlmRLyJp2ddn2RNFslw_ncU7NI,8847
|
|
224
239
|
autocoder/rag/lang.py,sha256=HvcMeu6jReEJOGxyLMn4rwBoD-myFwmykS3VLceBJLs,3364
|
|
225
240
|
autocoder/rag/llm_wrapper.py,sha256=Ht5GF5yJtrztoliujsZzx_ooWZmHkd5xLZKcGEiicZw,4303
|
|
226
|
-
autocoder/rag/long_context_rag.py,sha256=
|
|
227
|
-
autocoder/rag/qa_conversation_strategy.py,sha256=
|
|
241
|
+
autocoder/rag/long_context_rag.py,sha256=SuCqKKYzlQYknqPOxZlToub4duiRzLhcoJLbdYjAQrI,42847
|
|
242
|
+
autocoder/rag/qa_conversation_strategy.py,sha256=4CiMK88apKbJ2YM4HHq1KGpr5jUkTh0_m_aCyt-JYgc,10568
|
|
228
243
|
autocoder/rag/rag_config.py,sha256=8LwFcTd8OJWWwi1_WY4IzjqgtT6RyE2j4PjxS5cCTDE,802
|
|
229
244
|
autocoder/rag/rag_entry.py,sha256=6TKtErZ0Us9XSV6HgRKXA6yR3SiZGPHpynOKSaR1wgE,2463
|
|
230
245
|
autocoder/rag/raw_rag.py,sha256=BOr0YGf3umjqXOIDVO1LXQ0bIHx8hzBdiubND2ezyxc,2946
|
|
@@ -237,7 +252,7 @@ autocoder/rag/token_counter.py,sha256=C-Lwc4oIjJpZDEqp9WLHGOe6hb4yhrdJpMtkrtp_1q
|
|
|
237
252
|
autocoder/rag/token_limiter.py,sha256=3VgJF4may3ESyATmBIiOe05oc3VsidJcJTJ5EhoSvH8,18854
|
|
238
253
|
autocoder/rag/token_limiter_utils.py,sha256=FATNEXBnFJy8IK3PWNt1pspIv8wuTgy3F_ACNvqoc4I,404
|
|
239
254
|
autocoder/rag/types.py,sha256=WPgLpUTwbk0BAikyDOc0NOEwV5k73myF38zWdOuYdC4,2499
|
|
240
|
-
autocoder/rag/utils.py,sha256=
|
|
255
|
+
autocoder/rag/utils.py,sha256=FPK3Vvk9X9tUuOu4_LctZN5WnRVuEjFiffRtE-pHn0s,6318
|
|
241
256
|
autocoder/rag/variable_holder.py,sha256=PFvBjFcR7-fNDD4Vcsc8CpH2Te057vcpwJMxtrfUgKI,75
|
|
242
257
|
autocoder/rag/cache/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
243
258
|
autocoder/rag/cache/base_cache.py,sha256=EaYYYbclMBvnlOUoM7qonnluwZX5oSvUjdvGvFun8_8,742
|
|
@@ -245,16 +260,16 @@ autocoder/rag/cache/byzer_storage_cache.py,sha256=jq3drQo5r21NO03_wB1P_kSFcaWVrN
|
|
|
245
260
|
autocoder/rag/cache/cache_result_merge.py,sha256=VnTdbT2OMBmWl_83bqds97d9_M33IhPNX8tF7KH2GMM,10556
|
|
246
261
|
autocoder/rag/cache/failed_files_utils.py,sha256=kITguXANLC3EEJy5JoKzNXrtwvTkmZT-ANPwcno42Ck,1183
|
|
247
262
|
autocoder/rag/cache/file_monitor_cache.py,sha256=lwNrm8epdA3ubc3X3q_BCU1zr_Ul5gEOaM5X5ICeeeQ,9580
|
|
248
|
-
autocoder/rag/cache/local_byzer_storage_cache.py,sha256=
|
|
249
|
-
autocoder/rag/cache/local_duckdb_storage_cache.py,sha256=
|
|
263
|
+
autocoder/rag/cache/local_byzer_storage_cache.py,sha256=iekuUFacUZOVeIqp9Sjgm0DuAeBOmmW3eMk3HQtG0fE,31197
|
|
264
|
+
autocoder/rag/cache/local_duckdb_storage_cache.py,sha256=5HhtfMbngt9OigjcU2K8PBlvzR4YMJi9JdZJocFr2BU,36014
|
|
250
265
|
autocoder/rag/cache/rag_file_meta.py,sha256=RQ3n4wfkHlB-1ljS3sFSi8ijbsUPeIqBSgjmmbRuwRI,20521
|
|
251
|
-
autocoder/rag/cache/simple_cache.py,sha256=
|
|
266
|
+
autocoder/rag/cache/simple_cache.py,sha256=oT5tBSsBkUQ5DNVBzz5P3QJih-wKWdPyCAjmtFgl90Q,18270
|
|
252
267
|
autocoder/rag/loaders/__init__.py,sha256=EQHEZ5Cmz-mGP2SllUTvcIbYCnF7W149dNpNItfs0yE,304
|
|
253
|
-
autocoder/rag/loaders/docx_loader.py,sha256=
|
|
268
|
+
autocoder/rag/loaders/docx_loader.py,sha256=fDwFMfQcrjuiNXlc4NDpEygtg88rclqSPCcPYRSphhE,622
|
|
254
269
|
autocoder/rag/loaders/excel_loader.py,sha256=Ue8YB1z_kBs8SjIPuBskyM08Q1JiONs_BJZPrzi59oo,896
|
|
255
|
-
autocoder/rag/loaders/filter_utils.py,sha256=
|
|
256
|
-
autocoder/rag/loaders/image_loader.py,sha256=
|
|
257
|
-
autocoder/rag/loaders/pdf_loader.py,sha256=
|
|
270
|
+
autocoder/rag/loaders/filter_utils.py,sha256=Y-m8ckhCQvwTaPtcnlY66dhaHBzNtyhXbXEzzudUbho,6169
|
|
271
|
+
autocoder/rag/loaders/image_loader.py,sha256=GVBMWwLWUaGYcYYe_gUwVHmz71C1Cz3mFsCk4FnKtfE,22622
|
|
272
|
+
autocoder/rag/loaders/pdf_loader.py,sha256=S9hYCC-4XAKliKVbCrVkuNLetOvJVRtIzef_gjbNJpM,779
|
|
258
273
|
autocoder/rag/loaders/ppt_loader.py,sha256=7VEYc-bqgK8VHCoGC3DIUcqbpda-E5jQF9lYLqP256I,1681
|
|
259
274
|
autocoder/rag/loaders/test_image_loader.py,sha256=oy_j8xkFgPZ0vhz6czTVPh7IwdVWkgh5gE-UA2xCATQ,5753
|
|
260
275
|
autocoder/rag/stream_event/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -267,7 +282,7 @@ autocoder/shadows/shadow_manager.py,sha256=_DINnvD3oPaHopagL3B3PL0FFfEz7U6DYSEvE
|
|
|
267
282
|
autocoder/suffixproject/__init__.py,sha256=Rew-M9W4pgO9cvw9UCdrc6QVCPdBhVcIpPBnJxrLJ3M,10374
|
|
268
283
|
autocoder/tsproject/__init__.py,sha256=e_TWVyXQQxYKsXqdQZuFVqNCQLdtBVNJRTs0fgLXVdA,11055
|
|
269
284
|
autocoder/utils/__init__.py,sha256=W47ac6IOZhNR1rdbho9fvhHnPI_N1i4oMcZOwxLelbU,1123
|
|
270
|
-
autocoder/utils/_markitdown.py,sha256=
|
|
285
|
+
autocoder/utils/_markitdown.py,sha256=nxchvmt1hEtJsdXfwnMN-6OY0XhctE2ZftQsxXcaZh8,51296
|
|
271
286
|
autocoder/utils/auto_project_type.py,sha256=9_-wE9aavjbPiNSUVKxttJAdu5i5fu-zHyPYHr5XtWk,4422
|
|
272
287
|
autocoder/utils/coder.py,sha256=rK8e0svQBe0NOP26dIGToUXgha_hUDgxlWoC_p_r7oc,5698
|
|
273
288
|
autocoder/utils/conversation_store.py,sha256=esd9zLarKYe0ZsYqjjwHc_ksmVQDDEhVt-Ejul2oyys,1178
|
|
@@ -285,14 +300,14 @@ autocoder/utils/request_queue.py,sha256=nwp6PMtgTCiuwJI24p8OLNZjUiprC-TsefQrhMI-
|
|
|
285
300
|
autocoder/utils/rest.py,sha256=hLBhr78y-WVnV0oQf9Rxc22EwqF78KINkScvYa1MuYA,6435
|
|
286
301
|
autocoder/utils/stream_thinking.py,sha256=vbDObflBFW53eWEjMTEHf3nyL167_cqpDLh9zRx7Yk8,7015
|
|
287
302
|
autocoder/utils/tests.py,sha256=BqphrwyycGAvs-5mhH8pKtMZdObwhFtJ5MC_ZAOiLq8,1340
|
|
288
|
-
autocoder/utils/thread_utils.py,sha256=
|
|
303
|
+
autocoder/utils/thread_utils.py,sha256=1x17W-xkbUCInrdXDBStbkJbpGHLbWHhCpZLjz95Lrw,4579
|
|
289
304
|
autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
290
305
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
291
|
-
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=
|
|
306
|
+
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=t902pKxQ5xM7zgIHiAOsTPLwxhE6VuvXAqPy751S7fg,14096
|
|
292
307
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
293
|
-
auto_coder-0.1.
|
|
294
|
-
auto_coder-0.1.
|
|
295
|
-
auto_coder-0.1.
|
|
296
|
-
auto_coder-0.1.
|
|
297
|
-
auto_coder-0.1.
|
|
298
|
-
auto_coder-0.1.
|
|
308
|
+
auto_coder-0.1.355.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
309
|
+
auto_coder-0.1.355.dist-info/METADATA,sha256=9L8A3C31H4OupJufj7n2PShr2cv3hrbsqBmS3s03eaU,2751
|
|
310
|
+
auto_coder-0.1.355.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
311
|
+
auto_coder-0.1.355.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
312
|
+
auto_coder-0.1.355.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
313
|
+
auto_coder-0.1.355.dist-info/RECORD,,
|
|
@@ -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()
|
autocoder/auto_coder.py
CHANGED
|
@@ -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
|
)
|
autocoder/auto_coder_rag.py
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
logging.getLogger("ppocr").setLevel(logging.WARNING)
|
|
3
|
+
|
|
1
4
|
import argparse
|
|
2
5
|
from typing import Optional, List
|
|
3
6
|
import byzerllm
|
|
@@ -19,8 +22,11 @@ from rich.table import Table
|
|
|
19
22
|
import os
|
|
20
23
|
import hashlib
|
|
21
24
|
from loguru import logger
|
|
25
|
+
import sys
|
|
22
26
|
import asyncio
|
|
23
27
|
from datetime import datetime
|
|
28
|
+
from autocoder.common.file_monitor.monitor import FileMonitor
|
|
29
|
+
from autocoder.common.rulefiles.autocoderrules_utils import get_rules
|
|
24
30
|
|
|
25
31
|
from autocoder.rag.utils import process_file_local
|
|
26
32
|
import pkg_resources
|
|
@@ -567,6 +573,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
567
573
|
# Generate unique name for RAG build if doc_dir exists
|
|
568
574
|
if server_args.doc_dir:
|
|
569
575
|
auto_coder_args.rag_build_name = generate_unique_name_from_path(server_args.doc_dir)
|
|
576
|
+
auto_coder_args.source_dir = server_args.doc_dir
|
|
570
577
|
logger.info(f"Generated RAG build name: {auto_coder_args.rag_build_name}")
|
|
571
578
|
|
|
572
579
|
if auto_coder_args.enable_hybrid_index and args.product_mode == "pro":
|
|
@@ -741,9 +748,38 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
741
748
|
service_info.save()
|
|
742
749
|
except Exception as e:
|
|
743
750
|
logger.warning(f"Failed to save service info: {str(e)}")
|
|
751
|
+
|
|
752
|
+
# Start FileMonitor if monitor_mode is enabled and source_dir is provided
|
|
753
|
+
if server_args.doc_dir:
|
|
754
|
+
try:
|
|
755
|
+
# Use singleton pattern to get/create monitor instance
|
|
756
|
+
# FileMonitor ensures only one instance runs per root_dir
|
|
757
|
+
monitor = FileMonitor(server_args.doc_dir)
|
|
758
|
+
if not monitor.is_running():
|
|
759
|
+
# TODO: Register specific callbacks here if needed in the future
|
|
760
|
+
# Example: monitor.register(os.path.join(args.source_dir, "specific_file.py"), my_callback)
|
|
761
|
+
monitor.start()
|
|
762
|
+
logger.info(f"File monitor started for directory: {server_args.doc_dir}")
|
|
763
|
+
else:
|
|
764
|
+
# Log if monitor was already running (e.g., started by another part of the app)
|
|
765
|
+
# Check if the existing monitor's root matches the current request
|
|
766
|
+
if monitor.root_dir == os.path.abspath(server_args.doc_dir):
|
|
767
|
+
logger.info(f"File monitor already running for directory: {monitor.root_dir}")
|
|
768
|
+
else:
|
|
769
|
+
logger.warning(f"File monitor is running for a different directory ({monitor.root_dir}), cannot start a new one for {args.source_dir}.")
|
|
770
|
+
|
|
771
|
+
logger.info(f"Getting rules for {server_args.doc_dir}")
|
|
772
|
+
_ = get_rules(server_args.doc_dir)
|
|
773
|
+
|
|
774
|
+
except ValueError as ve: # Catch specific error if root_dir is invalid during init
|
|
775
|
+
logger.error(f"Failed to initialize file monitor for {args.source_dir}: {ve}")
|
|
776
|
+
except ImportError as ie: # Catch if watchfiles is not installed
|
|
777
|
+
logger.error(f"Failed to start file monitor: {ie}")
|
|
778
|
+
except Exception as e:
|
|
779
|
+
logger.error(f"An unexpected error occurred while starting file monitor for {args.source_dir}: {e}")
|
|
744
780
|
|
|
745
781
|
serve(llm=llm_wrapper, args=server_args)
|
|
746
|
-
elif args.command == "build_hybrid_index":
|
|
782
|
+
elif args.command == "build_hybrid_index":
|
|
747
783
|
auto_coder_args = AutoCoderArgs(
|
|
748
784
|
**{
|
|
749
785
|
arg: getattr(args, arg)
|
autocoder/auto_coder_runner.py
CHANGED
|
@@ -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
|
|
@@ -63,6 +64,7 @@ from autocoder import command_parser as CommandParser
|
|
|
63
64
|
from loguru import logger as global_logger
|
|
64
65
|
from autocoder.utils.project_structure import EnhancedFileAnalyzer
|
|
65
66
|
from autocoder.common import SourceCodeList,SourceCode
|
|
67
|
+
from autocoder.common.file_monitor import FileMonitor
|
|
66
68
|
|
|
67
69
|
|
|
68
70
|
## 对外API,用于第三方集成 auto-coder 使用。
|
|
@@ -96,6 +98,7 @@ memory = {
|
|
|
96
98
|
|
|
97
99
|
project_root = os.getcwd()
|
|
98
100
|
|
|
101
|
+
|
|
99
102
|
base_persist_dir = os.path.join(project_root,".auto-coder", "plugins", "chat-auto-coder")
|
|
100
103
|
|
|
101
104
|
defaut_exclude_dirs = [".git", "node_modules", "dist", "build", "__pycache__",".auto-coder"]
|
|
@@ -255,6 +258,12 @@ def configure_logger():
|
|
|
255
258
|
|
|
256
259
|
configure_logger()
|
|
257
260
|
|
|
261
|
+
try:
|
|
262
|
+
FileMonitor(project_root).start()
|
|
263
|
+
except Exception as e:
|
|
264
|
+
global_logger.error(f"Failed to start file monitor: {e}")
|
|
265
|
+
global_logger.exception(e)
|
|
266
|
+
|
|
258
267
|
def initialize_system(args:InitializeSystemRequest):
|
|
259
268
|
from autocoder.utils.model_provider_selector import ModelProviderSelector
|
|
260
269
|
from autocoder import models as models_module
|
|
@@ -533,7 +542,7 @@ def find_files_in_project(patterns: List[str]) -> List[str]:
|
|
|
533
542
|
def convert_config_value(key, value):
|
|
534
543
|
field_info = AutoCoderArgs.model_fields.get(key)
|
|
535
544
|
if field_info:
|
|
536
|
-
if value.lower() in ["true", "false"]:
|
|
545
|
+
if isinstance(value, str) and value.lower() in ["true", "false"]:
|
|
537
546
|
return value.lower() == "true"
|
|
538
547
|
elif "int" in str(field_info.annotation):
|
|
539
548
|
return int(value)
|
|
@@ -644,15 +653,15 @@ def load_memory():
|
|
|
644
653
|
_memory = json.load(f)
|
|
645
654
|
# clear memory
|
|
646
655
|
memory.clear()
|
|
647
|
-
memory.update(_memory)
|
|
648
|
-
completer.update_current_files(memory["current_files"]["files"])
|
|
656
|
+
memory.update(_memory)
|
|
649
657
|
return memory
|
|
650
658
|
|
|
651
659
|
def get_memory():
|
|
652
660
|
return load_memory()
|
|
653
661
|
|
|
654
662
|
|
|
655
|
-
|
|
663
|
+
from autocoder.common.command_completer_v2 import CommandCompleterV2
|
|
664
|
+
completer = CommandCompleterV2(commands,
|
|
656
665
|
file_system_model=CCFileSystemModel(project_root=project_root,
|
|
657
666
|
defaut_exclude_dirs=defaut_exclude_dirs,
|
|
658
667
|
get_all_file_names_in_project=get_all_file_names_in_project,
|
|
@@ -661,57 +670,8 @@ completer = CommandCompleter(commands,
|
|
|
661
670
|
get_all_file_in_project_with_dot=get_all_file_in_project_with_dot,
|
|
662
671
|
get_symbol_list=get_symbol_list
|
|
663
672
|
),
|
|
664
|
-
memory_model=CCMemoryModel(
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
def print_conf(content:Dict[str,Any]):
|
|
671
|
-
"""Display configuration dictionary in a Rich table format with enhanced visual styling.
|
|
672
|
-
|
|
673
|
-
Args:
|
|
674
|
-
conf (Dict[str, Any]): Configuration dictionary to display
|
|
675
|
-
"""
|
|
676
|
-
console = Console()
|
|
677
|
-
|
|
678
|
-
# Create a styled table with rounded borders
|
|
679
|
-
table = Table(
|
|
680
|
-
show_header=True,
|
|
681
|
-
header_style="bold magenta",
|
|
682
|
-
title=get_message("conf_title"),
|
|
683
|
-
title_style="bold blue",
|
|
684
|
-
border_style="blue",
|
|
685
|
-
show_lines=True
|
|
686
|
-
)
|
|
687
|
-
|
|
688
|
-
# Add columns with explicit width and alignment
|
|
689
|
-
table.add_column(get_message("conf_key"), style="cyan", justify="right", width=30, no_wrap=False)
|
|
690
|
-
table.add_column(get_message("conf_value"), style="green", justify="left", width=50, no_wrap=False)
|
|
691
|
-
|
|
692
|
-
# Sort keys for consistent display
|
|
693
|
-
for key in sorted(content.keys()):
|
|
694
|
-
value = content[key]
|
|
695
|
-
# Format value based on type
|
|
696
|
-
if isinstance(value, (dict, list)):
|
|
697
|
-
formatted_value = Text(json.dumps(value, indent=2), style="yellow")
|
|
698
|
-
elif isinstance(value, bool):
|
|
699
|
-
formatted_value = Text(str(value), style="bright_green" if value else "red")
|
|
700
|
-
elif isinstance(value, (int, float)):
|
|
701
|
-
formatted_value = Text(str(value), style="bright_cyan")
|
|
702
|
-
else:
|
|
703
|
-
formatted_value = Text(str(value), style="green")
|
|
704
|
-
|
|
705
|
-
table.add_row(str(key), formatted_value)
|
|
706
|
-
|
|
707
|
-
# Add padding and print with a panel
|
|
708
|
-
console.print(Panel(
|
|
709
|
-
table,
|
|
710
|
-
padding=(1, 2),
|
|
711
|
-
subtitle=f"[italic]{get_message('conf_subtitle')}[/italic]",
|
|
712
|
-
border_style="blue"
|
|
713
|
-
))
|
|
714
|
-
|
|
673
|
+
memory_model=CCMemoryModel(get_memory_func=get_memory,
|
|
674
|
+
save_memory_func=save_memory))
|
|
715
675
|
def revert():
|
|
716
676
|
result_manager = ResultManager()
|
|
717
677
|
last_yaml_file = get_last_yaml_file("actions")
|
|
@@ -1017,7 +977,6 @@ def add_files(args: List[str]):
|
|
|
1017
977
|
result_manager.append(content=f"No files matched.",
|
|
1018
978
|
meta={"action": "add_files","success":False, "input":{ "args": args}})
|
|
1019
979
|
|
|
1020
|
-
completer.update_current_files(memory["current_files"]["files"])
|
|
1021
980
|
save_memory()
|
|
1022
981
|
|
|
1023
982
|
|
|
@@ -1030,39 +989,61 @@ def remove_files(file_names: List[str]):
|
|
|
1030
989
|
memory["current_files"]["files"] = []
|
|
1031
990
|
memory["current_files"]["current_groups"] = []
|
|
1032
991
|
printer.print_in_terminal("remove_files_all", style="green")
|
|
1033
|
-
result_manager.append(content="All files removed.",
|
|
992
|
+
result_manager.append(content="All files removed.",
|
|
1034
993
|
meta={"action": "remove_files","success":True, "input":{ "file_names": file_names}})
|
|
1035
994
|
else:
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
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,
|
|
1048
1031
|
header_style="bold magenta"
|
|
1049
1032
|
)
|
|
1050
|
-
table.add_column("
|
|
1051
|
-
for f in
|
|
1033
|
+
table.add_column(printer.get_message_from_key("file_column_title"), style="green")
|
|
1034
|
+
for f in removed_files_list:
|
|
1052
1035
|
table.add_row(os.path.relpath(f, project_root))
|
|
1053
1036
|
|
|
1054
1037
|
console = Console()
|
|
1055
1038
|
console.print(
|
|
1056
1039
|
Panel(table, border_style="green",
|
|
1057
|
-
title=printer.get_message_from_key("files_removed")))
|
|
1058
|
-
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)}",
|
|
1059
1042
|
meta={"action": "remove_files","success":True, "input":{ "file_names": file_names}})
|
|
1060
1043
|
else:
|
|
1061
1044
|
printer.print_in_terminal("remove_files_none", style="yellow")
|
|
1062
1045
|
result_manager.append(content=printer.get_message_from_key("remove_files_none"),
|
|
1063
|
-
meta={"action": "remove_files","success":False, "input":{ "file_names": file_names}})
|
|
1064
|
-
|
|
1065
|
-
completer.update_current_files(memory["current_files"]["files"])
|
|
1046
|
+
meta={"action": "remove_files","success":False, "input":{ "file_names": file_names}})
|
|
1066
1047
|
save_memory()
|
|
1067
1048
|
|
|
1068
1049
|
@run_in_raw_thread()
|