Affected component
AI chat agent
What happened?
backend/opencad_agent/prompting.py
@lru_cache(maxsize=1)
def _load_example_scripts() -> str:
examples_dir = Path(__file__).resolve().parents[2] / "examples"
example_files = [
"hardware_mounting_bracket.py",
"hardware_pcb_carrier.py",
"software_hmi_panel.py",
]
snippets: list[str] = []
for filename in example_files:
path = examples_dir / filename
if not path.exists():
continue
snippet = path.read_text(encoding="utf-8").strip()
snippets.append(f"examples/{filename}:\n```python\n{snippet}\n```")
return "\n\n".join(snippets)
This may have been important for helping the LLM know the codebase
Steps to reproduce
N/A
Expected behavior
N/A
OpenCAD version / commit SHA
N/A
How are you running OpenCAD?
Self-hosted (local dev)
Environment
Logs / stack traces
Affected component
AI chat agent
What happened?
backend/opencad_agent/prompting.py
This may have been important for helping the LLM know the codebase
Steps to reproduce
N/A
Expected behavior
N/A
OpenCAD version / commit SHA
N/A
How are you running OpenCAD?
Self-hosted (local dev)
Environment
Logs / stack traces