refactor(core): 全量语义化客户端迁移并移除历史兼容桥接层

This commit is contained in:
gitea committed 2026-09-17 15:44:25 +08:00
1 parent 29ac24248e
commit d0f3d2738a
34 files changed
+89 -141

No files matched your search

+3 -3
View File
@@ -2,7 +2,7 @@
import { parseArgs, stringOption, booleanOption, numberOption } from "./cli/parser.js";
import { printJson, printTable, redactSensitiveText, formatExpiresAt } from "./cli/printer.js";
import { initCorpRuntime } from "./cli/helpers.js";
import { createEkbClient } from "./core/auth/ekb.js";
import { createSessionClient } from "./core/http/session-client.js";
import {
ApprovalService,
ApprovalRepository,
@@ -29,7 +29,7 @@ export async function runAiProCli(rawArgs: string[]): Promise<{ stdout: string;
const corp = runtime.selectedCorp;
const repo = new ApprovalRepository();
const service = new ApprovalService(repo);
let client: Awaited<ReturnType<typeof createEkbClient>> | undefined;
let client: Awaited<ReturnType<typeof createSessionClient>> | undefined;
const positional: string[] = [];
for (let i = 0; i < rawArgs.length; i++) {
@@ -69,7 +69,7 @@ export async function runAiProCli(rawArgs: string[]): Promise<{ stdout: string;
const getClient = async () => {
const activeCorpId = requireCorpId();
if (!corp) throw new Error("未找到当前企业配置");
client ??= await createEkbClient(corp);
client ??= await createSessionClient(corp);
return { client, corpId: activeCorpId };
};