diff --git a/app/static/index.html b/app/static/index.html
index 87a5488..40feedf 100644
--- a/app/static/index.html
+++ b/app/static/index.html
@@ -692,10 +692,10 @@
📈
Multi-Agent Data Analysis
-
Upload a CSV file and ask questions in natural language. Specialized AI agents will analyze your data, generate visualizations, and present insights.
+
Ask questions or upload a CSV file for data analysis. Specialized AI agents will analyze your data, generate visualizations, and present insights.
+
💬 What can you do?
📋 Dataset summary
-
🔝 Top values
📊 Distribution chart
📑 Full analysis
@@ -797,19 +797,23 @@
Multi-Agent Data Analysis
STATE.currentMessageGroup = null;
STATE.lastInsertedElement = null;
- // Require file upload before querying
- if (!STATE.activeFile) {
- showToast('Please upload a CSV file first', 'warning');
- STATE.isStreaming = false;
- document.getElementById('sendBtn').disabled = false;
- return;
- }
-
try {
- // Build URL with session_id if we have one (persist conversation context)
- let url = `/api/chat?file_id=${encodeURIComponent(STATE.activeFile.file_id)}`;
+ // Build URL with optional file_id and session_id
+ let url = `/api/chat`;
+ const params = [];
+
+ // Only include file_id if a file is uploaded
+ if (STATE.activeFile) {
+ params.push(`file_id=${encodeURIComponent(STATE.activeFile.file_id)}`);
+ }
+
+ // Include session_id if we have one (persist conversation context)
if (STATE.sessionId) {
- url += `&session_id=${encodeURIComponent(STATE.sessionId)}`;
+ params.push(`session_id=${encodeURIComponent(STATE.sessionId)}`);
+ }
+
+ if (params.length > 0) {
+ url += '?' + params.join('&');
}
const res = await fetch(url, {