mirror of
https://github.com/modelstudioai/cli.git
synced 2026-09-14 19:49:23 +08:00
43abf0aca5
- 增加test:journey脚本,覆盖知识库跨命令全链路用户旅程测试 - 在文档中新增Journey E2E章节,详细说明用户旅程测试定位及断言机制 - 完善commands模块,新增知识库相关命令包括知识库列表、信息、创建、更新、删除 - 新增知识库文档相关命令,如文档列表、状态、上传、删除、打标签及OSS导入 - 添加知识服务管理命令,支持列表、创建、更新、部署、删除及复制 - 支持知识块增删查改命令,完善知识点的灵活操作能力 - 实现数据中心分类管理命令,支持分类增删查操作 - 优化knowledge chat命令,增加workspace-id统一解析及agent-version版本控制 - 重构与知识库相关命令的导出与注册,完善CLI整体能力覆盖 - 新增命令详尽的帮助文档,包含参数说明、使用示例及错误边界 - 实现批量删除知识块的自动分批处理逻辑,易于操作大规模数据 - 添加必要的输入校验与安全提示,确保操作安全且符合规范
23 lines
1.0 KiB
TypeScript
23 lines
1.0 KiB
TypeScript
import { describe, expect, test } from "vite-plus/test";
|
|
import { ragEndpoint, RAG_PATHS } from "../src/client/endpoints.ts";
|
|
|
|
describe("ragEndpoint", () => {
|
|
test("拼接 workspace 子域名与路径", () => {
|
|
expect(ragEndpoint("ws_test", RAG_PATHS.indexList)).toBe(
|
|
"https://ws_test.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/index/list",
|
|
);
|
|
});
|
|
|
|
test("RAG_PATHS 覆盖全部管理端点域", () => {
|
|
// indices domain
|
|
expect(RAG_PATHS.indexCreateV2).toBe("/api/v1/indices/rag/index/create_v2");
|
|
expect(RAG_PATHS.indexJobStatus).toBe("/api/v1/indices/rag/index_job/status");
|
|
expect(RAG_PATHS.chunkList).toBe("/api/v1/indices/rag/index/chunklist");
|
|
expect(RAG_PATHS.chunkCreate).toBe("/api/v1/indices/rag/index/chunk/create");
|
|
// agent domain (the actual gateway prefix is rag/app/, not rag/agent/ as the public docs state)
|
|
expect(RAG_PATHS.agentList).toBe("/api/v1/indices/rag/app/list");
|
|
// connector domain
|
|
expect(RAG_PATHS.listCategory).toBe("/api/v1/connector/dash/listCategory");
|
|
});
|
|
});
|