MCPcopy Create free account
hub / github.com/VGabriel45/SolidityVisualizer / shouldShowReasoning

Function shouldShowReasoning

src/components/loading.tsx:105–125  ·  view source on GitHub ↗
(currentStatus: string)

Source from the content-addressed store, hash-verified

103 }, [explanation, mapping, diagram]);
104
105 const shouldShowReasoning = (currentStatus: string) => {
106 if (
107 currentStatus === "explanation_sent" ||
108 (currentStatus.startsWith("explanation") && !explanation)
109 ) {
110 return "explanation";
111 }
112 if (
113 currentStatus === "mapping_sent" ||
114 (currentStatus.startsWith("mapping") && !mapping)
115 ) {
116 return "mapping";
117 }
118 if (
119 currentStatus === "diagram_sent" ||
120 (currentStatus.startsWith("diagram") && !diagram)
121 ) {
122 return "diagram";
123 }
124 return null;
125 };
126
127 const renderReasoningMessage = () => {
128 const reasoningType = shouldShowReasoning(status);

Callers 2

renderReasoningMessageFunction · 0.85
getStatusDisplayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected