minor aesthetic fixes

This commit is contained in:
tobi lutke 2023-06-26 19:20:28 -04:00 committed by Tobias Lütke
parent c1cb0e1db2
commit e3fba85d14
No known key found for this signature in database
GPG Key ID: 1FC0DBB14164709A

View File

@ -1,7 +1,6 @@
<html> <html>
<head> <head>
<title>Llama.cpp</title>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>llama.cpp - chat</title> <title>llama.cpp - chat</title>
@ -9,13 +8,12 @@
<style> <style>
#container { #container {
max-width: 80rem; max-width: 80rem;
margin: 10em auto; margin: 4em auto;
} }
main { main {
border: 1px solid #ddd; border: 1px solid #ddd;
padding: 1em; padding: 1em;
} }
#chat { #chat {
@ -67,11 +65,9 @@
<script type="module"> <script type="module">
import { fetchEventSource } from "https://esm.sh/@microsoft/fetch-event-source"
import { import {
html, h, signal, effect, computed, render, useSignal, useEffect, useRef html, h, signal, effect, computed, render, useSignal, useEffect, useRef, fetchEventSource
} from 'https://npm.reversehttp.com/@preact/signals-core,@preact/signals,htm/preact,preact,preact/hooks'; } from 'https://npm.reversehttp.com/@preact/signals-core,@preact/signals,htm/preact,preact,preact/hooks,@microsoft/fetch-event-source';
const transcript = signal([]) const transcript = signal([])
const chatStarted = computed(() => transcript.value.length > 0) const chatStarted = computed(() => transcript.value.length > 0)
@ -97,7 +93,6 @@
return String(str).replaceAll(/\{\{(.*?)\}\}/g, (_, key) => template(params[key])); return String(str).replaceAll(/\{\{(.*?)\}\}/g, (_, key) => template(params[key]));
} }
// send message to server // send message to server
const chat = async (msg) => { const chat = async (msg) => {
if (controller.value) { if (controller.value) {
@ -276,7 +271,6 @@
</head> </head>
<body> <body>
</body> </body>
</html> </html>