From 5fb7adb0ddf0e53f22f2f5787b9b6c251a0aa8e4 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 7 Dec 2023 11:52:55 -0800 Subject: [PATCH 1/8] fix: no files --- src/routes/(app)/c/[id]/+page.svelte | 1 + 1 file changed, 1 insertion(+) 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 = { From 59f392de39b8cb3dcbf2972259fce1cf0f7e9bb4 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 7 Dec 2023 14:37:25 -0800 Subject: [PATCH 2/8] feat: share to ollamahub --- src/routes/(app)/modelfiles/+page.svelte | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/routes/(app)/modelfiles/+page.svelte b/src/routes/(app)/modelfiles/+page.svelte index 5887eabb..843e8d1d 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 + ); + };
@@ -108,6 +126,16 @@ Edit + +
-
+
- Edit + + + + + + + + + + + + +
{/each} From a4358c2bbec4231cb85ccea7ca5debb19fa7c717 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 8 Dec 2023 16:51:52 -0800 Subject: [PATCH 4/8] feat: icon updated --- src/routes/(app)/modelfiles/+page.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/(app)/modelfiles/+page.svelte b/src/routes/(app)/modelfiles/+page.svelte index c352e76d..ff7519da 100644 --- a/src/routes/(app)/modelfiles/+page.svelte +++ b/src/routes/(app)/modelfiles/+page.svelte @@ -158,7 +158,7 @@ From d0633a9499ae20dfa45453c94feafea12deb6511 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 8 Dec 2023 17:48:31 -0800 Subject: [PATCH 5/8] feat: horizontal scroll for code block --- src/app.css | 8 ++++++++ src/lib/components/chat/Messages.svelte | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app.css b/src/app.css index 27d2d7ef..9ff69e87 100644 --- a/src/app.css +++ b/src/app.css @@ -14,6 +14,14 @@ html { word-break: break-word; } +code { + white-space-collapse: preserve !important; + /* text-wrap: nowrap !important; */ + + white-space: nowrap; + width: auto; +} + math { margin-top: 1rem; } 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 From 4cdf398225d1dae6e1a7c2231d71fc361184b0d4 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 8 Dec 2023 17:50:22 -0800 Subject: [PATCH 6/8] chore: comment deleted --- src/app.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app.css b/src/app.css index 9ff69e87..e62a6113 100644 --- a/src/app.css +++ b/src/app.css @@ -16,8 +16,6 @@ html { code { white-space-collapse: preserve !important; - /* text-wrap: nowrap !important; */ - white-space: nowrap; width: auto; } From c23da2c91c92f2d7eb85c367bf81e5ca820d1f63 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 8 Dec 2023 18:25:58 -0800 Subject: [PATCH 7/8] feat: scrollbar styling --- src/app.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.css b/src/app.css index e62a6113..7a421e7c 100644 --- a/src/app.css +++ b/src/app.css @@ -37,8 +37,8 @@ math { } ::-webkit-scrollbar { - height: 1rem; - width: 0.5rem; + height: 0.35rem; + width: 0.35rem; } ::-webkit-scrollbar-track { From 109dbb44b80b476ed97346f87bc6d86d2ca30c46 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Fri, 8 Dec 2023 18:28:19 -0800 Subject: [PATCH 8/8] fix: scrollbar styling --- src/app.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.css b/src/app.css index 7a421e7c..410a956a 100644 --- a/src/app.css +++ b/src/app.css @@ -37,7 +37,7 @@ math { } ::-webkit-scrollbar { - height: 0.35rem; + height: 0.45rem; width: 0.35rem; }