-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
61 lines (55 loc) · 2.89 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="AI Chat Interface">
<meta name="theme-color" content="#007AFF">
<title>AI Chat</title>
<!-- Preload critical assets -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<!-- Stylesheets -->
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css">
<link rel="stylesheet" href="style.css">
<!-- Memory management -->
<meta http-equiv="Cache-Control" content="no-store">
<meta name="memory-management" content="aggressive">
<!-- Preload critical resources -->
<link rel="preload" as="style" href="style.css">
<link rel="preload" as="script" href="script.js">
</head>
<body>
<main class="chat-container">
<div id="chatMessages" role="log" aria-live="polite" data-memory-cleanup="true">
<!-- Messages will be added here -->
</div>
<div class="input-area">
<button id="emojiButton" aria-label="Open emoji picker">😊</button>
<emoji-picker class="emoji-picker" aria-hidden="true"></emoji-picker>
<input type="text" id="messageInput" placeholder="Type your message..." autocomplete="off" aria-label="Message input" autofocus>
<button id="sendButton" aria-label="Send message">Send</button>
<button class="clear-chat" aria-label="Clear chat history">Clear Chat</button>
<button id="promptButton" aria-label="Open prompt tool">📝</button>
<div id="promptTool" class="prompt-tool hidden">
<div class="prompt-header">
<h3>Prompt Tool</h3>
<button class="close-prompt">×</button>
</div>
<div class="prompt-templates">
<!-- Templates will be added here -->
</div>
</div>
</div>
</main>
<!-- Load scripts in optimal order -->
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/contrib/auto-render.min.js" defer></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/emoji-picker-element@^1/index.js"></script>
<script src="script.js" defer></script>
</body>
</html>