-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
164 lines (155 loc) · 9.46 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin">
<meta http-equiv="Cross-Origin-Embedder-Policy" content="require-corp">
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-eval' 'unsafe-inline' blob:; worker-src 'self' blob:;">
<title>M3L</title>
<link rel="stylesheet" href="/src/styles.css">
</head>
<body>
<div class="container">
<div class="main-content">
<!-- Left Panel -->
<div class="input-panel">
<div class="input-section">
<!-- Help Icon -->
<div class="theme-help-section">
<h1 class="app-title">M3L</h1>
<div class="color-selector">
<button class="color-option purple" data-theme="purple" title="Purple Theme">
<span class="color-dot"></span>
</button>
<button class="color-option amber" data-theme="amber" title="Amber Theme">
<span class="color-dot"></span>
</button>
<button class="color-option white" data-theme="white" title="White Theme">
<span class="color-dot"></span>
</button>
</div>
<button class="settings-icon" aria-label="Settings">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.25 22l-.4-3.2q-.325-.125-.612-.3-.288-.175-.563-.375L4.7 19.375l-2.75-4.75 2.575-1.95Q4.5 12.5 4.5 12.337v-.675q0-.162.025-.337L1.95 9.375l2.75-4.75 2.975 1.25q.275-.2.575-.375.3-.175.6-.3l.4-3.2h5.5l.4 3.2q.325.125.613.3.287.175.562.375l2.975-1.25 2.75 4.75-2.575 1.95q.025.175.025.337v.675q0 .163-.05.338l2.575 1.95-2.75 4.75-2.95-1.25q-.275.2-.575.375-.3.175-.6.3l-.4 3.2h-5.5Zm2.8-6.5q1.45 0 2.475-1.025Q15.55 13.45 15.55 12q0-1.45-1.025-2.475Q12.5 8.5 11.05 8.5q-1.475 0-2.488 1.025Q7.55 10.55 7.55 12q0 1.45 1.012 2.475Q9.575 15.5 12.05 15.5Z" fill="currentColor"/>
</svg>
</button>
<button class="help-icon" aria-label="Show Help">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15zM14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z" fill="currentColor"/>
</svg>
</button>
</div>
<div class="file-section">
<div class="smart-input-wrapper">
<input type="text"
class="smart-input"
id="data-source"
placeholder="Load File or URL"
spellcheck="false">
<input type="file" id="file-input" accept=".csv,.json" hidden>
<button class="file-select-btn" title="Load File or URL">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" fill="currentColor"/>
</svg>
</button>
</div>
</div>
<div class="query-section">
<textarea id="nl-query" placeholder="Ask a question about your data..."></textarea>
<div class="button-container">
<button id="submit-query">Ask Question</button>
<button class="voice-input-btn" title="Voice Input">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.91-3c-.49 0-.9.36-.98.85C16.52 14.2 14.47 16 12 16s-4.52-1.8-4.93-4.15c-.08-.49-.49-.85-.98-.85-.61 0-1.09.54-1 1.14.49 3 2.89 5.35 5.91 5.78V20c0 .55.45 1 1 1s1-.45 1-1v-2.08c3.02-.43 5.42-2.78 5.91-5.78.1-.6-.39-1.14-1-1.14z" fill="currentColor"/>
</svg>
</button>
</div>
</div>
</div>
</div>
<!-- Right Panel -->
<div class="results-panel">
<div class="results-section">
<div class="results-actions">
<div class="action-buttons">
<button id="clear-results" class="action-button" title="Clear All Results">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7 21c-.55 0-1.02-.196-1.412-.587A1.927 1.927 0 0 1 5 19V6H4V4h5V3h6v1h5v2h-1v13c0 .55-.196 1.02-.587 1.413A1.927 1.927 0 0 1 17 21H7ZM17 6H7v13h10V6ZM9 17h2V8H9v9Zm4 0h2V8h-2v9ZM7 6v13V6Z" fill="currentColor"/>
</svg>
</button>
<button id="export-pdf" class="action-button" title="Export as PDF">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z" fill="currentColor"/>
</svg>
</button>
</div>
</div>
<div class="results-container">
<!-- Individual result blocks will be added here -->
</div>
</div>
</div>
</div>
<!-- Help Modal -->
<div class="help-modal" hidden>
<div class="help-content">
<button class="close-help">×</button>
<h1>👋 I'm M3L</h1>
<p>Your personal AI data analyst. Here's how it works:</p>
<ul class="feature-list">
<li>Load your data file securely</li>
<li>Connect with your AI service provider</li>
<li>Ask questions about your data</li>
<li>All analysis happens right on your computer</li>
<li>Only basic data structure is shared with your AI provider</li>
</ul>
</div>
</div>
<!-- Add Settings Modal -->
<div class="settings-modal" hidden>
<div class="settings-content">
<h2>Settings</h2>
<div class="settings-form">
<div class="form-group">
<label for="settings-api-key">API Key</label>
<input type="password" id="settings-api-key" placeholder="Enter OpenAI/Claude API Key">
</div>
<div class="form-group">
<label for="settings-api-provider">API Provider</label>
<select id="settings-api-provider">
<option value="openai">OpenAI</option>
<option value="claude">Claude</option>
</select>
</div>
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="persist-settings">
<span>Keep the key and service persisted</span>
</label>
</div>
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="enable-shortcut" checked>
<span>Use ⌘/Enter to ask question</span>
</label>
</div>
<div class="settings-actions">
<button class="delete-settings" title="Delete saved settings">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7 21c-.55 0-1.02-.196-1.412-.587A1.927 1.927 0 0 1 5 19V6H4V4h5V3h6v1h5v2h-1v13c0 .55-.196 1.02-.587 1.413A1.927 1.927 0 0 1 17 21H7ZM17 6H7v13h10V6ZM9 17h2V8H9v9Zm4 0h2V8h-2v9ZM7 6v13V6Z" fill="currentColor"/>
</svg>
</button>
<button class="save-settings">Save</button>
</div>
</div>
</div>
</div>
</div>
<!-- Mobile floating action button -->
<button class="mobile-query-fab" id="mobile-query-btn">
Ask Query
</button>
<script type="module" src="/src/main.ts"></script>
</body>
</html>