diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 273615d4..1af5d6a5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,5 +27,6 @@ jobs: n4z3m/dialoqbase:latest n4z3m/dialoqbase:${{ github.ref_name}} push: true - cache-from: type=gha - cache-to: type=gha,mode=max + platforms: linux/amd64,linux/arm64 + cache-from: type=registry,ref=n4z3m/dialoqbase:latest + cache-to: type=inline \ No newline at end of file diff --git a/.github/workflows/next.yml b/.github/workflows/next.yml index 939c5f7a..a4f4fdcb 100644 --- a/.github/workflows/next.yml +++ b/.github/workflows/next.yml @@ -25,5 +25,6 @@ jobs: tags: | n4z3m/dialoqbase-next:latest push: true - cache-from: type=gha - cache-to: type=gha,mode=max \ No newline at end of file + platforms: linux/amd64,linux/arm64 + cache-from: type=registry,ref=n4z3m/dialoqbase-next:latest + cache-to: type=inline \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 9e7558fa..2f725ab0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,14 @@ FROM node:18-slim as server WORKDIR /app -RUN apt update +RUN apt update && apt -y install g++ make python3 +RUN npm install -g node-gyp COPY ./server/ . -RUN yarn install --network-timeout 10000000 +RUN yarn config set registry https://registry.npmjs.org/ +RUN yarn config set network-timeout 1200000 +RUN yarn install --frozen-lockfile RUN yarn build @@ -24,7 +27,12 @@ RUN pnpm build FROM node:18-slim WORKDIR /app +RUN yarn config set registry https://registry.npmjs.org/ +RUN yarn config set network-timeout 1200000 + RUN apt update && apt -y install --no-install-recommends ca-certificates git git-lfs openssh-client curl jq cmake sqlite3 openssl psmisc python3 +RUN apt -y install g++ make +RUN npm install -g node-gyp RUN apt-get clean autoclean && apt-get autoremove --yes && rm -rf /var/lib/{apt,dpkg,cache,log}/ RUN npm --no-update-notifier --no-fund --global install pnpm # Copy API @@ -39,7 +47,7 @@ COPY --from=build /app/app/widget/dist/index.html ./public/bot.html # Copy script COPY --from=build /app/app/script/dist/chat.min.js ./public/chat.min.js -RUN yarn install --production --network-timeout 10000000 +RUN yarn install --production --frozen-lockfile ENV NODE_ENV=production diff --git a/app/ui/package.json b/app/ui/package.json index ce65d8e1..5962ce98 100644 --- a/app/ui/package.json +++ b/app/ui/package.json @@ -1,7 +1,7 @@ { "name": "app", "private": true, - "version": "1.4.1", + "version": "1.4.2", "type": "module", "scripts": { "dev": "vite", diff --git a/app/ui/src/Layout/BotPlaygroundLayout.tsx b/app/ui/src/Layout/BotPlaygroundLayout.tsx index 6fe1207b..54140f98 100644 --- a/app/ui/src/Layout/BotPlaygroundLayout.tsx +++ b/app/ui/src/Layout/BotPlaygroundLayout.tsx @@ -297,6 +297,7 @@ export default function BotPlaygroundLayout({ {children} + diff --git a/app/ui/src/components/Bot/Playground/Form.tsx b/app/ui/src/components/Bot/Playground/Form.tsx index c3d994b0..c6757a63 100644 --- a/app/ui/src/components/Bot/Playground/Form.tsx +++ b/app/ui/src/components/Bot/Playground/Form.tsx @@ -73,15 +73,8 @@ export const PlaygroundgForm = () => { const textareaRef = React.useRef(null); React.useEffect(() => { - const textarea = textareaRef.current; - if (textarea) { - const increaseHeight = () => { - textarea.style.height = "auto"; - textarea.style.height = `${Math.min(textarea.scrollHeight, 300)}px`; - }; - increaseHeight(); - textarea.addEventListener("input", increaseHeight); - return () => textarea.removeEventListener("input", increaseHeight); + if (textareaRef.current) { + textareaRef.current.focus(); } }, []); @@ -106,8 +99,8 @@ export const PlaygroundgForm = () => { }; return ( -
-
+
+
{ @@ -117,34 +110,34 @@ export const PlaygroundgForm = () => { })} className="shrink-0 flex-grow flex items-center " > -
+