MCPcopy
hub / github.com/opentrace/opentrace / pickInlineProp

Function pickInlineProp

ui/src/components/chat/results/NodeListResult.tsx:29–37  ·  view source on GitHub ↗

Pick the most useful property to show inline (skip boring ones)

(props: Record<string, unknown>)

Source from the content-addressed store, hash-verified

27
28/** Pick the most useful property to show inline (skip boring ones) */
29function pickInlineProp(props: Record<string, unknown>): string | null {
30 const skip = new Set(['display_name', 'name', 'id', 'type']);
31 for (const [k, v] of Object.entries(props)) {
32 if (skip.has(k)) continue;
33 const s = String(v);
34 if (s && s !== 'undefined' && s !== 'null') return `${k}: ${s}`;
35 }
36 return null;
37}
38
39/** Compact table-like row layout for node lists */
40export default function NodeListResult({ nodes, onNodeSelect }: Props) {

Callers 1

NodeListResultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected