refactor(qa): reuse model ref splitter · openclaw/openclaw@cfc699d
vincentkoc
·
2026-06-20
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ import { parseStrictNonNegativeInteger } from "openclaw/plugin-sdk/number-runtim
|
4 | 4 | import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime"; |
5 | 5 | import { ensureRepoBoundDirectory, resolveRepoRelativeOutputDir } from "./cli-paths.js"; |
6 | 6 | import type { QaCliBackendAuthMode } from "./gateway-child.js"; |
7 | | -import type { QaProviderMode } from "./model-selection.js"; |
| 7 | +import { splitQaModelRef as splitModelRef, type QaProviderMode } from "./model-selection.js"; |
8 | 8 | import { getQaProvider } from "./providers/index.js"; |
9 | 9 | import { readQaBootstrapScenarioCatalog } from "./scenario-catalog.js"; |
10 | 10 | import { applyQaMergePatch, isQaMergePatchObject } from "./suite-merge-patch.js"; |
@@ -14,17 +14,6 @@ const DEFAULT_QA_SUITE_WORKER_START_STAGGER_MS = 1_500;
|
14 | 14 | |
15 | 15 | type QaSeedScenario = ReturnType<typeof readQaBootstrapScenarioCatalog>["scenarios"][number]; |
16 | 16 | |
17 | | -function splitModelRef(ref: string) { |
18 | | -const slash = ref.indexOf("/"); |
19 | | -if (slash <= 0 || slash === ref.length - 1) { |
20 | | -return null; |
21 | | -} |
22 | | -return { |
23 | | -provider: ref.slice(0, slash), |
24 | | -model: ref.slice(slash + 1), |
25 | | -}; |
26 | | -} |
27 | | - |
28 | 17 | function normalizeQaConfigString(value: unknown): string | undefined { |
29 | 18 | return typeof value === "string" && value.trim() ? value.trim() : undefined; |
30 | 19 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。