-
Notifications
You must be signed in to change notification settings - Fork 330
Expand file tree
/
Copy pathindex.html
More file actions
174 lines (166 loc) · 7.24 KB
/
Copy pathindex.html
File metadata and controls
174 lines (166 loc) · 7.24 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self'">
<title>Foundry Local Chat</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="app-container">
<!-- Sidebar -->
<aside class="sidebar" id="sidebar">
<div class="sidebar-resize-handle" id="sidebarResizeHandle"></div>
<div class="sidebar-header">
<div class="logo">
<img src="foundry_local_color.svg" alt="Foundry Local" width="24" height="24">
<span>Foundry Local</span>
</div>
<button class="sidebar-toggle" id="sidebarToggle" aria-label="Toggle sidebar">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M15 18l-6-6 6-6"/>
</svg>
</button>
</div>
<div class="sidebar-content">
<div class="section-header">
<h3>Models</h3>
<button class="refresh-btn" id="refreshModels" title="Refresh models">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M23 4v6h-6M1 20v-6h6"/>
<path d="M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"/>
</svg>
</button>
</div>
<div class="model-list" id="modelList">
<div class="loading-spinner">
<div class="spinner"></div>
<span>Loading models...</span>
</div>
</div>
</div>
</aside>
<!-- Main Chat Area -->
<main class="chat-area">
<div class="chat-header">
<button class="mobile-menu-btn" id="mobileMenuBtn" aria-label="Open menu">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="3" y1="12" x2="21" y2="12"/>
<line x1="3" y1="6" x2="21" y2="6"/>
<line x1="3" y1="18" x2="21" y2="18"/>
</svg>
</button>
<div class="chat-title">
<h1>Chat</h1>
<span class="model-badge" id="modelBadge">Select a model to start</span>
</div>
<button class="new-chat-btn" id="newChatBtn" title="New chat">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="12" y1="5" x2="12" y2="19"/>
<line x1="5" y1="12" x2="19" y2="12"/>
</svg>
</button>
</div>
<div class="chat-messages" id="chatMessages">
<div class="welcome-message">
<div class="welcome-icon">
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2v10z"/>
</svg>
</div>
<h2>Welcome to Foundry Local Chat</h2>
<p>Select a model from the sidebar to start chatting with AI running locally on your machine.</p>
<div class="feature-highlights">
<div class="feature">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
</svg>
<span>100% Private</span>
</div>
<div class="feature">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"/>
<polyline points="12 6 12 12 16 14"/>
</svg>
<span>Low Latency</span>
</div>
<div class="feature">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="2" y="3" width="20" height="14" rx="2" ry="2"/>
<line x1="8" y1="21" x2="16" y2="21"/>
<line x1="12" y1="17" x2="12" y2="21"/>
</svg>
<span>Runs Locally</span>
</div>
</div>
</div>
</div>
<div class="chat-input-container">
<form class="chat-input-form" id="chatForm">
<div class="input-wrapper">
<textarea
id="messageInput"
placeholder="Type your message..."
rows="1"
disabled
></textarea>
<button type="button" class="record-btn" id="recordBtn" title="Record voice">
<svg class="mic-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"></path>
<path d="M19 10v2a7 7 0 0 1-14 0v-2"></path>
<line x1="12" y1="19" x2="12" y2="23"></line>
<line x1="8" y1="23" x2="16" y2="23"></line>
</svg>
<svg class="stop-icon" width="20" height="20" viewBox="0 0 24 24" fill="currentColor" stroke="none">
<rect x="6" y="6" width="12" height="12" rx="2"></rect>
</svg>
</button>
<button type="submit" class="send-btn" id="sendBtn" disabled title="Send message">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="22" y1="2" x2="11" y2="13"/>
<polygon points="22 2 15 22 11 13 2 9 22 2"/>
</svg>
</button>
</div>
<div class="input-hint">
Press <kbd>Enter</kbd> to send, <kbd>Shift+Enter</kbd> for new line
<span class="hint-separator">•</span>
<button type="button" class="transcription-settings-link" id="transcriptionSettingsBtn">Voice settings</button>
</div>
<div class="context-usage" id="contextUsage">
<span class="context-label-text">Context</span>
<div class="context-bar">
<div class="context-fill" id="contextFill"></div>
</div>
<span class="context-label" id="contextLabel">0%</span>
</div>
</form>
</div>
</main>
</div>
<!-- Whisper Model Modal -->
<div class="modal-overlay" id="whisperModal">
<div class="modal">
<h3>Transcription Settings</h3>
<p>Select a Whisper model for voice transcription.</p>
<div class="current-whisper-model" id="currentWhisperModel">
<span class="label">Current model:</span>
<span class="model-name">None selected</span>
</div>
<div class="whisper-models" id="whisperModelList">
<div class="loading-spinner">
<div class="spinner"></div>
<span>Loading models...</span>
</div>
</div>
<div class="modal-actions">
<button class="modal-btn secondary" id="whisperModalCancel">Close</button>
</div>
</div>
</div>
<!-- Toast Container -->
<div class="toast-container" id="toastContainer"></div>
<script src="renderer.js"></script>
</body>
</html>