* add chats page * add basic layout and types * add chat context * add more components * add agent form * add destroy button * update types * add models * update chat agent * create chat agent * refactor * refactor * add chats CRUD * notify for chat db update * refactor * typo * chat CRUD * refactor * clean code * add vad * may record * may transcribe recording * update models * edit chat member * chat form update * refactor * fix chat form * transcribe in chat * create chat session * may create chat session * update * update chat * locale * refactor * refactor * update * update * update * refactor chat * Fix * fix * update prompt * refactor * make it works * update agent message actions * may assess recording * fix chat message recording assess * refine * refactor * refactor * may delete message * may edit message * update locales * fix package issue in Mac * add destroy callbacks * fix chats CRUD * update chats * add quickstart * update locales * refactor * refactor prompt * remove console.log * update * fix locales
59 lines
1.5 KiB
TypeScript
59 lines
1.5 KiB
TypeScript
import path from "path";
|
|
import react from "@vitejs/plugin-react";
|
|
import { viteStaticCopy } from "vite-plugin-static-copy";
|
|
import type { ConfigEnv, UserConfig } from "vite";
|
|
import { defineConfig } from "vite";
|
|
import { pluginExposeRenderer } from "./vite.base.config";
|
|
|
|
// https://vitejs.dev/config
|
|
export default defineConfig((env) => {
|
|
const forgeEnv = env as ConfigEnv<"renderer">;
|
|
const { root, mode, forgeConfigSelf } = forgeEnv;
|
|
const name = forgeConfigSelf.name ?? "";
|
|
|
|
return {
|
|
root,
|
|
mode,
|
|
base: "./",
|
|
build: {
|
|
outDir: `.vite/renderer/${name}`,
|
|
},
|
|
plugins: [
|
|
pluginExposeRenderer(name),
|
|
react(),
|
|
viteStaticCopy({
|
|
targets: [
|
|
{
|
|
src: "assets/*",
|
|
dest: "assets",
|
|
},
|
|
{
|
|
src: "node_modules/@ricky0123/vad-web/dist/vad.worklet.bundle.min.js",
|
|
dest: "./",
|
|
},
|
|
{
|
|
src: "node_modules/@ricky0123/vad-web/dist/silero_vad.onnx",
|
|
dest: "./",
|
|
},
|
|
{
|
|
src: "node_modules/onnxruntime-web/dist/*.wasm",
|
|
dest: "./",
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
resolve: {
|
|
preserveSymlinks: true,
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
"@renderer": path.resolve(__dirname, "./src/renderer"),
|
|
"@commands": path.resolve(__dirname, "./src/commands"),
|
|
},
|
|
},
|
|
optimizeDeps: {
|
|
exclude: ["@ffmpeg/ffmpeg", "@ffmpeg/util"],
|
|
},
|
|
clearScreen: false,
|
|
} as UserConfig;
|
|
});
|