refactor(infra): cull unused infrastructure and file cache helpers
This commit is contained in:
@@ -140,17 +140,6 @@ def get_default_launcher() -> ExternalEditorLauncher:
|
||||
return launcher
|
||||
|
||||
|
||||
def resolve_project_editor_override(project_path: Optional[str]) -> Optional[str]:
|
||||
if not project_path:
|
||||
return None
|
||||
from src import models
|
||||
try:
|
||||
proj = models.load_project(project_path)
|
||||
return proj.get("default_editor")
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
|
||||
def create_temp_modified_file(content: str) -> str:
|
||||
"""
|
||||
[C: src/gui_2.py:App._open_patch_in_external_editor, tests/test_external_editor.py:TestHelperFunctions.test_create_temp_modified_file]
|
||||
|
||||
@@ -704,15 +704,6 @@ class ASTParser:
|
||||
def reset_client() -> None:
|
||||
pass
|
||||
|
||||
def content_block_type(path: Path) -> str:
|
||||
return "unsupported"
|
||||
|
||||
def get_file_id(path: Path) -> Optional[str]:
|
||||
return None
|
||||
|
||||
def evict(path: Path) -> None:
|
||||
pass
|
||||
|
||||
def list_cached() -> List[Dict[str, Any]]:
|
||||
return []
|
||||
|
||||
|
||||
@@ -87,15 +87,6 @@ def get_git_commit(git_dir: str) -> str:
|
||||
except Exception:
|
||||
return ""
|
||||
|
||||
def get_git_log(git_dir: str, n: int = 5) -> str:
|
||||
try:
|
||||
r = subprocess.run(
|
||||
["git", "log", "--oneline", f"-{n}"],
|
||||
capture_output=True, text=True, cwd=git_dir, timeout=5,
|
||||
)
|
||||
return r.stdout.strip() if r.returncode == 0 else ""
|
||||
except Exception:
|
||||
return ""
|
||||
# ── default structures ───────────────────────────────────────────────────────
|
||||
|
||||
def default_discussion() -> dict[str, Any]:
|
||||
|
||||
@@ -5,7 +5,6 @@ from src.models import TextEditorConfig, ExternalEditorConfig
|
||||
from src.external_editor import (
|
||||
ExternalEditorLauncher,
|
||||
get_default_launcher,
|
||||
resolve_project_editor_override,
|
||||
create_temp_modified_file,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user