recover task-loop package
This commit is contained in:
parent
62ea963003
commit
e22d344647
@ -233,7 +233,7 @@
|
||||
"lint": "eslint src --ext ts",
|
||||
"test": "node ./dist/test/e2e/runTest.js",
|
||||
"prepare:ocr": "rollup --config rollup.tesseract.js",
|
||||
"build:task-loop": "npx vite build --config webpack/vite.config.task-loop.mjs && node renderer/scripts/task-loop.build.mjs"
|
||||
"build:task-loop": "npx vite build --config renderer/vite.config.task-loop.mjs && node renderer/scripts/task-loop.build.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.12.1",
|
||||
|
@ -47,7 +47,7 @@ import { useI18n } from 'vue-i18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const version = '0.1.6';
|
||||
const version = '0.1.7';
|
||||
const author = 'LSTM-Kirigaya (锦恢)';
|
||||
|
||||
defineComponent({ name: 'about' });
|
||||
|
63
renderer/vite.config.task-loop.mjs
Normal file
63
renderer/vite.config.task-loop.mjs
Normal file
@ -0,0 +1,63 @@
|
||||
import { defineConfig, normalizePath } from 'vite';
|
||||
import { resolve } from 'path';
|
||||
import { viteStaticCopy } from 'vite-plugin-static-copy';
|
||||
|
||||
export default defineConfig({
|
||||
define: {
|
||||
'window': {
|
||||
'nodejs': true,
|
||||
'navigator': {
|
||||
'userAgent': 2
|
||||
},
|
||||
'performance': {
|
||||
'now': () => performance.now()
|
||||
},
|
||||
'Date': {
|
||||
'now': () => Date.now()
|
||||
}
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
viteStaticCopy({
|
||||
targets: [
|
||||
{
|
||||
src: normalizePath(resolve(__dirname, '../resources/openmcp-sdk-release/*')),
|
||||
dest: normalizePath(resolve(__dirname, '../openmcp-sdk'))
|
||||
}
|
||||
]
|
||||
})
|
||||
],
|
||||
build: {
|
||||
target: 'node18',
|
||||
lib: {
|
||||
entry: resolve(__dirname, '..', 'renderer/src/components/main-panel/chat/core/task-loop.ts'),
|
||||
name: 'TaskLoop',
|
||||
fileName: 'task-loop',
|
||||
formats: ['cjs']
|
||||
},
|
||||
outDir: resolve(__dirname, '..', 'openmcp-sdk'),
|
||||
emptyOutDir: false,
|
||||
rollupOptions: {
|
||||
external: [
|
||||
'vue',
|
||||
'chalk',
|
||||
'element-plus',
|
||||
],
|
||||
output: {
|
||||
globals: {
|
||||
vue: 'vue',
|
||||
chalk: 'chalk',
|
||||
'element-plus': './tools.js'
|
||||
},
|
||||
esModule: true
|
||||
}
|
||||
},
|
||||
minify: false,
|
||||
sourcemap: false
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, '..', 'renderer/src'),
|
||||
}
|
||||
}
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user