about summary refs log tree commit diff
path: root/aisearch/src/web/templates/partials/response_body.html
diff options
context:
space:
mode:
authorJohannes Medagbe <johanmedagbe@gmail.com>2026-09-21 10:03:20 +0000
committerJohannes Medagbe <johanmedagbe@gmail.com>2026-09-22 12:18:32 +0000
commitdce53892085c02c8571d8a6495e39c449294aa5f (patch)
treeae64d32cc845d30ec2a4cc3514a23dc5683a09a1 /aisearch/src/web/templates/partials/response_body.html
downloadgenenetwork_ai_search-master.tar.gz
New: commit aisearch repo master
Diffstat (limited to 'aisearch/src/web/templates/partials/response_body.html')
-rw-r--r--aisearch/src/web/templates/partials/response_body.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/aisearch/src/web/templates/partials/response_body.html b/aisearch/src/web/templates/partials/response_body.html
new file mode 100644
index 0000000..4b305b5
--- /dev/null
+++ b/aisearch/src/web/templates/partials/response_body.html
@@ -0,0 +1,55 @@
+<div class="ai-response">
+    {% if data.error or data.status == 'error' %}
+        <div class="status-error">Search encountered an error</div>
+        <div class="error-display">{{ data.error or data.message or 'Unknown error' }}</div>
+        {% if data.raw_response %}
+            <div class="raw-response">
+                <strong>Raw Response:</strong><br>
+                {{ data.raw_response }}
+            </div>
+        {% endif %}
+    {% else %}
+        {% if data.status == 'success' %}
+            <div class="status-success">Search completed successfully</div>
+        {% elif data.status == 'partial_success' %}
+            <div class="status-partial">Partial success - some data sources unavailable</div>
+        {% endif %}
+
+        {% if data.summary %}
+            <div class="summary">{{ data.summary }}</div>
+        {% endif %}
+
+        {% if grouped and grouped|length > 0 %}
+            {% for type, items in grouped.items() %}
+                {% set display_type = type[0]|upper + type[1:] + 's' %}
+                <h3>{{ display_type }} ({{ items|length }})</h3>
+                <ul class="card-list">
+                    {% for item in items %}
+                        {% set url = item.url or item.link or '#' %}
+                        {% set name = item.name or item.symbol or item.trait_name or 'Unnamed' %}
+                        <li class="card-item">
+                            <div class="card-title">
+                                <a href="{{ url }}" target="_blank">{{ name }}</a>
+                            </div>
+                            {% if item.description %}
+                                <div class="card-description">{{ item.description }}</div>
+                            {% endif %}
+                            {% if item.extra %}
+                                <div class="card-meta">{{ item.extra }}</div>
+                            {% endif %}
+                        </li>
+                    {% endfor %}
+                </ul>
+            {% endfor %}
+        {% else %}
+            <div class="note-box">No specific results were found for this query.</div>
+        {% endif %}
+
+        {% if data.note %}
+            <div class="note-box">{{ data.note }}</div>
+        {% endif %}
+        {% if data.access_note %}
+            <div class="access-note">{{ data.access_note }}</div>
+        {% endif %}
+    {% endif %}
+</div>