{# M5 Phase 4B — Claude request_user_pick 결과 카드 fragment. GET /ui/pick-card/{rid} 가 렌더. SSE user_pick_request 이벤트 수신 시 htmx.ajax 로 #pick-cards 에 삽입됨. 컨텍스트 변수: rid — request_id (str) reason — 요청 이유 (str | None) candidates — 후보 에셋 메타 dict 리스트 각 dict: asset_id, name, kind, pack_name, width, height, size_kb #}
🤖 {{ _('Claude request') }} {{ reason or _('Pick from candidates') }}
{% for asset in candidates %}
{# 썸네일 #}
{% if asset.kind == "sprite" %} {{ asset.name }} {% elif asset.kind == "sound" %} {% else %} {% endif %}
{# 본문 — 이름 + 팩 + 크기 #}
{{ asset.name }}
{{ asset.pack_name or "" }} {% if asset.kind == "sprite" and asset.width and asset.height %} · {{ asset.width }}×{{ asset.height }} {% endif %} {% if asset.size_kb %} · {{ asset.size_kb }}KB {% endif %}
{# [채택] 버튼 — hx-post 로 resolve. hx-swap="delete" 가 응답 body 무시 + 카드 그룹 자동 삭제 (응답이 JSON {"ok": true} 인데 outerHTML 로 swap 하면 페이지에 raw text 노출되던 버그 fix). #}
{% endfor %}