Add full shell, replaceable Omics adapter and bilingual interaction
Implement approved specification #32 and tickets #33-#37. Keep host authentication server-verified and pin session interaction language. Compile scoped base selectors for browser compatibility and retain full gutters during CSS pruning.
This commit is contained in:
@@ -135,7 +135,7 @@ def create_session(
|
||||
|
||||
def new_session_manifest(
|
||||
question: str, db: DatabaseConfig, *, provider=None, model=None, thinking=None,
|
||||
workspace_id=None, workspace_revision=None, name=None,
|
||||
workspace_id=None, workspace_revision=None, name=None, interaction_language=None,
|
||||
) -> SessionManifest:
|
||||
"""Create an unsaved UUIDv4 manifest for a repository-owned session."""
|
||||
now = datetime.now(UTC)
|
||||
@@ -145,9 +145,24 @@ def new_session_manifest(
|
||||
summary=_summarize(question), updated_at=now, updated_by=current_author(),
|
||||
provider=provider, model=model, thinking=thinking, workspace_id=workspace_id,
|
||||
workspace_revision=workspace_revision, name=name,
|
||||
interaction_language=interaction_language,
|
||||
)
|
||||
|
||||
|
||||
def pin_interaction_language(manifest: SessionManifest, workspace_language: str) -> bool:
|
||||
"""Apply legacy compatibility once, while the repository holds its writer lock."""
|
||||
from tht.session.language import validate_language_tag
|
||||
|
||||
if manifest.interaction_language is not None:
|
||||
return False
|
||||
if manifest.status == "finalized" or manifest.archived:
|
||||
raise SessionError("Session is read-only (finalized or archived)")
|
||||
manifest.interaction_language = validate_language_tag(workspace_language)
|
||||
manifest.updated_at = datetime.now(UTC)
|
||||
manifest.updated_by = current_author()
|
||||
return True
|
||||
|
||||
|
||||
_ASSUMPTIONS_HEADING = re.compile(
|
||||
r"^#{1,6}\s+(?:assunzioni|assumptions)\s*$", re.IGNORECASE | re.MULTILINE
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user