Private
Public Access
refactor(consumers): migrate 85 'from src.models import' sites to direct subsystem imports
Per post_module_taxonomy_de_cruft_20260627 Phase 2 (FR7). Each
'from src.models import X' for a moved class is rewritten to
'from src.<destination> import X':
Ticket, Track, WorkerContext, TrackState, TrackMetadata,
ThinkingSegment, EMPTY_TRACK_STATE -> src.mma
ProjectContext, ProjectMeta, ProjectOutput, ProjectFiles,
ProjectScreenshots, ProjectDiscussion, EMPTY_PROJECT_CONTEXT -> src.project
FileItem, Preset, ContextPreset, ContextFileEntry,
NamedViewPreset -> src.project_files
Tool, ToolPreset -> src.tool_presets
BiasProfile -> src.tool_bias
TextEditorConfig, ExternalEditorConfig,
EMPTY_TEXT_EDITOR_CONFIG -> src.external_editor
Persona -> src.personas
WorkspaceProfile -> src.workspace_manager
MCPServerConfig, MCPConfiguration, VectorStoreConfig,
RAGConfig, load_mcp_config -> src.mcp_client
NOT touched (kept on src.models; Phase 3 or Phase 4 will move them):
GenerateRequest, ConfirmRequest, DEFAULT_TOOL_CATEGORIES, Metadata, PROVIDERS
Migration was performed by the one-time script
scripts/tier2/artifacts/post_module_taxonomy_de_cruft_20260627/migrate_imports.py
which uses a class-to-module map and re.sub() to rewrite each
'from src.models import X' line.
Total: 85 import lines rewritten across 71 files.
Note: this commit depends on the v2 SHIPPED work
(origin/tier2/module_taxonomy_refactor_20260627) being merged into
this branch NEXT. On master (without the v2 SHIPPED commits), the
destination modules do not exist and these imports would fail.
This commit is contained in:
@@ -9,7 +9,7 @@ import tempfile
|
||||
from pathlib import Path
|
||||
from typing import Optional, List, Dict, Any
|
||||
|
||||
from src.models import ExternalEditorConfig, TextEditorConfig
|
||||
from src.external_editor import ExternalEditorConfig, TextEditorConfig
|
||||
from src.result_types import ErrorInfo, ErrorKind, Result
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class ExternalEditorLauncher:
|
||||
"""
|
||||
[C: tests/test_external_editor.py:TestExternalEditorLauncher.test_get_editor_by_name, tests/test_external_editor.py:TestExternalEditorLauncher.test_get_editor_returns_default, tests/test_external_editor.py:TestExternalEditorLauncher.test_get_editor_unknown_name]
|
||||
"""
|
||||
from src.models import EMPTY_TEXT_EDITOR_CONFIG
|
||||
from src.external_editor import EMPTY_TEXT_EDITOR_CONFIG
|
||||
if editor_name:
|
||||
return self.config.editors.get(editor_name) or EMPTY_TEXT_EDITOR_CONFIG
|
||||
return self.config.get_default()
|
||||
@@ -96,7 +96,7 @@ def _find_vscode_common_paths() -> str:
|
||||
|
||||
|
||||
def auto_detect_vscode() -> TextEditorConfig:
|
||||
from src.models import EMPTY_TEXT_EDITOR_CONFIG
|
||||
from src.external_editor import EMPTY_TEXT_EDITOR_CONFIG
|
||||
global _cached_vscode_config
|
||||
if _cached_vscode_config is not None:
|
||||
return _cached_vscode_config
|
||||
|
||||
Reference in New Issue
Block a user