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

Function addArgument

ts/workflow-builder/src/utils/functionOperations.ts:94–103  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

92// ── Input arguments (declarations) ─────────────────────────────────────────────
93
94export function addArgument(id: string): void {
95 mutate(
96 id,
97 (fn) => ({
98 ...fn,
99 arguments: [...fn.arguments, ensureUid({ name: `input${fn.arguments.length + 1}`, dataType: "string" })],
100 }),
101 true,
102 );
103}
104
105export function updateArgument(id: string, index: number, patch: Partial<ApiVariable>): void {
106 mutate(

Callers 1

FunctionConfigPanelFunction · 0.90

Calls 2

ensureUidFunction · 0.90
mutateFunction · 0.85

Tested by

no test coverage detected