MCPcopy Create free account
hub / github.com/tiann/hapi / resolveCursorAcpWireId

Function resolveCursorAcpWireId

cli/src/cursor/utils/cursorModeConfig.ts:87–102  ·  view source on GitHub ↗
(
    requested: string,
    available: readonly { modelId: string }[]
)

Source from the content-addressed store, hash-verified

85 * Exact wire ids only — no legacy alias, base-only, or nearest-variant fallback.
86 */
87export function resolveCursorAcpWireId(
88 requested: string,
89 available: readonly { modelId: string }[]
90): string | null {
91 const trimmed = requested.trim();
92 if (!trimmed) {
93 return null;
94 }
95
96 const exact = available.find((entry) => entry.modelId === trimmed);
97 if (exact) {
98 return exact.modelId;
99 }
100
101 return matchCliSkuToAcpWireId(trimmed, available);
102}
103
104/**
105 * Apply a model from the live ACP configOptions list (Zed-style).

Callers 2

applyCursorAcpModelFunction · 0.85

Calls 1

matchCliSkuToAcpWireIdFunction · 0.85

Tested by

no test coverage detected