- Added a new task store in `src-react/stores/task.ts` to manage tasks and their statuses. - Implemented functions for creating, executing, and retrying tasks, along with handling task progress and completion. - Introduced persistence for tasks using IPC. - Created utility functions for normalizing room types and building subtasks. - Added a new CSS file for global styles in `src-react/styles.css`. - Created runtime types in `src-react/types/runtime.ts` and exported them. - Updated the main entry points for Vue and React applications to support dynamic framework loading. - Refactored chat model interfaces and utility functions into `src/shared/chat-model.ts`. - Updated TypeScript configuration to include paths for React components and types. - Enhanced Vite configuration to support both Vue and React frameworks.
36 lines
852 B
TypeScript
36 lines
852 B
TypeScript
import { createApp, type Plugin } from "vue";
|
|
import { createPinia } from "pinia";
|
|
import errorHandler from "@utils/errorHandler";
|
|
import router from "./router";
|
|
import App from "./App.vue";
|
|
|
|
import ElementPlus from "element-plus";
|
|
import locale from "element-plus/es/locale/lang/zh-cn";
|
|
|
|
import i18n from "./i18n";
|
|
import "./permission";
|
|
|
|
import "./styles/index.css";
|
|
import "element-plus/dist/index.css";
|
|
import "element-plus/theme-chalk/dark/css-vars.css";
|
|
|
|
import Layout from "@components/Layout/index.vue";
|
|
|
|
const components: Plugin = (app) => {
|
|
app.component("Layout", Layout);
|
|
};
|
|
|
|
export function mountVueApp(): void {
|
|
const app = createApp(App);
|
|
const pinia = createPinia();
|
|
|
|
app.use(pinia);
|
|
app.use(router);
|
|
app.use(ElementPlus, { locale });
|
|
app.use(components);
|
|
app.use(i18n);
|
|
app.use(errorHandler);
|
|
|
|
app.mount("#app");
|
|
}
|