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

Function handleReset

frontend/dashboard/src/components/Routing.tsx:97–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95 }
96
97 async function handleReset() {
98 if (!editable) return;
99 setBusyKey("reset");
100 setNotice(null);
101 const next = await resetRoutingConfig();
102 if (next) {
103 applyConfig(next);
104 showNotice("Routing config reset to discovery-managed defaults.");
105 onRefresh?.();
106 } else {
107 showNotice("Failed to reset routing config.", "error");
108 }
109 setBusyKey(null);
110 }
111
112 function updateDraft(mode: ModeName, tier: TierName, patch: Partial<DraftState>) {
113 const key = draftKey(mode, tier);

Callers

nothing calls this directly

Calls 3

resetRoutingConfigFunction · 0.90
applyConfigFunction · 0.85
showNoticeFunction · 0.85

Tested by

no test coverage detected