diff --git a/src/app.css b/src/app.css index 27d2d7ef..410a956a 100644 --- a/src/app.css +++ b/src/app.css @@ -14,6 +14,12 @@ html { word-break: break-word; } +code { + white-space-collapse: preserve !important; + white-space: nowrap; + width: auto; +} + math { margin-top: 1rem; } @@ -31,8 +37,8 @@ math { } ::-webkit-scrollbar { - height: 1rem; - width: 0.5rem; + height: 0.45rem; + width: 0.35rem; } ::-webkit-scrollbar-track { diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte index 5b7aca61..7e950d31 100644 --- a/src/lib/components/chat/Messages.svelte +++ b/src/lib/components/chat/Messages.svelte @@ -372,7 +372,7 @@ {/if} -
+
{#if message.role === 'user'} You diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 405c02ac..d9f43793 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -29,6 +29,7 @@ let title = ''; let prompt = ''; + let files = []; let messages = []; let history = { diff --git a/src/routes/(app)/modelfiles/+page.svelte b/src/routes/(app)/modelfiles/+page.svelte index 5887eabb..ff7519da 100644 --- a/src/routes/(app)/modelfiles/+page.svelte +++ b/src/routes/(app)/modelfiles/+page.svelte @@ -42,6 +42,24 @@ await modelfiles.set($modelfiles.filter((modelfile) => modelfile.tagName != tagName)); localStorage.setItem('modelfiles', JSON.stringify($modelfiles)); }; + + const shareModelfile = async (modelfile) => { + toast.success('Redirecting you to OllamaHub'); + + const url = 'https://ollamahub.com'; + + const tab = await window.open(`${url}/create`, '_blank'); + window.addEventListener( + 'message', + (event) => { + if (event.origin !== url) return; + if (event.data === 'loaded') { + tab.postMessage(JSON.stringify(modelfile), '*'); + } + }, + false + ); + };
@@ -99,24 +117,74 @@
-
+
- Edit + + + + + + + + + +
{/each}