ignore template path

This commit is contained in:
better629 2025-03-02 19:56:40 +08:00
parent 2c22a94aa4
commit e37d87b521
3 changed files with 3 additions and 1 deletions

View file

@ -74,6 +74,7 @@ Anything UNCLEAR: Mention unclear project aspects, then try to clarify it.
{system_design_example}
5. Use Editor.write to write the system design in markdown format. The file path must be "{{project}}/docs/system_design.md". Use command_name "end" when the system design is finished.
6. If not memtioned, always use Editor.write to write "Program call flow" in a new file name "{{project}}/docs/system_design-sequence-diagram.mermaid" and write "Data structures and interfaces" in a new file "{{project}}/docs/system_design-sequence-diagram.mermaid-class-diagram". Mermaid code only. Do not add "```mermaid".
7. Just continue the work, if the template path does not exits.
""".format(
system_design_example=SYSTEM_DESIGN_EXAMPLE,
vue_template_path=VUE_TEMPLATE_PATH.resolve().absolute(),

View file

@ -55,6 +55,7 @@ Note:
26. Engineer2.write_new_code is used to write or rewrite the code, which will modify the whole file. Editor.edit_file_by_replace is used to edit a small part of the file.
27. Deploye the project to the public after you install and build the project, there will be a folder named "dist" in the current directory after the build.
28. Use Engineer2.write_new_code to rewrite the whole file when you fail to use Editor.edit_file_by_replace more than three times.
29. Just continue the work, if the template path does not exits.
""".format(
vue_template_path=VUE_TEMPLATE_PATH.resolve().absolute(),
react_template_path=REACT_TEMPLATE_PATH.resolve().absolute(),

View file

@ -150,7 +150,7 @@ class ToolRecommender(BaseModel):
repair_llm_raw_output(output=ranked_tools, req_keys=[None], repair_type=RepairType.JSON)
)
except json.JSONDecodeError:
ranked_tools = await self.llm.aask(msg=JSON_REPAIR_PROMPT.format(json_data=rsp))
ranked_tools = await LLM().aask(msg=JSON_REPAIR_PROMPT.format(json_data=rsp))
ranked_tools = json.loads(CodeParser.parse_code(block=None, lang="json", text=ranked_tools))
except Exception:
tb = traceback.format_exc()