-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathai.html
More file actions
232 lines (218 loc) · 14.2 KB
/
Copy pathai.html
File metadata and controls
232 lines (218 loc) · 14.2 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
231
232
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>360 AI</title>
<link rel="icon" type="image/png" href="/favicon-32x32.png" />
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#3b82f6" />
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<link rel="stylesheet" href="/assets/css/main.css" />
<link rel="stylesheet" href="/assets/css/wide.css" />
<link rel="stylesheet" href="/assets/css/gallium.css" />
<link rel="stylesheet" href="/assets/css/responsive.css" />
<link rel="stylesheet" href="/assets/css/cursor.css" />
<link rel="stylesheet" href="/assets/css/ai.css" />
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SCZB3M2PNX"></script>
<script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','G-SCZB3M2PNX');</script>
</head>
<body class="dark">
<div class="cursor-dot"></div>
<div class="cursor-trail"></div>
<div class="cursor-crosshair"></div>
<div class="cursor-blob"></div>
<div class="auth-top-right">
<button id="signInBtn" class="auth-btn">Sign In</button>
<button id="signUpBtn" class="auth-btn">Sign Up</button>
<button id="signOutBtn" class="auth-btn" style="display:none;">Sign Out</button>
</div>
<!-- 360 navigation sidebar (required by main.js) -->
<button class="sidebar-toggle" id="sidebarToggle">☰ Menu</button>
<aside class="sidebar" id="sidebar"><span id="sidebar-slot"></span></aside>
<div class="overlay" id="overlay"></div>
<div class="settings-panel" id="settingsPanel">
<h3>Appearance</h3>
<div class="settings-label">Theme</div>
<div class="theme-swatches">
<div class="theme-option"><div class="swatch" data-theme="ocean"></div><span>Ocean</span></div>
<div class="theme-option"><div class="swatch" data-theme="midnight"></div><span>Midnight</span></div>
<div class="theme-option"><div class="swatch" data-theme="sunset"></div><span>Sunset</span></div>
<div class="theme-option"><div class="swatch" data-theme="mint"></div><span>Mint</span></div>
<div class="theme-option"><div class="swatch" data-theme="neon"></div><span>Neon</span></div>
<div class="theme-option"><div class="swatch" data-theme="mono"></div><span>Mono</span></div>
</div>
<div class="settings-label" style="margin-top:20px;">Mode</div>
<label style="display:flex;align-items:center;gap:10px;cursor:pointer;">
<span style="font-size:14px;">Dark mode</span>
<input type="checkbox" id="darkToggle" />
</label>
<h3 style="margin-top:20px;">Cursor</h3>
<div class="settings-label">Style</div>
<div class="cursor-options">
<div class="cursor-option active" data-cursor="default"><div class="cursor-preview preview-default"></div>Default</div>
<div class="cursor-option" data-cursor="dot"><div class="cursor-preview preview-dot"></div>Dot</div>
<div class="cursor-option" data-cursor="ring"><div class="cursor-preview preview-ring"></div>Ring</div>
<div class="cursor-option" data-cursor="crosshair"><div class="cursor-preview preview-crosshair"></div>Crosshair</div>
<div class="cursor-option" data-cursor="blob"><div class="cursor-preview preview-blob"></div>Blob</div>
<div class="cursor-option" data-cursor="system"><div class="cursor-preview preview-system"></div>System</div>
</div>
<div class="settings-label" style="margin-top:20px;">Background</div>
<div class="settings-box">
<input type="file" id="bgUpload" accept="image/*" class="settings-input" />
<input type="text" id="bgUrlInput" placeholder="Paste image URL…" class="settings-input" />
<button id="bgUrlBtn" class="settings-btn">Apply URL</button>
<button id="bgResetBtn" class="settings-btn">Reset</button>
</div>
<h3 style="margin-top:25px;">Legal</h3>
<a href="/privacypolicy" class="legal-link">Privacy Policy</a>
<a href="/tos" class="legal-link">Terms of Service</a>
<h3 style="margin-top:25px;">About</h3>
<details class="about-dropdown">
<summary>What is 360?</summary>
<p>360 is a next-generation search engine and digital workspace. Built by 360 Digital, Co.</p>
</details>
</div>
<div id="auth-popup" class="auth-popup hidden">
<div class="auth-box">
<h2>Account</h2>
<input id="auth-email" type="email" placeholder="Email" />
<input id="auth-password" type="password" placeholder="Password" />
<button id="auth-login-btn">Log In</button>
<button id="auth-signup-btn">Sign Up</button>
<button id="github-login" class="oauth-btn github">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" style="flex-shrink:0"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0 0 24 12c0-6.63-5.37-12-12-12z"/></svg>
<span>Sign in with GitHub</span>
</button>
<button id="google-login" class="oauth-btn google">
<svg width="18" height="18" viewBox="0 0 24 24" style="flex-shrink:0"><path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/><path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/><path fill="#FBBC05" d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l3.66-2.84z"/><path fill="#EA4335" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/></svg>
<span>Sign in with Google</span>
</button>
<p id="auth-error" class="auth-error"></p>
<button id="auth-close-btn" class="close-btn">Close</button>
</div>
</div>
<div class="ai-shell">
<!-- Conversation sidebar -->
<div id="ai-sidebar">
<div class="sb-head">
<span class="sb-logo">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/></svg>
Chats
</span>
<button id="new-chat-btn">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
New
</button>
</div>
<div id="conv-list"></div>
</div>
<!-- Main chat column -->
<div class="ai-main" id="ai-main">
<div class="ai-topbar">
<div class="ai-topbar-side ai-topbar-left">
<button id="ai-chat-sidebar-toggle" class="icon-btn" title="Toggle chat history">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><line x1="9" y1="3" x2="9" y2="21"/></svg>
</button>
</div>
<div class="ai-brand">
<span class="ai-brand-mark" aria-label="360 AI logo">
<svg class="ai-logo-svg" width="22" height="22" viewBox="0 0 32 32" fill="none" aria-hidden="true">
<circle cx="16" cy="16" r="11.5" stroke="currentColor" stroke-width="2.2" stroke-dasharray="17 8" stroke-linecap="round"/>
<path d="M10.5 21.2 16 7.5l5.5 13.7-5.5-3.1-5.5 3.1Z" fill="currentColor"/>
<circle cx="16" cy="16" r="2.2" fill="currentColor"/>
</svg>
</span>
<span class="ai-brand-text">360 AI</span>
</div>
<div class="ai-topbar-side ai-topbar-right">
<button id="mcp-btn" title="MCP Connectors">
<span class="mcp-dot"></span>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M12 2v3M12 19v3M4.22 4.22l2.12 2.12M17.66 17.66l2.12 2.12M2 12h3M19 12h3M4.22 19.78l2.12-2.12M17.66 6.34l2.12-2.12"/></svg>
Tools
</button>
<a href="/apps" class="ai-topbar-link">Apps</a>
</div>
</div>
<div class="ai-conv-title-bar" id="conv-title-bar" style="visibility: hidden">
<span id="conv-title-label" class="conv-title-label">Untitled chat</span>
</div>
<div id="ai-output">
<div id="ai-welcome">
<div class="wl-logo">
<svg class="ai-logo-svg" width="30" height="30" viewBox="0 0 32 32" fill="none" aria-hidden="true">
<circle cx="16" cy="16" r="11.5" stroke="currentColor" stroke-width="2.2" stroke-dasharray="17 8" stroke-linecap="round"/>
<path d="M10.5 21.2 16 7.5l5.5 13.7-5.5-3.1-5.5 3.1Z" fill="currentColor"/>
<circle cx="16" cy="16" r="2.2" fill="currentColor"/>
</svg>
</div>
<div class="wl-title">360 AI</div>
<div class="wl-sub">Ask anything, paste images, upload files, write code and solve problems!</div>
<div class="wl-chips">
<div class="wl-chip" data-prompt="Explain how the internet works in simple terms.">Explain how the internet works</div>
<div class="wl-chip" data-prompt="Write a Python function to reverse a linked list.">Reverse a linked list</div>
<div class="wl-chip" data-prompt="What are the best ways to learn a new language fast?">Help me learn a language fast</div>
<div class="wl-chip" data-prompt="Debug this code for me and explain what was wrong.">Debug my code</div>
<div class="wl-chip" data-prompt="Write a short creative story about a time traveler.">Let's write a creative story</div>
<div class="wl-chip" data-prompt="What is the difference between machine learning and AI?">Machine learning vs AI</div>
</div>
</div>
</div>
<div class="ai-input-area">
<div id="file-preview">
<div id="fp-thumb"></div>
<span id="fp-name"></span>
<button id="fp-cancel" title="Remove attachment">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
</button>
</div>
<div id="mcp-context-bar">
<span class="mcp-ctx-dot"></span>
<span id="mcp-ctx-label">Supabase connected</span>
<button id="mcp-ctx-close" title="Dismiss">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
</button>
</div>
<div class="ai-input-row">
<textarea id="ai-input" rows="1" placeholder="Ask anything… (Ctrl+V to paste image)"></textarea>
<div class="ai-input-btns">
<button id="ai-attach-btn" title="Attach file or image">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>
</button>
<button id="ai-send-btn" title="Send (Enter)">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="19" x2="12" y2="5"/><polyline points="5 12 12 5 19 12"/></svg>
</button>
</div>
</div>
<div class="ai-input-hint">Enter to send · Shift+Enter for new line · Paste image with Ctrl+V</div>
</div>
</div>
</div>
<input type="file" id="ai-file-input" style="display:none" accept="*/*" />
<!-- MCP Connector overlay + panel -->
<div id="mcp-overlay"></div>
<div id="mcp-panel" role="dialog" aria-label="MCP Connectors">
<div id="mcp-panel-head">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M12 2v3M12 19v3M4.22 4.22l2.12 2.12M17.66 17.66l2.12 2.12M2 12h3M19 12h3M4.22 19.78l2.12-2.12M17.66 6.34l2.12-2.12"/></svg>
<h2>MCP Connectors</h2>
<button id="mcp-panel-close" title="Close">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
</button>
</div>
<div id="mcp-panel-body">
<!-- Cards injected by mcp.js -->
</div>
</div>
<script src="/assets/js/main.js"></script>
<script src="/assets/js/auth-fix.js"></script>
<script src="/assets/js/wide.js"></script>
<script src="/assets/js/gallium.js"></script>
<script src="/assets/js/cookie.js"></script>
<script src="/assets/js/cursor.js"></script>
<script src="/assets/js/ai.js"></script>
<script src="/assets/js/mcp.js"></script>
</body>
</html>