refactor: zod tree-shaking; better error handling in agent steps

This commit is contained in:
Simon
2026-02-09 17:49:10 +08:00
parent 6fdb8d03f2
commit 6f0ff1fd33
12 changed files with 82 additions and 67 deletions

View File

@@ -44,11 +44,11 @@
"postpublish": "node -e \"['README.md','LICENSE'].forEach(f=>{try{require('fs').unlinkSync(f)}catch{}})\""
},
"dependencies": {
"chalk": "^5.6.2",
"zod": "^4.3.5",
"@page-agent/core": "1.1.1",
"@page-agent/llms": "1.1.1",
"@page-agent/page-controller": "1.1.1",
"@page-agent/core": "1.1.1",
"@page-agent/ui": "1.1.1"
"@page-agent/ui": "1.1.1",
"chalk": "^5.6.2",
"zod": "^4.3.5"
}
}

View File

@@ -3,6 +3,7 @@ import { config as dotenvConfig } from 'dotenv'
import { dirname, resolve } from 'path'
import { fileURLToPath } from 'url'
import { defineConfig } from 'vite'
// import { analyzer } from 'vite-bundle-analyzer'
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js'
const __dirname = dirname(fileURLToPath(import.meta.url))
@@ -14,8 +15,11 @@ dotenvConfig({ path: resolve(__dirname, '../../.env') })
// - alias all local packages so that they can be build in
// - no external
// - no d.ts. dts does not work with monorepo aliasing
export default defineConfig(({ mode }) => ({
plugins: [cssInjectedByJsPlugin({ relativeCSSInjection: true })],
export default defineConfig(() => ({
plugins: [
cssInjectedByJsPlugin({ relativeCSSInjection: true }),
// analyzer()
],
publicDir: false,
esbuild: {
keepNames: true,