auto-coder 0.1.331__py3-none-any.whl → 0.1.332__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.331.dist-info → auto_coder-0.1.332.dist-info}/METADATA +1 -1
- {auto_coder-0.1.331.dist-info → auto_coder-0.1.332.dist-info}/RECORD +23 -21
- autocoder/agent/agentic_filter.py +928 -0
- autocoder/auto_coder.py +5 -23
- autocoder/auto_coder_runner.py +2 -0
- autocoder/commands/auto_command.py +1 -1
- autocoder/commands/tools.py +68 -3
- autocoder/common/__init__.py +2 -0
- autocoder/common/auto_coder_lang.py +9 -1
- autocoder/common/code_modification_ranker.py +6 -2
- autocoder/common/conf_utils.py +36 -0
- autocoder/common/stream_out_type.py +4 -2
- autocoder/common/types.py +2 -2
- autocoder/common/v2/code_auto_merge_editblock.py +1 -1
- autocoder/common/v2/code_diff_manager.py +73 -6
- autocoder/common/v2/code_editblock_manager.py +480 -163
- autocoder/index/entry.py +35 -10
- autocoder/linters/shadow_linter.py +4 -0
- autocoder/version.py +1 -1
- {auto_coder-0.1.331.dist-info → auto_coder-0.1.332.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.331.dist-info → auto_coder-0.1.332.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.331.dist-info → auto_coder-0.1.332.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.331.dist-info → auto_coder-0.1.332.dist-info}/top_level.txt +0 -0
autocoder/index/entry.py
CHANGED
|
@@ -30,6 +30,7 @@ from autocoder.common.action_yml_file_manager import ActionYmlFileManager
|
|
|
30
30
|
|
|
31
31
|
from autocoder.events.event_manager_singleton import get_event_manager
|
|
32
32
|
from autocoder.events import event_content as EventContentCreator
|
|
33
|
+
from autocoder.agent.agentic_filter import AgenticFilter
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
def build_index_and_filter_files(
|
|
@@ -94,22 +95,46 @@ def build_index_and_filter_files(
|
|
|
94
95
|
phase_end = time.monotonic()
|
|
95
96
|
stats["timings"]["build_index"] = phase_end - phase_start
|
|
96
97
|
|
|
97
|
-
|
|
98
98
|
if not args.skip_filter_index and args.index_filter_model:
|
|
99
|
+
|
|
99
100
|
model_name = getattr(
|
|
100
101
|
index_manager.index_filter_llm, 'default_model_name', None)
|
|
101
102
|
if not model_name:
|
|
102
103
|
model_name = "unknown(without default model name)"
|
|
103
|
-
printer.print_in_terminal(
|
|
104
|
-
"quick_filter_start", style="blue", model_name=model_name)
|
|
105
|
-
quick_filter = QuickFilter(index_manager, stats, sources)
|
|
106
|
-
quick_filter_result = quick_filter.filter(
|
|
107
|
-
index_manager.read_index(), args.query)
|
|
108
104
|
|
|
109
|
-
|
|
105
|
+
if args.enable_agentic_filter:
|
|
106
|
+
from autocoder.agent.agentic_filter import AgenticFilterRequest, AgenticFilter, CommandConfig, MemoryConfig
|
|
107
|
+
from autocoder.common.conf_utils import load_memory
|
|
108
|
+
|
|
109
|
+
_memory = load_memory(args)
|
|
110
|
+
|
|
111
|
+
def save_memory_func():
|
|
112
|
+
pass
|
|
113
|
+
|
|
114
|
+
tuner = AgenticFilter(index_manager.index_filter_llm,
|
|
115
|
+
args=args,
|
|
116
|
+
conversation_history=[],
|
|
117
|
+
memory_config=MemoryConfig(
|
|
118
|
+
memory=_memory, save_memory_func=save_memory_func),
|
|
119
|
+
command_config=None)
|
|
120
|
+
response = tuner.analyze(
|
|
121
|
+
AgenticFilterRequest(user_input=args.query))
|
|
122
|
+
if response:
|
|
123
|
+
for file in response.files:
|
|
124
|
+
final_files[file.path] = TargetFile(
|
|
125
|
+
file_path=file.path, reason="Agentic Filter")
|
|
126
|
+
else:
|
|
127
|
+
printer.print_in_terminal(
|
|
128
|
+
"quick_filter_start", style="blue", model_name=model_name)
|
|
129
|
+
|
|
130
|
+
quick_filter = QuickFilter(index_manager, stats, sources)
|
|
131
|
+
quick_filter_result = quick_filter.filter(
|
|
132
|
+
index_manager.read_index(), args.query)
|
|
133
|
+
|
|
134
|
+
final_files.update(quick_filter_result.files)
|
|
110
135
|
|
|
111
|
-
|
|
112
|
-
|
|
136
|
+
if quick_filter_result.file_positions:
|
|
137
|
+
file_positions.update(quick_filter_result.file_positions)
|
|
113
138
|
|
|
114
139
|
if not args.skip_filter_index and not args.index_filter_model:
|
|
115
140
|
model_name = getattr(index_manager.llm, 'default_model_name', None)
|
|
@@ -352,7 +377,7 @@ def build_index_and_filter_files(
|
|
|
352
377
|
).to_dict()
|
|
353
378
|
),
|
|
354
379
|
metadata=EventMetadata(
|
|
355
|
-
action_file=args.file
|
|
380
|
+
action_file=args.file
|
|
356
381
|
).to_dict()
|
|
357
382
|
)
|
|
358
383
|
|
|
@@ -16,6 +16,7 @@ from autocoder.linters.models import (
|
|
|
16
16
|
IssuePosition,
|
|
17
17
|
IssueSeverity
|
|
18
18
|
)
|
|
19
|
+
from loguru import logger as global_logger
|
|
19
20
|
|
|
20
21
|
class ShadowLinter:
|
|
21
22
|
"""
|
|
@@ -32,6 +33,7 @@ class ShadowLinter:
|
|
|
32
33
|
"""
|
|
33
34
|
self.shadow_manager = shadow_manager
|
|
34
35
|
self.verbose = verbose
|
|
36
|
+
self.logger = global_logger.bind(name="ShadowLinter")
|
|
35
37
|
|
|
36
38
|
def lint_shadow_file(self, shadow_path: str, fix: bool = False) -> FileLintResult:
|
|
37
39
|
"""
|
|
@@ -117,8 +119,10 @@ class ShadowLinter:
|
|
|
117
119
|
|
|
118
120
|
# 处理每个影子文件
|
|
119
121
|
for shadow_path in shadow_files:
|
|
122
|
+
self.logger.info(f"正在检查文件: {shadow_path}")
|
|
120
123
|
try:
|
|
121
124
|
file_result = self.lint_shadow_file(shadow_path, fix=fix)
|
|
125
|
+
self.logger.info(f"检查完成: {shadow_path}")
|
|
122
126
|
# lint_shadow_file现在总是返回有效的FileLintResult,不再需要检查None
|
|
123
127
|
project_path = self.shadow_manager.from_shadow_path(shadow_path)
|
|
124
128
|
|
autocoder/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.332"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|