Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
62c24f5
fix: dummy change to trigger please release patch bump
runemalm Jul 11, 2025
81c7135
Merge master.
runemalm Jul 15, 2025
8f66244
chore(ci): add cz toml file
runemalm Jul 15, 2025
4e1059a
chore(ci): replace bump version package with custom script
runemalm Jul 15, 2025
ae3f6e2
chore: install typing-extensions missing after uninstalled package
runemalm Jul 15, 2025
a16a2f1
feat: add support for adding value object intents
runemalm Jul 15, 2025
27b9833
Merge branch 'master' into develop
runemalm Jul 15, 2025
7ce2f15
chore: add missing permission to release workflow
runemalm Jul 15, 2025
d9e6383
Merge branch 'master' into develop
runemalm Jul 15, 2025
0c3a73b
Merge branch 'master' into develop
runemalm Jul 15, 2025
49f739f
chore: fix bump_version.py script (look at all commits since last rel…
runemalm Jul 15, 2025
37c26cf
chore: fix badge in readme
runemalm Jul 15, 2025
2825dbd
Add target to test install released codius package with a specific py…
runemalm Jul 19, 2025
8a0be1b
Move makefile targets.
runemalm Jul 19, 2025
f8a38d0
chore: replace pipenv with poetry
runemalm Jul 19, 2025
806799a
chore: regenerate poetry.lock after pyproject.toml changes
runemalm Jul 19, 2025
f9e12fd
chore: install missing pyfakefs dev package
runemalm Jul 19, 2025
7a7a88b
chore: sync version to pyproject.toml on bump
runemalm Jul 20, 2025
acf9441
chore: fix dependency issues
runemalm Jul 20, 2025
6a5a263
chore: move plan step example json to plan_examples.py
runemalm Jul 20, 2025
3c5fa92
fix: deletion flow lead to crash
runemalm Jul 20, 2025
8d87baa
Merge master.
runemalm Jul 20, 2025
86e995f
fix: crash on requesting to delete building blocks
runemalm Jul 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/codius/graph/nodes/apply_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ def apply_changes(state: dict) -> dict:
deleted_paths = []
for plan_item in state.get("plan", []):
if plan_item["type"] == "delete_directory":
dir_path = Path(plan_item["path"])
dir_path = project_root / plan_item["path"]
if dir_path.exists() and dir_path.is_dir():
shutil.rmtree(dir_path)
deleted_paths.append(dir_path)
elif plan_item["type"] == "delete_file":
file_path = Path(plan_item["path"])
file_path = project_root / plan_item["path"]
if file_path.exists() and file_path.is_file():
file_path.unlink()
deleted_paths.append(file_path)

file_list = "\n".join([
f"✅ {str(f.relative_to(generated_dir))}" for f in generated_files
] + [
f"❌️ {str(p)}" for p in deleted_paths
f"❌️ {str(p.relative_to(project_root))}" for p in deleted_paths
])

state["final_output"] = f"Applied changes:\n\n{file_list}"
Expand Down
3 changes: 2 additions & 1 deletion src/codius/graph/nodes/preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def preview(state: dict) -> dict:

session_id = state.get('session_id')
generated_dir = metadata_service.get_generated_path(session_id)
project_root = Path(state["project_metadata"]["project_root"])

console = Console()
session = PromptSession()
Expand All @@ -41,7 +42,7 @@ def preview(state: dict) -> dict:

# Show deletions
for item in deletions:
file_path = Path(item["path"])
file_path = project_root / item["path"]
if file_path.exists():
try:
content = file_path.read_text()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ def __init__(self, convention_service: OpenDddConventionService, tree_sitter_ser
def create_file(self, file_plan: dict, output_dir: Path, project_root: Path) -> Optional[dict]:
template_name = file_plan.get("template")
context = file_plan.get("context", {})
absolute_path = Path(file_plan["path"]).resolve()
relative_path = absolute_path.relative_to(project_root)
relative_path = Path(file_plan["path"])

try:
template = self.jinja_env.get_template(f"{template_name}.cs.j2")
Expand Down Expand Up @@ -55,12 +54,11 @@ def modify_file(
project_root: Path,
created_files_map: dict[str, str]
) -> Optional[dict]:
absolute_path = Path(path).resolve()
relative_path = absolute_path.relative_to(project_root)
file_path_str = str(project_root / relative_path)
relative_path = Path(path)
relative_path_str = str(relative_path)

if file_path_str in created_files_map:
current_code = created_files_map[file_path_str]
if relative_path_str in created_files_map:
current_code = created_files_map[relative_path_str]
else:
try:
current_code = (project_root / relative_path).read_text(encoding="utf-8")
Expand Down