diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..9dacc8e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,37 @@ +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v1 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: prepare + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git fetch --no-tags --prune --depth=1 origin gh-pages + rm -rf dist + git worktree add -B gh-pages dist origin/gh-pages + yarn install + - name: dist + run: | + rm -rf dist/**/* + yarn vite build + git --work-tree dist add --all + git --work-tree dist commit -m "$(date +%Y%m%d)" + git push origin HEAD:gh-pages --force diff --git a/README.md b/README.md index 336bac3..e2c29fb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# LLM Workbench + # Future Ideas - TTS via tranformers.js diff --git a/index.html b/index.html index b2b7444..c8796c7 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ - LLM + LLM Workbench
diff --git a/package.json b/package.json index fce8ebb..4a2136f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,19 @@ { - "name": "any-llm", - "module": "index.ts", + "name": "llm-workbench", "type": "module", + "homepage": "https://knoopx.github.io/llm-workbench/", + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + }, "devDependencies": { "@types/node": "^20.8.9", "@types/react": "^18.2.33", diff --git a/src/app/ChatConversation.tsx b/src/app/ChatConversation.tsx index f589ef6..81d49ef 100644 --- a/src/app/ChatConversation.tsx +++ b/src/app/ChatConversation.tsx @@ -1,4 +1,3 @@ -import { Input } from "@/components/ui/input" import { observer } from "mobx-react" import { Button } from "../components/ui/button" import { IoMdTrash, IoMdRefresh } from "react-icons/io" @@ -6,44 +5,33 @@ import { ScrollArea } from "../components/ui/scroll-area" import { Message } from "./ChatConversationMessage" import { ToggleDarkButton } from "./ToggleDarkButton" import { useStore } from "@/store" -import { ImMagicWand } from "react-icons/im" -import { VscDebugContinueSmall } from "react-icons/vsc" +import { VscDebugContinue, VscDebugStart } from "react-icons/vsc" import { BiArrowToTop } from "react-icons/bi" +import { Textarea } from "@/components/ui/textarea" export const ChatConversation = observer(() => { const { activeChat: chat } = useStore() - const messages = [ - // { - // role: "system", - // content: chat.systemMessage, - // }, - // { - // role: "user", - // content: chat.user_message, - // }, - ...chat.messages, - ] return (
- {messages.map((message, i) => ( + {chat.messages.map((message, i) => ( ))}
-
- -
- -
- +
+ + +
+