feat: connect FlowPilot to Script Builder with handoff action
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -167,8 +167,26 @@ export function FlowPilotStepCard({ step, isCurrentStep, isProcessing, sessionId
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Script Builder handoff */}
|
||||
{!isResolutionSuggestion && step.step_type === 'action' && (content.action_type as string) === 'open_script_builder' && (
|
||||
<button
|
||||
onClick={() => {
|
||||
sessionStorage.setItem('scriptBuilderContext', JSON.stringify({
|
||||
from_session: sessionId,
|
||||
prompt: (content.script_prompt as string) || '',
|
||||
language: (content.script_language as string) || 'powershell',
|
||||
}))
|
||||
window.open('/script-builder?from=flowpilot', '_blank')
|
||||
onRespond({ action_result: { success: true, details: 'Opened Script Builder' } })
|
||||
}}
|
||||
className="flex-1 min-h-[44px] rounded-lg bg-gradient-brand px-4 py-2.5 text-sm font-semibold text-[#101114] hover:opacity-90 active:scale-[0.97] transition-all"
|
||||
>
|
||||
Open Script Builder
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* Action step buttons */}
|
||||
{!isResolutionSuggestion && step.step_type === 'action' && (content.action_type as string) !== 'script_generation' && (
|
||||
{!isResolutionSuggestion && step.step_type === 'action' && (content.action_type as string) !== 'script_generation' && (content.action_type as string) !== 'open_script_builder' && (
|
||||
<div className="flex flex-col gap-2 sm:flex-row">
|
||||
<button
|
||||
onClick={() => handleActionComplete(true)}
|
||||
|
||||
Reference in New Issue
Block a user