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

Function submitFeedback

frontend/dashboard/src/api.ts:486–502  ·  view source on GitHub ↗
(
  requestId: string,
  signal: "ok" | "weak" | "strong",
)

Source from the content-addressed store, hash-verified

484 get<TraceRecord>(`/v1/traces/${encodeURIComponent(requestId)}`);
485
486export async function submitFeedback(
487 requestId: string,
488 signal: "ok" | "weak" | "strong",
489): Promise<FeedbackResult | null> {
490 try {
491 const res = await fetch("/v1/feedback", {
492 method: "POST",
493 headers: { "Content-Type": "application/json" },
494 body: JSON.stringify({ request_id: requestId, signal }),
495 });
496 const text = await res.text();
497 if (!text) return null;
498 return JSON.parse(text) as FeedbackResult;
499 } catch {
500 return null;
501 }
502}
503
504export interface RoutePreviewResult {
505 tier: number;

Callers 1

handleFunction · 0.90

Calls 2

stringifyMethod · 0.80
parseMethod · 0.80

Tested by

no test coverage detected