와일들카드 선택 수정 .

This commit is contained in:
HyeongBaeYang committed 2026-07-07 17:16:19 +09:00
1 parent 8c700b1e08
commit 15f3d10eb6
11 files changed
+266 -10

No files matched your search

@@ -90,14 +90,15 @@ class ScriptRepository:
return self.format_script(text, variables)
async def resolve_card_script(self, action_id: int, card_id: Optional[str],
variables: Optional[Dict[str, Any]] = None) -> Optional[str]:
variables: Optional[Dict[str, Any]] = None,
prefer_db: bool = False) -> Optional[str]:
"""카드 멘트 해석. cards.source_type == 'backoffice_db' 면 card.nego_cards.script(DB)를
우선 조회하고, 없거나 file 모드면 scripts_cards.json(파일) 폴백. 변수 치환 후 반환.
DB 멘트는 백오피스(negodata)가 편집한 정본이라 파일보다 우선한다. 마커(**굵게** 등)가
섞여 있어도 agent 는 불투명 텍스트로 취급 — 표현 렌더는 프론트 소유.
"""
if self._config.cards.source_type == _CARD_SOURCE_DB and card_id:
if (prefer_db or self._config.cards.source_type == _CARD_SOURCE_DB) and card_id:
db_text = await self._fetch_card_script_db(card_id)
if db_text:
return self.format_script(db_text, variables)