Fix export command in INDEX: config path relative to project root.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -19,12 +19,15 @@ from cam.import_transcripts import import_transcripts, list_archive_sessions #
|
||||
|
||||
def _default_cam_command(config_path: Path | None) -> str:
|
||||
if config_path is not None:
|
||||
rel = config_path
|
||||
rel_config: Path | str = config_path
|
||||
try:
|
||||
rel = config_path.relative_to(CAM_ROOT)
|
||||
rel_config = config_path.relative_to(CAM_ROOT.parent.parent)
|
||||
except ValueError:
|
||||
rel = config_path
|
||||
return f"python tools/cam/cam.py -c {rel} export"
|
||||
try:
|
||||
rel_config = Path("tools/cam") / config_path.relative_to(CAM_ROOT)
|
||||
except ValueError:
|
||||
rel_config = config_path
|
||||
return f"python tools/cam/cam.py -c {rel_config} export"
|
||||
return "python tools/cam/cam.py export"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user