后端: - 删除 agent-stream.ts,新建 alfred-agent.ts (ToolLoopAgent 工厂) - 新建 get-current-time.ts 工具 (zod schema) - 重构 send.ts: createAgentUIStreamResponse + onFinish 可靠持久化 前端: - 删除 MessageBubble.tsx,新建 ToolCallCard.tsx (四态) - 重构 ChatPanel.tsx: 论坛式 Card 布局 + PartRenderer 分派 - 移除 @ant-design/x 依赖,改用 antd 组件 + streamdown 依赖: + zod + streamdown - @ant-design/x - @ant-design/x-markdown 测试: 306 pass, typecheck/lint 0 errors
79 lines
2.5 KiB
JSON
79 lines
2.5 KiB
JSON
{
|
|
"name": "alfred",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "bun run scripts/dev.ts",
|
|
"dev:server": "bun --watch src/server/dev.ts",
|
|
"dev:web": "bunx --bun vite --host",
|
|
"build": "bun run scripts/build.ts",
|
|
"lint": "eslint .",
|
|
"format": "prettier . --write",
|
|
"format:check": "prettier . --check",
|
|
"check": "bun run schema:check && bun run typecheck && bun run lint && bun test",
|
|
"schema": "bun run scripts/generate-config-schema.ts",
|
|
"schema:check": "bun run scripts/generate-config-schema.ts -- --check",
|
|
"verify": "bun run check && bun run build",
|
|
"test": "bun test",
|
|
"clean": "bun run scripts/clean.ts",
|
|
"typecheck": "tsc --noEmit",
|
|
"prepare": "husky",
|
|
"version:patch": "bun run scripts/bump-version.ts patch",
|
|
"version:minor": "bun run scripts/bump-version.ts minor",
|
|
"version:major": "bun run scripts/bump-version.ts major",
|
|
"version:set": "bun run scripts/bump-version.ts set"
|
|
},
|
|
"devDependencies": {
|
|
"@commitlint/cli": "^21.0.1",
|
|
"@commitlint/config-conventional": "^21.0.1",
|
|
"@eslint/js": "^10.0.1",
|
|
"@tanstack/react-query-devtools": "^5.100.14",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@types/bun": "^1.3.14",
|
|
"@types/jsdom": "^28.0.3",
|
|
"@types/react": "^19.2.15",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^6.0.2",
|
|
"drizzle-kit": "^0.31.10",
|
|
"eslint": "^10.4.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
"eslint-plugin-import": "^2.32.0",
|
|
"eslint-plugin-perfectionist": "^5.9.0",
|
|
"eslint-plugin-prettier": "^5.5.5",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
"husky": "^9.1.7",
|
|
"jsdom": "^29.1.1",
|
|
"lint-staged": "^17.0.5",
|
|
"prettier": "^3.8.3",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.60.0",
|
|
"vite": "^8.0.14"
|
|
},
|
|
"dependencies": {
|
|
"@ai-sdk/anthropic": "^3.0.81",
|
|
"@ai-sdk/openai": "^3.0.66",
|
|
"@ai-sdk/openai-compatible": "^2.0.48",
|
|
"@ai-sdk/react": "^3.0.195",
|
|
"@ant-design/icons": "^6.2.3",
|
|
"@sinclair/typebox": "^0.34.49",
|
|
"@tanstack/react-query": "^5.100.14",
|
|
"ai": "^6.0.193",
|
|
"ajv": "^8.20.0",
|
|
"antd": "^6.4.3",
|
|
"drizzle-orm": "^0.45.2",
|
|
"es-toolkit": "^1.47.0",
|
|
"pino": "^10.3.1",
|
|
"pino-pretty": "^13.1.3",
|
|
"pino-roll": "^4.0.0",
|
|
"react": "^19.2.6",
|
|
"react-dom": "^19.2.6",
|
|
"react-router": "^7.15.1",
|
|
"recharts": "^3.8.1",
|
|
"streamdown": "^2.5.0",
|
|
"zod": "^4.4.3"
|
|
}
|
|
}
|