generated from kgod/ai-review-template
自内部仓库剥离深度优化与 RAG 知识库后的交付版本: - Builder 对话式简历生成(FSM + 意图路由 LLM 兜底增强) - 条目级轻度优化:事实覆盖门禁 + STAR/bullet 修复链,功能/简介/成果与技术栈同级保护 - 简历导入:DOCX/PDF 解析、结构归一、手机号脱敏 - PostgreSQL 运行时 + Alembic 迁移链 Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
666 B
Python
23 lines
666 B
Python
"""Lazy shared expander for card-driven rewrites that lack an agent reference.
|
|
|
|
process_component_event is invoked by agent.py (over the 200-line edit limit, so its
|
|
call signature is fixed) with no agent handle. Card actions that need a rewrite
|
|
therefore share one process-wide expander built with the same factory as main.py.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
_EXPANDER: Any = None
|
|
|
|
|
|
def shared_expander() -> Any:
|
|
global _EXPANDER
|
|
if _EXPANDER is None:
|
|
from ..resume_expansion import build_expander
|
|
from ..settings import load_settings
|
|
|
|
_EXPANDER = build_expander(load_settings())
|
|
return _EXPANDER
|