Skip to content

Commit 3a45e72

Browse files
Merge pull request #83 from Grigorij-Dudnik/dev
new release - bugs chroma solved
2 parents e8361c2 + 715d195 commit 3a45e72

File tree

7 files changed

+15
-3
lines changed

7 files changed

+15
-3
lines changed

manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def setup_workflow(self):
159159
return manager_workflow.compile()
160160

161161
def run(self):
162+
"""Start the Manager agent to plan and manage project tasks interactively."""
162163
print_formatted("😀 Hello! I'm Manager agent. Let's plan your project together!", color="green")
163164

164165
messages = get_manager_messages(self.saved_messages_path)

non_src/tests/manual_tests/executor_scenario1.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
load_dotenv(find_dotenv())
1313

1414
folder_with_project_files = repo_directory.joinpath(
15-
"non_src/tests/manual_tests/projects_files", "executoro"
16-
"_scenario_1_files"
15+
"non_src/tests/manual_tests/projects_files", "executor_scenario_1_files"
1716
)
1817
tmp_folder = pathlib.Path(__file__).parent.resolve().joinpath("sandbox_work_dir")
1918
setup_work_dir(manual_tests_folder=tmp_folder, test_files_dir=folder_with_project_files)

single_task_coder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232

3333
def run_clean_coder_pipeline(task: str, work_dir: str, task_id: str=None):
34+
"""Execute the complete Clean Coder pipeline including research, planning, execution, and debugging phases."""
3435
researcher = Researcher(task_id=task_id)
3536
files, image_paths = researcher.research_task(task)
3637

src/prompts/manager_system.prompt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Avoid creating flaky tasks, where it's unclear how to do task and if it is neede
88

99
- Never make up information when describing task. Ask human or make file research to get more info instead.
1010
- Never write code inside of task description.
11+
- If you don't know how exactly task should be done - again, do not make it up. Instead, ask programmer in description to figure it out.
1112

1213

1314
Here is description of changes in the project you work on:

src/tools/rag/index_file_descriptions.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ def upload_descriptions_to_vdb():
207207
# Clear the batch lists
208208
docs = []
209209
ids = []
210+
# avoid upserting if no docs here (empty folder)
211+
if not docs:
212+
return
210213
# upsert remaining docs
211214
collection.upsert(documents=docs, ids=ids)
212215

@@ -232,6 +235,10 @@ def upsert_file_list(file_list):
232235
file_path = Path(file_path)
233236
docs.append(content)
234237
ids.append(file_path.name.replace("=", "/").removesuffix(".txt"))
238+
239+
# avoid upserting if no docs here (no files changed)
240+
if not docs:
241+
return
235242
collection.upsert(documents=docs, ids=ids)
236243
print_formatted("Re-indexing of modified files completed.", color="green")
237244

src/tools/rag/retrieval.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22
import chromadb
3+
from chromadb.errors import NotFoundError
34
from pathlib import Path
45
from dotenv import load_dotenv, find_dotenv
56
from src.utilities.llms import init_llms_mini
@@ -42,7 +43,7 @@ def get_collection():
4243
# )
4344
try:
4445
return chroma_client.get_collection(name=collection_name) # , embedding_function=embedding_function)
45-
except ValueError:
46+
except NotFoundError:
4647
return False
4748

4849

src/utilities/util_functions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ def invoke_tool_native(tool_call, tools):
197197

198198

199199
def exchange_file_contents(state, files, work_dir):
200+
"""Update state messages by replacing old file contents with current file contents."""
200201
# Remove old one
201202
state["messages"] = [msg for msg in state["messages"] if not hasattr(msg, "contains_file_contents")]
202203
# Add new file contents
@@ -225,6 +226,7 @@ def bad_tool_call_looped(state):
225226

226227

227228
def create_frontend_feedback_story():
229+
"""Create and open a frontend feedback story template file for user configuration."""
228230
frontend_feedback_story_path = os.path.join(Work.dir(), ".clean_coder", "frontend_feedback_story.txt")
229231
if not os.path.exists(frontend_feedback_story_path):
230232
with open(frontend_feedback_story_path, "w") as file:

0 commit comments

Comments
 (0)