@apdesign/oms-agent 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist-lib/oms-agent.cjs +37 -72
- package/dist-lib/oms-agent.cjs.map +1 -1
- package/dist-lib/oms-agent.mjs +2471 -6646
- package/dist-lib/oms-agent.mjs.map +1 -1
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -4,15 +4,19 @@ OMS 智能助手前端组件库:在 OMS 页面内提供悬浮入口与对话
|
|
|
4
4
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
7
|
+
在 OMS 项目根目录执行:
|
|
8
|
+
|
|
7
9
|
```bash
|
|
8
10
|
npm install @apdesign/oms-agent
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
npm 7+ 会自动安装未满足的 peer:`react`、`react-dom`、`@ai-sdk/react`、`ai`。OMS 使用 **React 18.x**(如 18.3.1)即可。
|
|
14
|
+
|
|
15
|
+
若出现 **Invalid hook call** 或 **recentlyCreatedOwnerStacks**:请删除 `node_modules` 和 `package-lock.json` 后重新 `npm install`,确保全项目只有一份 React。
|
|
12
16
|
|
|
13
17
|
## 依赖
|
|
14
18
|
|
|
15
|
-
- React 18
|
|
19
|
+
- **React 18+**、**react-dom**、**@ai-sdk/react**、**ai**(peer,由宿主项目提供;`npm install @apdesign/oms-agent` 时 npm 7+ 会一并安装未满足的 peer)
|
|
16
20
|
- 需单独部署 **Agent 后端服务**(提供 `POST /api/agent/query`),参见下方「后端」说明
|
|
17
21
|
|
|
18
22
|
## 使用
|