MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / script

Function script

ts/workflow-cli/cli/deploy/prompts.test.ts:48–56  ·  view source on GitHub ↗
(p: { input?: [RegExp, unknown][]; password?: [RegExp, unknown][]; select?: [RegExp, unknown][]; checkbox?: [RegExp, unknown][]; confirm?: [RegExp, unknown][] })

Source from the content-addressed store, hash-verified

46 hasProviderModel: p.hasProviderModel ?? false,
47 catalogProviders: p.catalogProviders ?? [],
48 unresolvedCatalogModels: p.unresolvedCatalogModels ?? [],
49 hasWebSearch: p.hasWebSearch ?? false,
50 };
51}
52const hwGpio = (id: string) => ({ id, label: id, family: "gpio" as const });
53const hwSerial = (id: string) => ({ id, label: id, family: "serial" as const });
54
55// Answer a prompt by matching its message against [regex, value] pairs; an
56// unmatched prompt throws, so a test never silently drives the wrong path.
57type Responder = (o: { message: string }) => Promise<unknown>;
58const respond =
59 (map: [RegExp, unknown][]): Responder =>

Callers 1

prompts.test.tsFile · 0.85

Calls 2

setMockFunction · 0.85
respondFunction · 0.85

Tested by

no test coverage detected