| 64 | } |
| 65 | |
| 66 | function formatExperimentCreationInput(input: any) { |
| 67 | return ( |
| 68 | <div className="space-y-2"> |
| 69 | {input?.name && ( |
| 70 | <div className="flex items-start gap-2"> |
| 71 | <span className="text-sm text-gray-400 min-w-[120px]">Name:</span> |
| 72 | <span className="text-sm text-gray-200">{input.name}</span> |
| 73 | </div> |
| 74 | )} |
| 75 | {input?.description && ( |
| 76 | <div className="flex items-start gap-2"> |
| 77 | <span className="text-sm text-gray-400 min-w-[120px]">Description:</span> |
| 78 | <span className="text-sm text-gray-200">{input.description}</span> |
| 79 | </div> |
| 80 | )} |
| 81 | {input?.featureFlagKey && ( |
| 82 | <div className="flex items-start gap-2"> |
| 83 | <span className="text-sm text-gray-400 min-w-[120px]">Feature Flag:</span> |
| 84 | <code className="text-sm text-gray-200 bg-[#1a1a1a] px-2 py-0.5 rounded"> |
| 85 | {input.featureFlagKey} |
| 86 | </code> |
| 87 | </div> |
| 88 | )} |
| 89 | {input?.projectId && ( |
| 90 | <div className="flex items-start gap-2"> |
| 91 | <span className="text-sm text-gray-400 min-w-[120px]">Project ID:</span> |
| 92 | <span className="text-sm text-gray-200">{input.projectId}</span> |
| 93 | </div> |
| 94 | )} |
| 95 | {!input || Object.keys(input).length === 0 && ( |
| 96 | <div className="text-sm text-gray-400">Creating experiment...</div> |
| 97 | )} |
| 98 | </div> |
| 99 | ); |
| 100 | } |
| 101 | |
| 102 | function formatExperimentCreationOutput(output: any) { |
| 103 | return ( |