-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
230 lines (203 loc) · 10.3 KB
/
Copy pathindex.html
File metadata and controls
230 lines (203 loc) · 10.3 KB
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<title>GenAI Conversation Searcher & Merger</title>
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
<!-- Vendor CSS (pinned) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastify-js/1.12.0/toastify.min.css" />
<!-- Inline favicon -->
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><text y='14' font-size='14'>🤖</text></svg>">
<!-- App CSS -->
<link rel="stylesheet" href="./style.css"/>
<link rel="stylesheet" href="./dashboard.css"/>
<script type="text/javascript">
(function (f, b) { if (!b.__SV) { var e, g, i, h; window.mixpanel = b; b._i = []; b.init = function (e, f, c) { function g(a, d) { var b = d.split("."); 2 == b.length && ((a = a[b[0]]), (d = b[1])); a[d] = function () { a.push([d].concat(Array.prototype.slice.call(arguments, 0))); }; } var a = b; "undefined" !== typeof c ? (a = b[c] = []) : (c = "mixpanel"); a.people = a.people || []; a.toString = function (a) { var d = "mixpanel"; "mixpanel" !== c && (d += "." + c); a || (d += " (stub)"); return d; }; a.people.toString = function () { return a.toString(1) + ".people (stub)"; }; i = "disable time_event track track_pageview track_links track_forms track_with_groups add_group set_group remove_group register register_once alias unregister identify name_tag set_config reset opt_in_tracking opt_out_tracking has_opted_in_tracking has_opted_out_tracking clear_opt_in_out_tracking start_batch_senders people.set people.set_once people.unset people.increment people.append people.union people.track_charge people.clear_charges people.delete_user people.remove".split( " "); for (h = 0; h < i.length; h++) g(a, i[h]); var j = "set set_once union unset remove delete".split(" "); a.get_group = function () { function b(c) { d[c] = function () { call2_args = arguments; call2 = [c].concat(Array.prototype.slice.call(call2_args, 0)); a.push([e, call2]); }; } for ( var d = {}, e = ["get_group"].concat( Array.prototype.slice.call(arguments, 0)), c = 0; c < j.length; c++) b(j[c]); return d; }; b._i.push([e, f, c]); }; b.__SV = 1.2; e = f.createElement("script"); e.type = "text/javascript"; e.async = !0; e.src = "undefined" !== typeof MIXPANEL_CUSTOM_LIB_URL ? MIXPANEL_CUSTOM_LIB_URL : "file:" === f.location.protocol && "//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//) ? "https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js" : "//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js"; g = f.getElementsByTagName("script")[0]; g.parentNode.insertBefore(e, g); } })(document, window.mixpanel || []);
// Initialize with your project token
mixpanel.init("cc23d9486495b370a47e12a1de79c6d2", {
debug: true,
track_pageview: true,
persistence: "localStorage"
});
</script>
<style>
/* Search-specific styles */
#search-section { margin-top: 1rem; }
.search-result {
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 1rem;
margin: 0.5rem 0;
transition: background 0.2s ease;
}
.search-result:hover { background: #f8fafc; }
.search-result mark {
background: #fef3c7;
padding: 2px 4px;
border-radius: 2px;
font-weight: 500;
}
#searchInput {
flex: 1;
padding: 0.6rem;
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
font-size: 14px;
}
#searchInput:focus {
outline: none;
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
#dateFilter {
padding: 0.6rem;
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
font-size: 14px;
background: white;
cursor: pointer;
}
#results-list {
max-height: 400px;
overflow-y: auto;
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
padding: 1rem;
background: #fafafa;
}
#result-count { font-weight: 600; color: #475569; }
</style>
</head>
<body>
<header>
<h1>GenAI Conversation Explorer</h1>
<p class="subheader">Merge, Filter, Export GPT & Claude Conversations</p>
</header>
<fieldset>
<legend>1. Upload</legend>
<div class="row" style="justify-content: space-between; align-items: flex-start;">
<div style="flex: 1; max-width: 600px;">
<!-- Hidden file input -->
<input
type="file"
id="fileInput"
accept=".zip,.json"
multiple
style="display:none"
title="Upload a conversations export (ZIP or JSON)"
aria-label="Upload conversations file"
/>
<label for="fileInput" id="fileInputLabel" style="position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;">
Upload conversations file
</label>
<!-- Upload button -->
<button id="uploadBtn">Upload Chat Exports</button>
<!-- Drag & drop zone -->
<div id="dropZone" aria-label="Drag and drop files here">
<div>
<strong>Drag & drop ChatGPT/Claude ZIP or JSON files here</strong><br>
<small style="color: #667085;">Supports .zip and .json files up to 100MB</small>
</div>
</div>
<!-- File chips -->
<div id="file-chips" aria-live="polite"></div>
<!-- Privacy note -->
<div id="privacy-note" style="margin-top: 24px;">
<strong>Privacy:</strong> All processing happens <em>locally in your browser</em>. No files or data are uploaded anywhere.
</div>
</div>
<!-- Built by card -->
<div style="flex: 0 0 300px; margin-left: 32px;">
<div class="built-by-card">
<img src="./assets/jai.jpg" alt="Jai Goldberg" class="built-by-photo" onerror="this.style.display='none'">
<p class="built-by-name">Jai Goldberg</p>
<p class="built-by-tagline">AI consultant · I build AI tools and automation systems</p>
<a class="built-by-btn" href="https://www.linkedin.com/in/jai-goldberg142/" target="_blank" rel="noopener">Connect on LinkedIn</a>
<a class="built-by-btn built-by-btn-secondary" href="https://github.com/Jacing142/GenAI-Conversation-Searcher-Merger" target="_blank" rel="noopener">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z"/></svg>
Star on GitHub
</a>
</div>
</div>
</div>
</fieldset>
<fieldset>
<legend>2. Analytics</legend>
<!-- Extract button -->
<div class="row" style="margin-bottom: 1rem;">
<button id="extractBtn" disabled>Extract</button>
</div>
<div id="progress-wrapper" style="display:none;">
<span id="status"></span>
<progress id="progressBar" value="0" max="100"></progress>
</div>
<!-- Hidden projects UI -->
<div id="project-list-container" style="display:none;">
<h4>Top Projects</h4>
<div id="project-list"></div>
</div>
</fieldset>
<!-- Search Section -->
<fieldset id="search-section" style="display:none;">
<legend>3. Search & Export</legend>
<div class="row" style="margin-bottom: 1rem;">
<input type="text" id="searchInput" placeholder="Search conversations...">
<select id="dateFilter">
<option value="all">All Time</option>
<option value="30">Last 30 Days</option>
<option value="90">Last 90 Days</option>
<option value="365">Last Year</option>
</select>
<button id="searchBtn">Search</button>
</div>
<!-- Active filter chips -->
<div id="active-filters" class="chips"></div>
<div id="search-results" style="display:none;">
<div class="row" style="justify-content: space-between; align-items:center; margin-bottom: 1rem;">
<span id="result-count">0 results</span>
<div class="row" style="gap: 8px;">
<button id="selectAllBtn" class="btn-secondary">Select All</button>
<button id="clearBtn" class="btn-secondary">Clear</button>
<button id="exportJsonBtn" class="btn-secondary" disabled title="Export selected conversations as JSON">Export JSON</button>
<button id="exportHtmlBtn" class="btn-secondary" disabled title="Export selected conversations as HTML">Export HTML</button>
<button id="exportCsvBtn" class="btn-secondary" disabled title="Export selected conversations as CSV">Export CSV</button>
</div>
</div>
<div id="results-list"><!-- Results inserted here --></div>
</div>
</fieldset>
<div id="spotlight-container" class="container" style="display:none;">
<h2 id="spotlight-title"></h2>
<div id="facts-bar"></div>
<div id="chart-wrap">
<div id="chart-title"></div>
<canvas id="chart-canvas"></canvas>
</div>
</div>
<!-- Conversation Modal -->
<div id="conversation-modal" aria-hidden="true" style="display: none;">
<div class="modal-backdrop"></div>
<div class="modal-content" role="dialog" aria-modal="true" aria-labelledby="modal-title">
<div class="modal-header">
<h3 id="modal-title">Conversation</h3>
<button id="modal-close" aria-label="Close">✖</button>
</div>
<div class="modal-body" id="modal-body">
<!-- Full conversation content rendered here -->
</div>
</div>
</div>
<!-- Vendor JS (pinned, non-module) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.2/marked.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastify-js/1.12.0/toastify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<!-- Entry module -->
<script type="module" src="./app.js"></script>
</body>
</html>