mirror of https://github.com/kortix-ai/suna.git
Compare commits
4 Commits
c18e674f6a
...
401faee76e
Author | SHA1 | Date |
---|---|---|
|
401faee76e | |
|
f440c41943 | |
|
a81f286739 | |
|
e93c26709b |
|
@ -1,7 +1,7 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import React, { useState, useCallback, useEffect, useRef } from 'react';
|
import React, { useState, useCallback, useEffect, useRef } from 'react';
|
||||||
import { useParams, useRouter } from 'next/navigation';
|
import { useParams, useRouter, useSearchParams } from 'next/navigation';
|
||||||
import { Loader2, Save, Eye } from 'lucide-react';
|
import { Loader2, Save, Eye } from 'lucide-react';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Alert, AlertDescription } from '@/components/ui/alert';
|
import { Alert, AlertDescription } from '@/components/ui/alert';
|
||||||
|
@ -13,7 +13,6 @@ import { toast } from 'sonner';
|
||||||
import { AgentPreview } from '../../../../../components/agents/agent-preview';
|
import { AgentPreview } from '../../../../../components/agents/agent-preview';
|
||||||
|
|
||||||
import { useAgentVersionData } from '../../../../../hooks/use-agent-version-data';
|
import { useAgentVersionData } from '../../../../../hooks/use-agent-version-data';
|
||||||
import { useSearchParams } from 'next/navigation';
|
|
||||||
import { useAgentVersionStore } from '../../../../../lib/stores/agent-version-store';
|
import { useAgentVersionStore } from '../../../../../lib/stores/agent-version-store';
|
||||||
|
|
||||||
import { AgentHeader, VersionAlert, ConfigurationTab } from '@/components/agents/config';
|
import { AgentHeader, VersionAlert, ConfigurationTab } from '@/components/agents/config';
|
||||||
|
@ -24,6 +23,7 @@ import { useAgentConfigTour } from '@/hooks/use-agent-config-tour';
|
||||||
import Joyride, { CallBackProps, STATUS, Step } from 'react-joyride';
|
import Joyride, { CallBackProps, STATUS, Step } from 'react-joyride';
|
||||||
import { TourConfirmationDialog } from '@/components/tour/TourConfirmationDialog';
|
import { TourConfirmationDialog } from '@/components/tour/TourConfirmationDialog';
|
||||||
|
|
||||||
|
// Tour steps for agent configuration
|
||||||
const agentConfigTourSteps: Step[] = [
|
const agentConfigTourSteps: Step[] = [
|
||||||
{
|
{
|
||||||
target: '[data-tour="agent-header"]',
|
target: '[data-tour="agent-header"]',
|
||||||
|
@ -76,20 +76,21 @@ const agentConfigTourSteps: Step[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
target: '[data-tour="triggers-section"]',
|
target: '[data-tour="triggers-section"]',
|
||||||
content: 'Add various triggers to your agent to help it perform tasks and automate workflows.',
|
content: 'Set up automated triggers for your agent to run on schedules or events.',
|
||||||
title: 'Triggers',
|
title: 'Triggers & Automation',
|
||||||
placement: 'right',
|
placement: 'right',
|
||||||
disableBeacon: true,
|
disableBeacon: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
target: '[data-tour="preview-agent"]',
|
target: '[data-tour="preview-agent"]',
|
||||||
content: 'You can also build your agent here, just ask it what you need and watch it self configure.',
|
content: 'Build and test your agent by previewing how it will behave and respond. Here you can also ask the agent to self-configure',
|
||||||
title: 'Build or Test Your Agent',
|
title: 'Build & Test Your Agent',
|
||||||
placement: 'left',
|
placement: 'left',
|
||||||
disableBeacon: true,
|
disableBeacon: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Form data interface
|
||||||
interface FormData {
|
interface FormData {
|
||||||
name: string;
|
name: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
@ -134,8 +135,6 @@ function AgentConfigurationContent() {
|
||||||
const [originalData, setOriginalData] = useState<FormData>(formData);
|
const [originalData, setOriginalData] = useState<FormData>(formData);
|
||||||
const [isPreviewOpen, setIsPreviewOpen] = useState(false);
|
const [isPreviewOpen, setIsPreviewOpen] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!agent) return;
|
if (!agent) return;
|
||||||
let configSource = agent;
|
let configSource = agent;
|
||||||
|
@ -552,38 +551,38 @@ export default function AgentConfigurationPage() {
|
||||||
disableScrollParentFix
|
disableScrollParentFix
|
||||||
styles={{
|
styles={{
|
||||||
options: {
|
options: {
|
||||||
primaryColor: 'hsl(var(--primary))',
|
primaryColor: '#000000',
|
||||||
backgroundColor: 'hsl(var(--background))',
|
backgroundColor: '#ffffff',
|
||||||
textColor: 'hsl(var(--foreground))',
|
textColor: '#000000',
|
||||||
overlayColor: 'rgba(0, 0, 0, 0.7)',
|
overlayColor: 'rgba(0, 0, 0, 0.7)',
|
||||||
arrowColor: 'hsl(var(--background))',
|
arrowColor: '#ffffff',
|
||||||
zIndex: 1000,
|
zIndex: 1000,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
backgroundColor: 'hsl(var(--background))',
|
backgroundColor: '#ffffff',
|
||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
padding: 20,
|
padding: 20,
|
||||||
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px hsl(var(--border))',
|
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15)',
|
||||||
border: '1px solid hsl(var(--border))',
|
border: '1px solid #e5e7eb',
|
||||||
},
|
},
|
||||||
tooltipContainer: {
|
tooltipContainer: {
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
},
|
},
|
||||||
tooltipTitle: {
|
tooltipTitle: {
|
||||||
color: 'hsl(var(--foreground))',
|
color: '#000000',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
},
|
},
|
||||||
tooltipContent: {
|
tooltipContent: {
|
||||||
color: 'hsl(var(--foreground))',
|
color: '#000000',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
lineHeight: 1.5,
|
lineHeight: 1.5,
|
||||||
},
|
},
|
||||||
buttonNext: {
|
buttonNext: {
|
||||||
backgroundColor: 'hsl(var(--primary))',
|
backgroundColor: '#000000',
|
||||||
color: 'hsl(var(--primary-foreground))',
|
color: '#ffffff',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
padding: '8px 16px',
|
padding: '8px 16px',
|
||||||
borderRadius: 6,
|
borderRadius: 6,
|
||||||
|
@ -591,32 +590,30 @@ export default function AgentConfigurationPage() {
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
buttonBack: {
|
buttonBack: {
|
||||||
color: 'hsl(var(--muted-foreground))',
|
color: '#6b7280',
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
padding: '8px 16px',
|
padding: '8px 16px',
|
||||||
border: '1px solid hsl(var(--border))',
|
border: '1px solid #e5e7eb',
|
||||||
borderRadius: 6,
|
borderRadius: 6,
|
||||||
},
|
},
|
||||||
buttonSkip: {
|
buttonSkip: {
|
||||||
color: 'hsl(var(--muted-foreground))',
|
color: '#6b7280',
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
border: 'none',
|
border: 'none',
|
||||||
},
|
},
|
||||||
buttonClose: {
|
buttonClose: {
|
||||||
color: 'hsl(var(--muted-foreground))',
|
color: '#6b7280',
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TourConfirmationDialog
|
<TourConfirmationDialog
|
||||||
open={showWelcome}
|
open={showWelcome}
|
||||||
onAccept={handleWelcomeAccept}
|
onAccept={handleWelcomeAccept}
|
||||||
onDecline={handleWelcomeDecline}
|
onDecline={handleWelcomeDecline}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<AgentConfigurationContent />
|
<AgentConfigurationContent />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
|
@ -363,7 +363,7 @@ export const AgentPreview = ({ agent, agentMetadata }: AgentPreviewProps) => {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<p className='w-[60%] text-2xl mb-3'>Start conversation with <span className='text-primary/80 font-semibold'>{agent.name}</span></p>
|
<p className='w-[60%] text-2xl mb-3'>Start conversation with <span className='text-primary/80 font-semibold'>{agent.name}</span></p>
|
||||||
<p className='w-[70%] text-sm text-muted-foreground/60'>Test your agent's configuration and chat back and forth to see how it performs with your current settings, tools, and knowledge base.</p>
|
<p className='w-[70%] text-sm text-muted-foreground/60'>Build and test your agent by previewing how it will behave and respond. Here you can also ask the agent to self-configure</p>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use client';
|
'use client';
|
||||||
|
|
||||||
import React, { useState, Suspense, useCallback } from 'react';
|
import React, { useState, Suspense, useCallback, useEffect } from 'react';
|
||||||
import { Skeleton } from '@/components/ui/skeleton';
|
import { Skeleton } from '@/components/ui/skeleton';
|
||||||
import { useRouter, useSearchParams } from 'next/navigation';
|
import { useRouter, useSearchParams } from 'next/navigation';
|
||||||
import Joyride, { CallBackProps, STATUS, Step } from 'react-joyride';
|
import Joyride, { CallBackProps, STATUS, Step } from 'react-joyride';
|
||||||
|
@ -34,6 +34,7 @@ import { toast } from 'sonner';
|
||||||
import { ReleaseBadge } from '../auth/release-badge';
|
import { ReleaseBadge } from '../auth/release-badge';
|
||||||
import { useDashboardTour } from '@/hooks/use-dashboard-tour';
|
import { useDashboardTour } from '@/hooks/use-dashboard-tour';
|
||||||
import { TourConfirmationDialog } from '@/components/tour/TourConfirmationDialog';
|
import { TourConfirmationDialog } from '@/components/tour/TourConfirmationDialog';
|
||||||
|
import { Calendar, MessageSquare, Plus, Sparkles, Zap } from 'lucide-react';
|
||||||
|
|
||||||
const PENDING_PROMPT_KEY = 'pendingAgentPrompt';
|
const PENDING_PROMPT_KEY = 'pendingAgentPrompt';
|
||||||
|
|
||||||
|
@ -266,38 +267,35 @@ export function DashboardContent() {
|
||||||
disableScrollParentFix
|
disableScrollParentFix
|
||||||
styles={{
|
styles={{
|
||||||
options: {
|
options: {
|
||||||
primaryColor: 'hsl(var(--primary))',
|
primaryColor: '#000000',
|
||||||
backgroundColor: 'hsl(var(--background))',
|
backgroundColor: '#ffffff',
|
||||||
textColor: 'hsl(var(--foreground))',
|
textColor: '#000000',
|
||||||
overlayColor: 'rgba(0, 0, 0, 0.7)',
|
overlayColor: 'rgba(0, 0, 0, 0.7)',
|
||||||
arrowColor: 'hsl(var(--background))',
|
arrowColor: '#ffffff',
|
||||||
zIndex: 1000,
|
zIndex: 1000,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
backgroundColor: 'hsl(var(--background))',
|
backgroundColor: '#ffffff',
|
||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
padding: 20,
|
padding: 20,
|
||||||
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px hsl(var(--border))',
|
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.15)',
|
||||||
border: '1px solid hsl(var(--border))',
|
border: '1px solid #e5e7eb',
|
||||||
},
|
|
||||||
tooltipContainer: {
|
|
||||||
textAlign: 'left',
|
|
||||||
},
|
},
|
||||||
tooltipTitle: {
|
tooltipTitle: {
|
||||||
color: 'hsl(var(--foreground))',
|
color: '#000000',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
marginBottom: 8,
|
marginBottom: 8,
|
||||||
},
|
},
|
||||||
tooltipContent: {
|
tooltipContent: {
|
||||||
color: 'hsl(var(--foreground))',
|
color: '#000000',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
lineHeight: 1.5,
|
lineHeight: 1.5,
|
||||||
},
|
},
|
||||||
buttonNext: {
|
buttonNext: {
|
||||||
backgroundColor: 'hsl(var(--primary))',
|
backgroundColor: '#000000',
|
||||||
color: 'hsl(var(--primary-foreground))',
|
color: '#ffffff',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
padding: '8px 16px',
|
padding: '8px 16px',
|
||||||
borderRadius: 6,
|
borderRadius: 6,
|
||||||
|
@ -305,21 +303,21 @@ export function DashboardContent() {
|
||||||
fontWeight: 500,
|
fontWeight: 500,
|
||||||
},
|
},
|
||||||
buttonBack: {
|
buttonBack: {
|
||||||
color: 'hsl(var(--muted-foreground))',
|
color: '#6b7280',
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
padding: '8px 16px',
|
padding: '8px 16px',
|
||||||
border: '1px solid hsl(var(--border))',
|
border: '1px solid #e5e7eb',
|
||||||
borderRadius: 6,
|
borderRadius: 6,
|
||||||
},
|
},
|
||||||
buttonSkip: {
|
buttonSkip: {
|
||||||
color: 'hsl(var(--muted-foreground))',
|
color: '#6b7280',
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
border: 'none',
|
border: 'none',
|
||||||
},
|
},
|
||||||
buttonClose: {
|
buttonClose: {
|
||||||
color: 'hsl(var(--muted-foreground))',
|
color: '#6b7280',
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in New Issue