MCPcopy Create free account
hub / github.com/ding113/claude-code-hub / selectMainAction

Method selectMainAction

scripts/clear-session-bindings.ts:711–738  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

709 }
710
711 async selectMainAction(): Promise<"priority" | "select" | "type" | "name" | "quit"> {
712 console.log("\n请选择操作:");
713 console.log(" 1. 按优先级筛选");
714 console.log(" 2. 手动选择供应商");
715 console.log(" 3. 按类型筛选");
716 console.log(" 4. 按名称搜索");
717 console.log(" q. 退出\n");
718
719 const input = await this.question("请输入选项: ");
720
721 switch (input.toLowerCase()) {
722 case "1":
723 return "priority";
724 case "2":
725 return "select";
726 case "3":
727 return "type";
728 case "4":
729 return "name";
730 case "q":
731 case "quit":
732 case "exit":
733 return "quit";
734 default:
735 console.log("无效选项,请重新输入");
736 return this.selectMainAction();
737 }
738 }
739
740 async selectProviderType(providers: ProviderRecord[]): Promise<string | null> {
741 // 统计每种类型的数量

Callers 1

mainFunction · 0.80

Calls 1

questionMethod · 0.95

Tested by

no test coverage detected