-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathyuna.html
535 lines (515 loc) · 28.7 KB
/
yuna.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
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Your Private Companion">
<title>Yuna Ai</title>
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
<link rel="stylesheet" href="/static/css/index.css">
<script src="/static/js/index.js" defer></script>
<script src="/static/js/history.js" defer></script>
<script src="/static/js/kanojo.js" defer></script>
<script src="/static/js/diary.js" defer></script>
<script src="/static/js/markdown.js" defer></script>
<script src="/static/js/pptxgen.js" defer></script>
<script src="/static/js/creator.js" defer></script>
</head>
<body>
<!-- Yuna Avatar -->
<img src="/static/img/yuna-girl-head.webp" class="yuna-avatar" alt="Yuna Ai" onclick="toggleFloatingMenu()">
<!-- Top Menu -->
<div class="top-menu" id="floatingMenu">
<button class="menu-button" onclick="togglePanel('kanojo')" aria-label="Kanojo">
<i class="fas fa-user"></i>
</button>
<button class="menu-button" onclick="togglePanel('history')" aria-label="History">
<i class="fas fa-history"></i>
</button>
<button class="menu-button" onclick="togglePanel('creator')" aria-label="Creator">
<i class="fas fa-magic"></i>
</button>
<button class="menu-button" onclick="togglePanel('himitsu')" aria-label="Himitsu">
<i class="fas fa-star"></i>
</button>
<button class="menu-button" onclick="togglePanel('diary')" aria-label="Diary">
<i class="fas fa-book"></i>
</button>
<button class="menu-button" onclick="showCallModal()" aria-label="Call">
<i class="fas fa-phone"></i>
</button>
</div>
<!-- Overlay -->
<div class="overlay" id="overlay" onclick="closeAllPanels()"></div>
<!-- Main Chat Area -->
<div class="chat-container" id="chatContainer">
<div class="message message-ai">
Hello! I'm Yuna, your adorable AI companion. How can I assist you today?
</div>
<div class="message message-user">
Hi Yuna! I'm excited to chat with you.
</div>
<div class="message message-ai">
That's wonderful! Let's make our conversations fun and productive.
</div>
</div>
<!-- Input Area -->
<div class="input-area">
<div class="input-group">
<button class="btn btn-outline-secondary attach-button" aria-label="Attach">
<i class="fas fa-paperclip"></i>
</button>
<input type="text" class="form-control" placeholder="Message Yuna..." aria-label="Message Yuna"
id="messageInput">
<button class="btn send-button" aria-label="Send" onclick="sendMessage()">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
<!-- Sliding Panels -->
<!-- Kanojo Panel -->
<div id="kanojoPanel" class="popup-panel">
<button class="close-button" onclick="togglePanel('kanojo')">×</button>
<h4 class="mb-4">Yuna Customization</h4>
<div class="diary-card accordion" id="kanojoAccordion">
<!-- Profile and Personality Section -->
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button" type="button" data-bs-toggle="collapse"
data-bs-target="#profilePersonalityCollapse">
Profile & Personality
</button>
</h2>
<div id="profilePersonalityCollapse" class="accordion-collapse collapse show"
data-bs-parent="#kanojoAccordion">
<div class="accordion-body">
<!-- Kanojo Manager -->
<div class="mb-3">
<h5 class="card-title">Kanojo Management</h5>
<div class="mb-3">
<label for="kanojoSelect" class="form-label">Select Kanojo</label>
<select class="form-select" id="kanojoSelect">
<option value="Yuna">Yuna</option>
</select>
</div>
<div class="mb-3">
<button type="button" class="btn btn-primary" id="saveKanojo">Save</button>
<button type="button" class="btn btn-primary" id="addKanojo">Add</button>
<button type="button" class="btn btn-secondary" id="deleteKanojo">Delete</button>
</div>
<div class="mb-3">
<button type="button" class="btn btn-primary" id="exportKanojos">Export All</button>
<button type="button" class="btn btn-primary" id="importKanojos">Import All</button>
</div>
<div class="mb-3">
<button type="button" class="btn btn-primary" id="exportSingleKanojo">Export
Single</button>
<button type="button" class="btn btn-primary" data-bs-toggle="modal"
data-bs-target="#fileModal">Import Single</button>
</div>
</div>
<div class="mb-3">
<label for="kanojoName" class="form-label">Name</label>
<input type="text" class="form-control" id="kanojoName">
</div>
<div class="mb-3">
<label for="kanojoMemory" class="form-label">Memory</label>
<textarea class="form-control" id="kanojoMemory" style="height: 100px"></textarea>
</div>
<div class="mb-3">
<label for="kanojoCharacter" class="form-label">Character</label>
<textarea class="form-control" id="kanojoCharacter" style="height: 100px"></textarea>
</div>
<!-- Prompt Template Manager -->
<div class="mb-3">
<h5 class="card-title">Prompt Templates</h5>
<div class="mb-3">
<label for="promptTemplateSelect" class="form-label">Select Prompt Template</label>
<select class="form-select" id="promptTemplateSelect">
<option value="Default">Default</option>
<option value="Creative">Creative</option>
<option value="Professional">Professional</option>
</select>
</div>
<div class="mb-3">
<label for="promptTemplateName" class="form-label">Prompt Template Name</label>
<input type="text" class="form-control" id="promptTemplateName">
</div>
<div class="mb-3">
<label for="promptTemplateContent" class="form-label">Prompt Template Content</label>
<textarea class="form-control" id="promptTemplateContent"
style="height: 100px"></textarea>
</div>
<button type="button" class="btn btn-primary" id="savePromptTemplate">Save</button>
<button type="button" class="btn btn-secondary" id="cancelPromptTemplate">Cancel</button>
<button type="button" class="btn btn-danger" id="deletePromptTemplate">Delete</button>
<button type="button" class="btn btn-primary" id="exportPromptTemplates">Export All</button>
<button type="button" class="btn btn-primary" id="importPromptTemplates">Import All</button>
</div>
</div>
</div>
</div>
<!-- Features Section -->
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#featuresCollapse">
Features
</button>
</h2>
<div id="featuresCollapse" class="accordion-collapse collapse" data-bs-parent="#kanojoAccordion">
<div class="accordion-body">
<div class="row">
<div class="col-md-4">
<h6>Himitsu Actions</h6>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="pseudoApi">
<label class="form-check-label">Pseudo API</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="functions">
<label class="form-check-label">Functions</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="notifications">
<label class="form-check-label">Notifications</label>
</div>
</div>
<div class="col-md-4">
<h6>Configuration</h6>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="customConfig">
<label class="form-check-label">Custom Config</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="sounds">
<label class="form-check-label">Sounds</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="useHistory">
<label class="form-check-label">Use History</label>
</div>
</div>
<div class="col-md-4">
<h6>General</h6>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="backgroundCall">
<label class="form-check-label">Background Call</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="nsfw">
<label class="form-check-label">NSFW</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="streaming">
<label class="form-check-label">Streaming</label>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Advanced Config Section -->
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#advancedCollapse">
Advanced Config
</button>
</h2>
<div id="advancedCollapse" class="accordion-collapse collapse" data-bs-parent="#kanojoAccordion">
<div class="accordion-body">
<div class="row g-3">
<!-- Names -->
<div class="col-md-6">
<label class="form-label">Names</label>
<input type="text" class="form-control" id="names">
</div>
<!-- Toggle Switches -->
<div class="col-md-6">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="himitsu">
<label class="form-check-label">Himitsu</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="agi">
<label class="form-check-label">AGI</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="emotions">
<label class="form-check-label">Emotions</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="miru">
<label class="form-check-label">Miru</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="search">
<label class="form-check-label">Search</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="audio">
<label class="form-check-label">Audio</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="mind">
<label class="form-check-label">Mind</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="voice">
<label class="form-check-label">Voice</label>
</div>
</div>
<!-- Existing fields -->
<div class="col-md-6">
<label class="form-label">Max New Tokens</label>
<input type="number" class="form-control" id="maxNewTokens">
</div>
<div class="col-md-6">
<label class="form-label">Context Length</label>
<input type="number" class="form-control" id="contextLength">
</div>
<div class="col-md-6">
<label class="form-label">Temperature</label>
<input type="number" step="0.1" class="form-control" id="temperature">
</div>
<!-- New fields -->
<div class="col-md-6">
<label class="form-label">Repetition Penalty</label>
<input type="number" step="0.01" class="form-control" id="repetitionPenalty">
</div>
<div class="col-md-6">
<label class="form-label">Last N Tokens Size</label>
<input type="number" class="form-control" id="lastNTokensSize">
</div>
<div class="col-md-6">
<label class="form-label">Seed</label>
<input type="number" class="form-control" id="seed">
</div>
<div class="col-md-6">
<label class="form-label">Top K</label>
<input type="number" class="form-control" id="topK">
</div>
<div class="col-md-6">
<label class="form-label">Top P</label>
<input type="number" step="0.1" class="form-control" id="topP">
</div>
<div class="col-md-6">
<label class="form-label">Stop Sequences</label>
<input type="text" class="form-control" id="stop">
</div>
<div class="col-md-6">
<label class="form-label">Batch Size</label>
<input type="number" class="form-control" id="batchSize">
</div>
<div class="col-md-6">
<label class="form-label">Threads</label>
<input type="number" class="form-control" id="threads">
</div>
<div class="col-md-6">
<label class="form-label">GPU Layers</label>
<input type="number" class="form-control" id="gpuLayers">
</div>
<!-- Additional Toggle Switches -->
<div class="col-md-6">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="useMmap">
<label class="form-check-label">Use MMAP</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="flashAttn">
<label class="form-check-label">Flash Attention</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="useMlock">
<label class="form-check-label">Use MLOCK</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="offloadKqv">
<label class="form-check-label">Offload KQV</label>
</div>
</div>
</div>
<button class="btn btn-secondary mt-3" onclick="saveAdvancedConfig()">Save Config</button>
</div>
</div>
</div>
</div>
</div>
<!-- File Import Modal -->
<div class="modal fade" id="fileModal" tabindex="-1" aria-labelledby="fileModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="fileModalLabel">Import Kanojo</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input type="file" id="fileInput" accept=".json">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" id="fileSubmit">Submit</button>
</div>
</div>
</div>
</div>
<!-- History Panel -->
<div id="historyPanel" class="popup-panel">
<button class="close-button" onclick="togglePanel('history')">×</button>
<h4 class="mb-4">Chat History</h4>
<button id="createChatButton" class="btn btn-sm btn-success mb-2">Create New Chat</button>
<ul id="chatList" class="list-group">
<!-- Chats will be dynamically populated here -->
</ul>
</div>
<!-- Creator Panel -->
<div id="creatorPanel" class="popup-panel">
<button class="close-button" onclick="togglePanel('creator')">×</button>
<h4 class="mb-4">Himitsu Creator</h4>
<div class="diary-card">
<div class="row g-4">
<!-- Draft Area -->
<div class="col-md-4">
<div class="form-group">
<h5 class="mb-3">Draft Area</h5>
<textarea class="form-control" id="draft-area" placeholder="Draft will appear here..."
style="resize: none; height: 100px;" spellcheck="false"></textarea>
</div>
</div>
<!-- General Area -->
<div class="col-md-4">
<div class="form-group">
<h5 class="mb-3">General Area</h5>
<textarea class="form-control" id="work-area" placeholder="Enter content..."
style="resize: none; height: 100px;"></textarea>
</div>
</div>
<!-- Output Area -->
<div class="col-md-4">
<div class="form-group">
<h5 class="mb-3">Output Area</h5>
<textarea class="form-control" id="output-area" placeholder="Output will appear here..."
style="resize: none; height: 100px;"></textarea>
</div>
</div>
</div>
<div class="mt-4">
<button type="button" class="btn btn-success" id="createButtonHimitsuCreator">Create</button>
<button type="button" class="btn btn-secondary" id="copyToDraftButtonHimitsuCreator">Copy to
Draft</button>
<button type="button" class="btn btn-primary" id="exportPresentationButtonHimitsuCreator">Export
Presentation</button>
<button type="button" class="btn btn-primary" id="savePresentationButtonHimitsuCreator">Save</button>
<button type="button" class="btn btn-danger" id="clearButtonHimitsuCreator">Clear</button>
</div>
<div class="mt-4">
<h5>Presentation</h5>
<div id="presentation-content" class="slide-container mb-4 p-3 border rounded"></div>
</div>
</div>
</div>
<!-- Himitsu Panel -->
<div id="himitsuPanel" class="popup-panel">
<button class="close-button" onclick="togglePanel('himitsu')">×</button>
<h4 class="mb-4">Himitsu & YUI</h4>
<div class="diary-card">
<h5>Learn</h5>
<div class="mb-3">
<label for="secretTitle" class="form-label">Question</label>
<input type="text" class="form-control" id="secretTitle" placeholder="Enter the question">
</div>
<div class="mb-3">
<label for="secretContent" class="form-label">Content</label>
<textarea class="form-control" id="secretContent" rows="4"
placeholder="Enter additional content"></textarea>
</div>
<button type="button" class="btn btn-primary">Start</button>
</div>
</div>
<!-- Diary Panel -->
<div id="diaryPanel" class="popup-panel">
<button class="close-button" onclick="togglePanel('diary')">×</button>
<h4 class="mb-4">Diary</h4>
<div class="diary-card">
<h5>Create Note</h5>
<form id="note-form">
<div class="mb-3">
<label for="noteTitle" class="form-label">Title</label>
<input type="text" class="form-control" id="noteTitle" placeholder="Enter title" required>
</div>
<div class="mb-3">
<label for="noteContent" class="form-label">Content</label>
<textarea class="form-control" id="noteContent" rows="4" placeholder="Write your note..."
required></textarea>
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="isScheduled" onclick="toggleDateField()">
<label class="form-check-label" for="isScheduled">Add Date for Scheduled Entry</label>
</div>
<div class="mb-3" id="dateField" style="display: none;">
<label for="noteDate" class="form-label">Date</label>
<input type="date" class="form-control" id="noteDate">
</div>
<button type="submit" class="btn btn-primary">Save Note</button>
</form>
</div>
<div class="diary-card mt-4">
<h5>Previous Notes</h5>
<div id="notes-container">
<!-- Notes will be dynamically inserted here -->
</div>
</div>
</div>
<!-- Updated Call Modal -->
<div class="modal fade" id="callModal" tabindex="-1" aria-labelledby="callModalLabel" aria-hidden="true"
data-bs-backdrop="static" data-bs-keyboard="false">
<div class="modal-dialog modal-fullscreen modal-dialog-centered">
<div class="modal-content modal-custom">
<div class="modal-header border-0">
<h5 class="modal-title" id="callModalLabel">Call with Yuna</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"
onclick="resetCallUI()"></button>
</div>
<div class="call-container" id="callContainer">
<div class="video-frame">
<img src="/static/img/yuna-girl.webp" alt="Yuna Call" class="w-100 h-100 object-fit-cover">
</div>
<div class="video-frame">
<video id="localVideo" class="w-100 h-100" muted autoplay></video>
</div>
</div>
<div class="controls-bar">
<button class="control-button" aria-label="Mute/Unmute Microphone"><i
class="fas fa-microphone"></i></button>
<button class="control-button" aria-label="Start/Stop Video"><i class="fas fa-video"></i></button>
<button class="control-button" aria-label="Switch to Audio" onclick="switchToAudio()">
<i class="fas fa-phone"></i>
</button>
<button class="control-button" style="background: #dc3545;" aria-label="End Call"
onclick="endCall()">
<i class="fas fa-phone-slash"></i>
</button>
</div>
</div>
</div>
</div>
<!-- Pinned Menu -->
<div class="pinned" id="pinnedMenu">
<button class="menu-button" onclick="togglePanel('history')" aria-label="History">
<i class="fas fa-history"></i>
</button>
<button class="menu-button" onclick="togglePanel('creator')" aria-label="Creator">
<i class="fas fa-magic"></i>
</button>
<button class="menu-button" onclick="togglePanel('diary')" aria-label="Diary">
<i class="fas fa-book"></i>
</button>
<button class="menu-button" onclick="showCallModal()" aria-label="Call">
<i class="fas fa-phone"></i>
</button>
</div>
<script src="/static/js/bootstrap.min.js"></script>
</body>
</html>