MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / createDraft

Function createDraft

frontend/dashboard/src/components/Routing.tsx:514–527  ·  view source on GitHub ↗
(row?: RoutingTierConfig)

Source from the content-addressed store, hash-verified

512}
513
514function createDraft(row?: RoutingTierConfig): DraftState {
515 if (!row?.overridden) {
516 return {
517 primary: "",
518 fallbackCsv: "",
519 selectionMode: row?.selection_mode ?? "adaptive",
520 };
521 }
522 return {
523 primary: row.primary,
524 fallbackCsv: row.fallback.join(", "),
525 selectionMode: row.selection_mode,
526 };
527}
528
529function buildDrafts(config: RoutingConfigState): Record<string, DraftState> {
530 const next: Record<string, DraftState> = {};

Callers 4

updateDraftFunction · 0.85
handleSaveOverrideFunction · 0.85
RoutingFunction · 0.85
buildDraftsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected