UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

13 lines (12 loc) • 513 B
//#region extensions/workboard/src/card-lookup.ts function resolveWorkboardCardByIdOrPrefix(e, t) { const n = e.find((e) => e.id === t); if (n) return { card: n }; const r = e.filter((e) => e.id.startsWith(t)); if (r.length === 0) return { error: `Card not found: ${t}` }; if (r.length > 1) return { error: `Ambiguous card id prefix: ${t} (${r.length} matches)` }; const i = r[0]; return i ? { card: i } : { error: `Card not found: ${t}` }; } //#endregion export { resolveWorkboardCardByIdOrPrefix as t };