Django Template

{% extends "dashboard/base.html" %}
{% load static %}
{% load react_llmclient_list %}

{% block style_extra %}
  {{ block.super }}

  <!--
  Vite assets for the prompt list
  see: smarter.apps.prompt.templatetags.react_llmclient_list.
  reads the React manifest.json file to determine the correct hashed filenames to include.
  -->
  {% llmclient_list_react_assets as assets %}
  {% for css_file in assets.css %}
    <link class="smarter" rel="stylesheet" href="{% static 'react/@smarter/llmclient-list/' %}{{ css_file }}">
  {% endfor %}
{% endblock %}

{% block dashboard_content %}
  {{ block.super }}

  <div
    id="{{ llmclient_list.root_id }}"
    django-csrf-cookie-name="{{ llmclient_list.django_csrf_cookie_name }}"
    django-session-cookie-name="{{ llmclient_list.django_session_cookie_name }}"
    django-cookie-domain="{{ llmclient_list.cookie_domain }}"
    smarter-llmclient-list-api-url="{{ llmclient_list.llmclient_list_api_url }}"
    react-debug-mode="{{ llmclient_list.react_debug_mode }}"
    smarter-request-id="{{ llmclient_list.smarter_request_id }}"
    >
  </div>

{% endblock %}

{% block javascript_extra %}
  {{ block.super }}

  <!--
  Vite assets for the prompt list
  see: smarter.apps.prompt.templatetags.react_llmclient_list.
  reads the React manifest.json file to determine the correct .js entry filename to include.
  -->
  {% llmclient_list_react_assets as assets %}
  {% for js_file in assets.js %}
    <script class="smarter" type="module" src="{% static 'react/@smarter/llmclient-list/' %}{{ js_file }}"></script>
  {% endfor %}

{% endblock %}