MCPcopy Index your code
hub / github.com/thesysdev/openui / isPromptOptions

Function isPromptOptions

packages/openui-cli/src/commands/generate-worker.ts:85–98  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

83}
84
85function isPromptOptions(value: unknown): value is PromptOptions {
86 if (typeof value !== "object" || value === null) return false;
87 const obj = value as Record<string, unknown>;
88 return (
89 Array.isArray(obj["examples"]) ||
90 Array.isArray(obj["additionalRules"]) ||
91 Array.isArray(obj["toolExamples"]) ||
92 typeof obj["preamble"] === "string" ||
93 typeof obj["editMode"] === "boolean" ||
94 typeof obj["inlineMode"] === "boolean" ||
95 typeof obj["toolCalls"] === "boolean" ||
96 typeof obj["bindings"] === "boolean"
97 );
98}
99
100function findPromptOptions(
101 mod: Record<string, unknown>,

Callers 1

findPromptOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected