This commit is contained in:
2024-12-07 02:05:55 +08:00
parent 3efc3b3cc5
commit c00bfcf011
7 changed files with 47 additions and 716 deletions

View File

@@ -4,8 +4,7 @@ import { dynamicImport } from './lib/dynamic-import.ts';
import { redisPublisher, redisSubscriber, redis } from './modules/redis.ts';
import { minioClient } from './modules/minio.ts';
import { sequelize } from './modules/sequelize.ts';
import { useContextKey , useContext} from '@kevisual/use-config/context';
useContext({});
import { useContextKey, useContext } from '@kevisual/use-config/context';
useConfig();
export const emit = (channel: string, message?: any) => {
redisPublisher.publish(channel, JSON.stringify(message));
@@ -29,7 +28,9 @@ const init = () => {
});
};
export const app = useContextKey('app', init);
// @ts-ignore
// app.name = 'main-app';
// console.log('app context', global.context);
const clients = [];
// 订阅频道 pageEdit container 单个页面预览 container 整个页面预览
type ClientData = {

View File

@@ -4,15 +4,15 @@ import './page/index.ts';
import './resource/index.ts';
// import './prompt-graph/index.ts';
import './prompt-graph/index.ts';
import './agent/index.ts';
import './user/index.ts';
// import './chat-prompt/index.ts';
import './chat-prompt/index.ts';
// import './chat-history/index.ts';
import './chat-history/index.ts';
import './github/index.ts';

View File

@@ -1,4 +1,4 @@
import { app } from '@/app.ts';
// import { app } from '@/app.ts';
import { manager, loadManager, app as ManagerApp } from '@kevisual/local-app-manager';
export const existDenpend = [
'sequelize', // commonjs
@@ -13,6 +13,7 @@ export const existDenpend = [
];
// export const manager = new Manager({ mainApp: app });
export { manager };
console.log('app equal', app === ManagerApp);
// console.log('app', app, );
// console.log('app2 context', global.context);
// console.log('app equal', app === ManagerApp);
loadManager();