From 59f392de39b8cb3dcbf2972259fce1cf0f7e9bb4 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 7 Dec 2023 14:37:25 -0800 Subject: [PATCH 1/7] 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 5887eabbc..843e8d1d4 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 3/7] 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 c352e76d4..ff7519dae 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 4/7] 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 27d2d7ef5..9ff69e873 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 5b7aca61b..7e950d312 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 5/7] chore: comment deleted --- src/app.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app.css b/src/app.css index 9ff69e873..e62a61132 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 6/7] 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 e62a61132..7a421e7c2 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 7/7] 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 7a421e7c2..410a956a7 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; }