File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -664,19 +664,20 @@ def has_existing_config(project_root: Path) -> tuple[bool, str | None]:
664664
665665 Returns:
666666 Tuple of (has_config, config_file_type).
667- config_file_type is "pyproject.toml", "package.json", or None.
667+ config_file_type is "pyproject.toml", "codeflash.toml", " package.json", or None.
668668
669669 """
670- # Check pyproject.toml
671- pyproject_path = project_root / "pyproject.toml"
672- if pyproject_path .exists ():
673- try :
674- with pyproject_path .open ("rb" ) as f :
675- data = tomlkit .parse (f .read ())
676- if "tool" in data and "codeflash" in data ["tool" ]:
677- return True , "pyproject.toml"
678- except Exception :
679- pass
670+ # Check TOML config files (pyproject.toml, codeflash.toml)
671+ for toml_filename in ("pyproject.toml" , "codeflash.toml" ):
672+ toml_path = project_root / toml_filename
673+ if toml_path .exists ():
674+ try :
675+ with toml_path .open ("rb" ) as f :
676+ data = tomlkit .parse (f .read ())
677+ if "tool" in data and "codeflash" in data ["tool" ]:
678+ return True , toml_filename
679+ except Exception :
680+ pass
680681
681682 # Check package.json
682683 package_json_path = project_root / "package.json"
You can’t perform that action at this time.
0 commit comments