Merge branch 'main' into dev

This commit is contained in:
Timothy Jaeryang Baek 2023-12-10 22:04:43 -05:00 committed by GitHub
commit 4c729bf3c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 7 deletions

View file

@ -25,6 +25,12 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
# Required for multi architecture build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# Required for multi architecture build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry - name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
@ -42,9 +48,10 @@ jobs:
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 uses: docker/build-push-action@v5
with: with:
context: . context: .
push: true push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}

View file

@ -15,8 +15,8 @@ html {
} }
code { code {
white-space-collapse: preserve !important; /* white-space-collapse: preserve !important; */
white-space: nowrap; white-space: pre;
width: auto; width: auto;
} }

View file

@ -7,7 +7,7 @@
import auto_render from 'katex/dist/contrib/auto-render.mjs'; import auto_render from 'katex/dist/contrib/auto-render.mjs';
import 'katex/dist/katex.min.css'; import 'katex/dist/katex.min.css';
import { config, db, modelfiles, settings, user } from '$lib/stores'; import { chatId, config, db, modelfiles, settings, user } from '$lib/stores';
import { tick } from 'svelte'; import { tick } from 'svelte';
import toast from 'svelte-french-toast'; import toast from 'svelte-french-toast';
@ -192,7 +192,7 @@
history.currentId = userMessageId; history.currentId = userMessageId;
await tick(); await tick();
await sendPrompt(userPrompt, userMessageId); await sendPrompt(userPrompt, userMessageId, $chatId);
}; };
const cancelEditMessage = (messageId) => { const cancelEditMessage = (messageId) => {
@ -325,7 +325,7 @@
</div> </div>
{#if selectedModelfile.user} {#if selectedModelfile.user}
<div class="mt-0.5 text-sm font-normal text-gray-500 dark:text-gray-500"> <div class="mt-0.5 text-sm font-normal text-gray-500 dark:text-gray-500">
By <a href="https://ollamahub.com/" By <a href="https://ollamahub.com/m/{selectedModelfile.user.username}"
>{selectedModelfile.user.name >{selectedModelfile.user.name
? selectedModelfile.user.name ? selectedModelfile.user.name
: `@${selectedModelfile.user.username}`}</a : `@${selectedModelfile.user.username}`}</a

View file

@ -228,7 +228,9 @@ SYSTEM """${system}"""`.replace(/^\s*\n/gm, '');
imageUrl = modelfile.imageUrl; imageUrl = modelfile.imageUrl;
title = modelfile.title; title = modelfile.title;
await tick(); await tick();
tagName = `${modelfile.user.username}/${modelfile.tagName}`; tagName = `${modelfile.user.username === 'hub' ? '' : `hub/`}${modelfile.user.username}/${
modelfile.tagName
}`;
desc = modelfile.desc; desc = modelfile.desc;
content = modelfile.content; content = modelfile.content;
suggestions = suggestions =