MCPcopy Create free account
hub / github.com/microsoft/data-formulator / createNextDraft

Function createNextDraft

src/views/SimpleChartRecBox.tsx:582–596  ·  view source on GitHub ↗
(parentTableId: string, initialInteraction: InteractionEntry[])

Source from the content-addressed store, hash-verified

580 let currentDraftId: string | null = null;
581 let currentDraftParentTableId: string | null = null;
582 const createNextDraft = (parentTableId: string, initialInteraction: InteractionEntry[]) => {
583 const draftId = `draft-${actionId}-${Date.now()}`;
584 dispatch(dfActions.createDraftNode({
585 id: draftId,
586 displayId: draftId,
587 parentTableId,
588 source: selectedTableIds,
589 interaction: initialInteraction,
590 actionId,
591 }));
592 currentDraftId = draftId;
593 currentDraftParentTableId = parentTableId;
594 currentDraftInteraction = [...initialInteraction];
595 return draftId;
596 };
597
598 // Create the initial draft (or reuse existing for clarification / explanation resume)
599 if (isResume && pendingClarification?.draftId) {

Callers 2

SimpleChartRecBoxFunction · 0.85
processStreamingResultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected