[fix] agent·negodata/front: 중간값 멘트 모순 수정(갑 포지션 갱신을 치환 뒤로·원값 인용가 반올림 제외·1% 카드 역행 금지) + 계정 전환 쿼리캐시 초기화·ChatTab 카드 렌더 정리 + font-mono 한글 폴백(Windows 한글깨짐)
This commit is contained in:
1 parent
7dc925bcd4
commit
a405e00bf9
10 files changed
+72
-90
No files matched your search
@@ -312,7 +312,6 @@ class ChatService:
|
||||
counter = compute_offer(spec, session.context) if available(spec, session.context) else None
|
||||
if counter is not None:
|
||||
session.context["pending_counter_price"] = counter
|
||||
session.context["prev_customer_price"] = counter # 갑의 최신 포지션(절충가 계산 기준)
|
||||
reward = RewardCalculator(engine.config.reward, engine.config.state).calculate(snap)
|
||||
policy.update(Transition(state_index=idx, action_id=decision.action_id, reward=reward.total, done=False))
|
||||
await QTablePolicyStore.persist_cell(repo, version_id, policy, idx, decision.action_id)
|
||||
@@ -359,6 +358,9 @@ class ChatService:
|
||||
res.input_mode, res.input_options = view2.input_mode, view2.input_options
|
||||
if not card_script:
|
||||
res.script = view2.script # 카드 멘트 없으면 스텝 기본 카운터 멘트
|
||||
# 갑의 최신 포지션(절충가 계산 기준) — 멘트 치환 뒤에 갱신해야 {prev_customer_price}가
|
||||
# 이번 카운터가 아니라 직전 제안으로 나간다.
|
||||
session.context["prev_customer_price"] = counter
|
||||
|
||||
async def _play_closing_tactic(self, engine: TenantEngine, chat_engine: ChatEngine,
|
||||
scripts: ScriptRepository, session: ChatSession, res: Res_Chat):
|
||||
@@ -388,7 +390,6 @@ class ChatService:
|
||||
return # 컨텍스트 이상 — 기존 가격협상 스텝 그대로(재제안 요구)
|
||||
mark_played(ctx, closing_number) # None(폴백 최후통첩)이면 no-op
|
||||
ctx["pending_counter_price"] = counter
|
||||
ctx["prev_customer_price"] = counter
|
||||
|
||||
template = None
|
||||
if closing_number:
|
||||
@@ -400,6 +401,9 @@ class ChatService:
|
||||
res.step, res.client_step = view2.step, view2.client_step
|
||||
res.input_mode, res.input_options = view2.input_mode, view2.input_options
|
||||
res.script = scripts.format_script(template, chat_engine.vars_for(session)) if template else view2.script
|
||||
# 갑의 최신 포지션 갱신은 멘트 치환 뒤 — WC-05 중간값 멘트의 {prev_customer_price}(당사 직전 제안)가
|
||||
# 이번 절충가로 찍히던 버그(IMK 0807) 방지.
|
||||
ctx["prev_customer_price"] = counter
|
||||
res.card_id = closing_number
|
||||
|
||||
async def _terminal_learn(self, engine: TenantEngine, session: ChatSession, outcome: str, res: Res_Chat):
|
||||
|
||||
Reference in new issue
Block a user