Delete secret
-Edit secret
+Delete secret
+What evidence do you want to collect?
- onInputChange(e.target.value)} + onChange={(e) => { + onInputChange(e); + // Auto-resize + e.target.style.height = 'auto'; + e.target.style.height = `${e.target.scrollHeight}px`; + }} + onKeyDown={(e) => { + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); + onSubmit(); + // Reset height after submit + if (e.currentTarget) { + e.currentTarget.style.height = 'auto'; + } + } + }} disabled={status === 'streaming' || status === 'submitted'} + rows={1} + style={{ height: 'auto' }} />
+ {code}
+
+ );
+ }
+ return {part};
+ });
+ };
+
+ // Parse pass/fail conditions
+ const parseConditions = (text: string) => {
+ const lowerText = text.toLowerCase();
+ const hasPassCondition = lowerText.includes('pass') && lowerText.includes('if');
+ const hasFailCondition = lowerText.includes('fail') && lowerText.includes('if');
+
+ if (hasPassCondition || hasFailCondition) {
+ return { formatted: formatCriteriaText(text), hasStructure: true };
+ }
+ return { formatted: formatCriteriaText(text), hasStructure: false };
+ };
+
+ const { formatted, hasStructure } = criteria
+ ? parseConditions(criteria)
+ : { formatted: null, hasStructure: false };
+
+ return (
+ {formatted}
++ No success criteria defined yet. Click{' '} + Edit criteria to add one. +
+ )} ++ {testState.type === 'execution-error' + ? 'The automation encountered an error during execution.' + : testState.type === 'fail' + ? 'The automation ran but did not meet success criteria.' + : testState.type === 'pass' + ? 'The automation ran and met all success criteria.' + : 'The automation executed without errors.'} +
- {result.status === 'success' - ? 'Your automation ran successfully without any errors.' - : 'There was an issue running your automation. Please check the output and logs below to understand what went wrong.'} -
-Error Details
+{result.error}
- {result.status === 'success' - ? 'View the output to see the results.' - : 'Check the output and logs below to understand what went wrong.'} -
- - {/* Quick Actions */} -
- {result.data !== undefined && result.data !== null
- ? JSON.stringify(result.data, null, 2)
- : result.status === 'success'
- ? '// No output returned'
- : '// Execution failed'}
-
- )}
+ {/* Section Content - Grid for smooth height transitions */}
+ + Criteria +
++ {evaluationCriteria} +
++ Reasoning +
++ {result.evaluationReason} +
+
- {result.logs.join('\n')}
-
+ {/* AI Fix Button */}
+ {testState.type === 'execution-error' && !activeSection && (
+ Name
-{automation.name}
-Description
-- {automation.description || ( - No description - )} -
+ {editingDescription ? ( +Created
@@ -225,22 +286,9 @@ export function AutomationOverview({Evaluation
++ {run.evaluationReason} +
+{automation.name}