Files
clh02467605 d646a4e780 refactor(e2e): update test routes and streamline command handling
- 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.
2026-07-10 15:55:53 +08:00

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,
};