MCPcopy Create free account
hub / github.com/altic-dev/Pilot / formatTextVariationOutput

Function formatTextVariationOutput

src/components/tool-invocation.tsx:228–264  ·  view source on GitHub ↗
(output: any)

Source from the content-addressed store, hash-verified

226}
227
228function formatTextVariationOutput(output: any) {
229 // Parse JSON string if needed
230 let parsedOutput = output;
231 if (typeof output === 'string') {
232 try {
233 parsedOutput = JSON.parse(output);
234 } catch (e) {
235 // If parsing fails, return error message
236 return (
237 <div className="text-sm text-red-400">
238 Failed to parse output
239 </div>
240 );
241 }
242 }
243
244 return (
245 <div className="space-y-3">
246 {parsedOutput?.variation && (
247 <div className="space-y-1">
248 <span className="text-sm text-gray-400">Variation:</span>
249 <div className="text-sm text-gray-200 bg-[#1a1a1a] p-3 rounded border border-[#2a2a2a]">
250 {parsedOutput.variation}
251 </div>
252 </div>
253 )}
254 {parsedOutput?.approach && (
255 <div className="space-y-1">
256 <span className="text-sm text-gray-400">Approach:</span>
257 <div className="text-sm text-gray-300 italic">
258 {parsedOutput.approach}
259 </div>
260 </div>
261 )}
262 </div>
263 );
264}
265
266function formatRepoSetupInput(input: any) {
267 return (

Callers 1

renderOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected