mirror of
https://github.com/modelstudioai/cli.git
synced 2026-09-14 19:49:23 +08:00
d646a4e780
- Replaced hardcoded command paths with dynamic route mappings in E2E tests. - Enhanced documentation for command testing, specifying minimum route requirements. - Consolidated command path management into `topic-routes.ts` for better maintainability. - Updated various E2E test cases to utilize the new routing structure, ensuring consistency across tests. - Removed redundant helper functions and improved test clarity by directly referencing route exports.
24 lines
721 B
TypeScript
24 lines
721 B
TypeScript
import type { AnyCommand } from "bailian-cli-core";
|
|
import {
|
|
configShow,
|
|
configSet,
|
|
update,
|
|
knowledgeRetrieve,
|
|
knowledgeSearch,
|
|
knowledgeChat,
|
|
} from "bailian-cli-commands";
|
|
|
|
// kscli (Knowledge Studio CLI): lightweight RAG product. Ships config/update
|
|
// plus the knowledge commands, remapped to flat paths. Routing is driven
|
|
// entirely by these keys, and usage/examples/errors render the path from the
|
|
// key — so the same shared command shows `kscli search` here and
|
|
// `bl knowledge search` in bl.
|
|
export const commands: Record<string, AnyCommand> = {
|
|
"config show": configShow,
|
|
"config set": configSet,
|
|
update,
|
|
retrieve: knowledgeRetrieve,
|
|
search: knowledgeSearch,
|
|
chat: knowledgeChat,
|
|
};
|