@agent-relay/dashboard 2.0.80 → 2.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/404.html +1 -1
- package/out/_next/static/chunks/{118-4c8241b0218335de.js → 118-ae2b650136a5a5fc.js} +1 -1
- package/out/_next/static/chunks/407-0c82986cf79c8ecb.js +1 -0
- package/out/_next/static/chunks/app/app/[[...slug]]/{page-1e81c047cff17212.js → page-f7eca1b66fb4249b.js} +1 -1
- package/out/_next/static/chunks/app/{page-6892fe2dd07fb48b.js → page-0ee604f7070d14c0.js} +1 -1
- package/out/_next/static/css/8968d98ed4c4d33f.css +1 -0
- package/out/about.html +2 -2
- package/out/about.txt +1 -1
- package/out/app/onboarding.html +1 -1
- package/out/app/onboarding.txt +1 -1
- package/out/app.html +1 -1
- package/out/app.txt +2 -2
- package/out/blog/go-to-bed-wake-up-to-a-finished-product.html +2 -2
- package/out/blog/go-to-bed-wake-up-to-a-finished-product.txt +1 -1
- package/out/blog/let-them-cook-multi-agent-orchestration.html +2 -2
- package/out/blog/let-them-cook-multi-agent-orchestration.txt +2 -2
- package/out/blog.html +2 -2
- package/out/blog.txt +1 -1
- package/out/careers.html +2 -2
- package/out/careers.txt +1 -1
- package/out/changelog.html +2 -2
- package/out/changelog.txt +1 -1
- package/out/cloud/link.html +1 -1
- package/out/cloud/link.txt +2 -2
- package/out/complete-profile.html +2 -2
- package/out/complete-profile.txt +1 -1
- package/out/connect-repos.html +1 -1
- package/out/connect-repos.txt +1 -1
- package/out/contact.html +2 -2
- package/out/contact.txt +1 -1
- package/out/docs.html +2 -2
- package/out/docs.txt +1 -1
- package/out/history.html +1 -1
- package/out/history.txt +2 -2
- package/out/index.html +1 -1
- package/out/index.txt +2 -2
- package/out/login.html +2 -2
- package/out/login.txt +1 -1
- package/out/metrics.html +1 -1
- package/out/metrics.txt +2 -2
- package/out/pricing.html +2 -2
- package/out/pricing.txt +1 -1
- package/out/privacy.html +2 -2
- package/out/privacy.txt +1 -1
- package/out/providers/setup/claude.html +1 -1
- package/out/providers/setup/claude.txt +1 -1
- package/out/providers/setup/codex.html +1 -1
- package/out/providers/setup/codex.txt +1 -1
- package/out/providers/setup/cursor.html +1 -1
- package/out/providers/setup/cursor.txt +1 -1
- package/out/providers.html +1 -1
- package/out/providers.txt +1 -1
- package/out/security.html +2 -2
- package/out/security.txt +1 -1
- package/out/signup.html +2 -2
- package/out/signup.txt +1 -1
- package/out/terms.html +2 -2
- package/out/terms.txt +1 -1
- package/package.json +7 -1
- package/src/app/about/page.tsx +7 -0
- package/src/app/app/[[...slug]]/DashboardPageClient.tsx +853 -0
- package/src/app/app/[[...slug]]/page.tsx +23 -0
- package/src/app/app/onboarding/page.tsx +394 -0
- package/src/app/apple-icon.png +0 -0
- package/src/app/blog/go-to-bed-wake-up-to-a-finished-product/page.tsx +88 -0
- package/src/app/blog/let-them-cook-multi-agent-orchestration/page.tsx +93 -0
- package/src/app/blog/page.tsx +15 -0
- package/src/app/careers/page.tsx +7 -0
- package/src/app/changelog/page.tsx +7 -0
- package/src/app/cloud/link/page.tsx +464 -0
- package/src/app/complete-profile/page.tsx +204 -0
- package/src/app/connect-repos/page.tsx +410 -0
- package/src/app/contact/page.tsx +7 -0
- package/src/app/docs/page.tsx +7 -0
- package/src/app/favicon.png +0 -0
- package/src/app/globals.css +200 -0
- package/src/app/history/page.tsx +658 -0
- package/src/app/layout.tsx +25 -0
- package/src/app/login/page.tsx +424 -0
- package/src/app/metrics/page.tsx +781 -0
- package/src/app/page.tsx +59 -0
- package/src/app/pricing/page.tsx +7 -0
- package/src/app/privacy/page.tsx +7 -0
- package/src/app/providers/page.tsx +193 -0
- package/src/app/providers/setup/[provider]/ProviderSetupClient.tsx +197 -0
- package/src/app/providers/setup/[provider]/constants.ts +35 -0
- package/src/app/providers/setup/[provider]/page.tsx +42 -0
- package/src/app/security/page.tsx +7 -0
- package/src/app/signup/page.tsx +533 -0
- package/src/app/terms/page.tsx +7 -0
- package/src/components/ActivityFeed.tsx +216 -0
- package/src/components/AddWorkspaceModal.tsx +170 -0
- package/src/components/AgentCard.test.tsx +134 -0
- package/src/components/AgentCard.tsx +585 -0
- package/src/components/AgentList.test.tsx +147 -0
- package/src/components/AgentList.tsx +419 -0
- package/src/components/AgentLogPreview.tsx +173 -0
- package/src/components/AgentProfilePanel.tsx +569 -0
- package/src/components/App.tsx +3424 -0
- package/src/components/BillingPanel.tsx +922 -0
- package/src/components/BillingResult.tsx +447 -0
- package/src/components/BroadcastComposer.tsx +690 -0
- package/src/components/ChannelAdminPanel.tsx +773 -0
- package/src/components/ChannelBrowser.tsx +385 -0
- package/src/components/ChannelChat.tsx +261 -0
- package/src/components/ChannelSidebar.tsx +399 -0
- package/src/components/CloudSessionProvider.tsx +130 -0
- package/src/components/CommandPalette.tsx +815 -0
- package/src/components/ConfirmationDialog.tsx +133 -0
- package/src/components/ConversationHistory.tsx +518 -0
- package/src/components/CoordinatorPanel.tsx +956 -0
- package/src/components/DecisionQueue.tsx +717 -0
- package/src/components/DirectMessageView.tsx +164 -0
- package/src/components/FileAutocomplete.tsx +368 -0
- package/src/components/FleetOverview.tsx +278 -0
- package/src/components/LogViewer.tsx +310 -0
- package/src/components/LogViewerPanel.tsx +482 -0
- package/src/components/Logo.tsx +284 -0
- package/src/components/MentionAutocomplete.tsx +384 -0
- package/src/components/MessageComposer.tsx +473 -0
- package/src/components/MessageList.tsx +725 -0
- package/src/components/MessageSenderName.tsx +91 -0
- package/src/components/MessageStatusIndicator.tsx +142 -0
- package/src/components/NewConversationModal.tsx +400 -0
- package/src/components/NotificationToast.tsx +488 -0
- package/src/components/OnlineUsersIndicator.tsx +164 -0
- package/src/components/Pagination.tsx +124 -0
- package/src/components/PricingPlans.tsx +386 -0
- package/src/components/ProjectList.tsx +711 -0
- package/src/components/ProviderAuthFlow.tsx +343 -0
- package/src/components/ProviderConnectionList.tsx +375 -0
- package/src/components/ProvisioningProgress.tsx +730 -0
- package/src/components/ReactionChips.tsx +70 -0
- package/src/components/ReactionPicker.tsx +121 -0
- package/src/components/RepoAccessPanel.tsx +787 -0
- package/src/components/RepositoriesPanel.tsx +901 -0
- package/src/components/ServerCard.tsx +202 -0
- package/src/components/SessionExpiredModal.tsx +128 -0
- package/src/components/SpawnModal.test.tsx +190 -0
- package/src/components/SpawnModal.tsx +1001 -0
- package/src/components/TaskAssignmentUI.tsx +375 -0
- package/src/components/TerminalProviderSetup.tsx +517 -0
- package/src/components/ThemeProvider.tsx +159 -0
- package/src/components/ThinkingIndicator.tsx +231 -0
- package/src/components/ThreadList.tsx +198 -0
- package/src/components/ThreadPanel.tsx +405 -0
- package/src/components/TrajectoryViewer.tsx +698 -0
- package/src/components/TypingIndicator.tsx +69 -0
- package/src/components/UsageBanner.tsx +231 -0
- package/src/components/UserProfilePanel.tsx +233 -0
- package/src/components/WorkspaceContext.tsx +95 -0
- package/src/components/WorkspaceSelector.tsx +234 -0
- package/src/components/WorkspaceStatusIndicator.tsx +396 -0
- package/src/components/XTermInteractive.tsx +516 -0
- package/src/components/XTermLogViewer.tsx +719 -0
- package/src/components/channels/ChannelDialogs.tsx +1411 -0
- package/src/components/channels/ChannelHeader.tsx +317 -0
- package/src/components/channels/ChannelMessageList.tsx +463 -0
- package/src/components/channels/ChannelViewV1.tsx +146 -0
- package/src/components/channels/MessageInput.tsx +302 -0
- package/src/components/channels/SearchInput.tsx +172 -0
- package/src/components/channels/SearchResults.tsx +336 -0
- package/src/components/channels/api.test.ts +1527 -0
- package/src/components/channels/api.ts +703 -0
- package/src/components/channels/index.ts +76 -0
- package/src/components/channels/mockApi.ts +344 -0
- package/src/components/channels/types.ts +566 -0
- package/src/components/hooks/index.ts +58 -0
- package/src/components/hooks/useAgentLogs.ts +504 -0
- package/src/components/hooks/useAgents.ts +127 -0
- package/src/components/hooks/useBroadcastDedup.test.ts +371 -0
- package/src/components/hooks/useBroadcastDedup.ts +86 -0
- package/src/components/hooks/useChannelAdmin.ts +329 -0
- package/src/components/hooks/useChannelBrowser.ts +239 -0
- package/src/components/hooks/useChannelCommands.ts +138 -0
- package/src/components/hooks/useChannels.ts +367 -0
- package/src/components/hooks/useDebounce.ts +29 -0
- package/src/components/hooks/useDirectMessage.test.ts +952 -0
- package/src/components/hooks/useDirectMessage.ts +141 -0
- package/src/components/hooks/useMessages.ts +310 -0
- package/src/components/hooks/useOrchestrator.test.ts +165 -0
- package/src/components/hooks/useOrchestrator.ts +424 -0
- package/src/components/hooks/usePinnedAgents.test.ts +356 -0
- package/src/components/hooks/usePinnedAgents.ts +140 -0
- package/src/components/hooks/usePresence.test.ts +245 -0
- package/src/components/hooks/usePresence.ts +377 -0
- package/src/components/hooks/useRecentRepos.ts +130 -0
- package/src/components/hooks/useSession.ts +209 -0
- package/src/components/hooks/useThread.ts +138 -0
- package/src/components/hooks/useTrajectory.ts +265 -0
- package/src/components/hooks/useWebSocket.ts +290 -0
- package/src/components/hooks/useWorkspaceMembers.ts +132 -0
- package/src/components/hooks/useWorkspaceRepos.ts +73 -0
- package/src/components/hooks/useWorkspaceStatus.ts +237 -0
- package/src/components/index.ts +81 -0
- package/src/components/layout/Header.tsx +311 -0
- package/src/components/layout/RepoContextHeader.tsx +361 -0
- package/src/components/layout/Sidebar.archive.test.tsx +126 -0
- package/src/components/layout/Sidebar.test.tsx +691 -0
- package/src/components/layout/Sidebar.tsx +900 -0
- package/src/components/layout/index.ts +7 -0
- package/src/components/settings/BillingSettingsPanel.tsx +564 -0
- package/src/components/settings/SettingsPage.tsx +683 -0
- package/src/components/settings/TeamSettingsPanel.tsx +560 -0
- package/src/components/settings/WorkspaceSettingsPanel.tsx +1368 -0
- package/src/components/settings/index.ts +11 -0
- package/src/components/settings/types.ts +79 -0
- package/src/components/utils/messageFormatting.test.tsx +331 -0
- package/src/components/utils/messageFormatting.tsx +597 -0
- package/src/index.ts +63 -0
- package/src/landing/AboutPage.tsx +77 -0
- package/src/landing/BlogContent.tsx +187 -0
- package/src/landing/BlogPage.tsx +47 -0
- package/src/landing/CareersPage.tsx +53 -0
- package/src/landing/ChangelogPage.tsx +33 -0
- package/src/landing/ContactPage.tsx +41 -0
- package/src/landing/DocsPage.tsx +43 -0
- package/src/landing/LandingPage.tsx +702 -0
- package/src/landing/PricingPage.tsx +549 -0
- package/src/landing/PrivacyPage.tsx +117 -0
- package/src/landing/SecurityPage.tsx +42 -0
- package/src/landing/StaticPage.tsx +165 -0
- package/src/landing/TermsPage.tsx +125 -0
- package/src/landing/blogData.ts +312 -0
- package/src/landing/index.ts +18 -0
- package/src/landing/styles.css +3673 -0
- package/src/lib/agent-merge.test.ts +43 -0
- package/src/lib/agent-merge.ts +35 -0
- package/src/lib/api.ts +1294 -0
- package/src/lib/cloudApi.ts +893 -0
- package/src/lib/colors.test.ts +175 -0
- package/src/lib/colors.ts +218 -0
- package/src/lib/config.ts +109 -0
- package/src/lib/hierarchy.ts +242 -0
- package/src/lib/stuckDetection.ts +142 -0
- package/src/lib/useUrlRouting.ts +190 -0
- package/src/types/index.ts +317 -0
- package/src/types/threading.ts +7 -0
- package/out/_next/static/chunks/285-dc644487a8d6500d.js +0 -1
- package/out/_next/static/css/4c58d9cf493aa626.css +0 -1
- /package/out/_next/static/{AqelRhy1vr2nBUcU0Iqcp → IxfA6RZu4trcsEMYlkQra}/_buildManifest.js +0 -0
- /package/out/_next/static/{AqelRhy1vr2nBUcU0Iqcp → IxfA6RZu4trcsEMYlkQra}/_ssgManifest.js +0 -0
- /package/out/_next/static/chunks/{528-d375bc8b46912d2c.js → 528-f5f676996d613c25.js} +0 -0
- /package/out/_next/static/chunks/app/blog/let-them-cook-multi-agent-orchestration/{page-a58308f43557b908.js → page-b194f207fbd91862.js} +0 -0
|
@@ -0,0 +1,698 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TrajectoryViewer Component
|
|
3
|
+
*
|
|
4
|
+
* Displays an agent's action history as a refined timeline,
|
|
5
|
+
* with a distinctive futuristic aesthetic emphasizing clarity and flow.
|
|
6
|
+
* Uses Tailwind CSS with Mission Control theme.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import React, { useState, useMemo, useEffect } from 'react';
|
|
10
|
+
|
|
11
|
+
export interface TrajectoryStep {
|
|
12
|
+
id: string;
|
|
13
|
+
timestamp: string | number;
|
|
14
|
+
type: 'tool_call' | 'decision' | 'message' | 'state_change' | 'error' | 'phase_transition';
|
|
15
|
+
phase?: 'plan' | 'design' | 'execute' | 'review' | 'observe';
|
|
16
|
+
title: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
metadata?: Record<string, unknown>;
|
|
19
|
+
duration?: number;
|
|
20
|
+
status?: 'pending' | 'running' | 'success' | 'error';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface TrajectoryHistoryEntry {
|
|
24
|
+
id: string;
|
|
25
|
+
title: string;
|
|
26
|
+
status: 'active' | 'completed' | 'abandoned';
|
|
27
|
+
startedAt: string;
|
|
28
|
+
completedAt?: string;
|
|
29
|
+
agents?: string[];
|
|
30
|
+
summary?: string;
|
|
31
|
+
confidence?: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface TrajectoryViewerProps {
|
|
35
|
+
agentName: string;
|
|
36
|
+
steps: TrajectoryStep[];
|
|
37
|
+
history?: TrajectoryHistoryEntry[];
|
|
38
|
+
selectedTrajectoryId?: string | null;
|
|
39
|
+
onSelectTrajectory?: (id: string | null) => void;
|
|
40
|
+
isLoading?: boolean;
|
|
41
|
+
onStepClick?: (step: TrajectoryStep) => void;
|
|
42
|
+
compact?: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function TrajectoryViewer({
|
|
46
|
+
agentName,
|
|
47
|
+
steps,
|
|
48
|
+
history = [],
|
|
49
|
+
selectedTrajectoryId,
|
|
50
|
+
onSelectTrajectory,
|
|
51
|
+
isLoading = false,
|
|
52
|
+
onStepClick,
|
|
53
|
+
compact = false,
|
|
54
|
+
}: TrajectoryViewerProps) {
|
|
55
|
+
const [expandedSteps, setExpandedSteps] = useState<Set<string>>(new Set());
|
|
56
|
+
const [filter, setFilter] = useState<TrajectoryStep['type'] | 'all'>('all');
|
|
57
|
+
const [searchQuery, setSearchQuery] = useState('');
|
|
58
|
+
// Show history list when no trajectory is selected, allowing users to browse all trajectories
|
|
59
|
+
// When a trajectory is selected, show its steps instead
|
|
60
|
+
const isHistoryView = selectedTrajectoryId === null && history.length > 0;
|
|
61
|
+
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
setFilter('all');
|
|
64
|
+
}, [selectedTrajectoryId]);
|
|
65
|
+
|
|
66
|
+
// Filter steps
|
|
67
|
+
const filteredSteps = useMemo(() => {
|
|
68
|
+
if (filter === 'all') return steps;
|
|
69
|
+
return steps.filter((s) => s.type === filter);
|
|
70
|
+
}, [steps, filter]);
|
|
71
|
+
|
|
72
|
+
const filteredHistory = useMemo(() => {
|
|
73
|
+
const query = searchQuery.trim().toLowerCase();
|
|
74
|
+
if (!query) return history;
|
|
75
|
+
|
|
76
|
+
return history.filter((entry) => {
|
|
77
|
+
const inTitle = entry.title?.toLowerCase().includes(query);
|
|
78
|
+
const inSummary = entry.summary?.toLowerCase().includes(query);
|
|
79
|
+
const inAgents = entry.agents?.some((agent) => agent.toLowerCase().includes(query));
|
|
80
|
+
const inStatus = entry.status?.toLowerCase().includes(query);
|
|
81
|
+
const inId = entry.id?.toLowerCase().includes(query);
|
|
82
|
+
return inTitle || inSummary || inAgents || inStatus || inId;
|
|
83
|
+
});
|
|
84
|
+
}, [history, searchQuery]);
|
|
85
|
+
|
|
86
|
+
// Toggle step expansion
|
|
87
|
+
const toggleStep = (stepId: string) => {
|
|
88
|
+
setExpandedSteps((prev) => {
|
|
89
|
+
const next = new Set(prev);
|
|
90
|
+
if (next.has(stepId)) {
|
|
91
|
+
next.delete(stepId);
|
|
92
|
+
} else {
|
|
93
|
+
next.add(stepId);
|
|
94
|
+
}
|
|
95
|
+
return next;
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const typeFilters: { value: TrajectoryStep['type'] | 'all'; label: string; icon: React.ReactNode }[] = [
|
|
100
|
+
{ value: 'all', label: 'All', icon: <FilterAllIcon /> },
|
|
101
|
+
{ value: 'tool_call', label: 'Tools', icon: <ToolIcon /> },
|
|
102
|
+
{ value: 'decision', label: 'Decisions', icon: <DecisionIcon /> },
|
|
103
|
+
{ value: 'message', label: 'Messages', icon: <MessageIcon /> },
|
|
104
|
+
{ value: 'state_change', label: 'State', icon: <StateIcon /> },
|
|
105
|
+
{ value: 'phase_transition', label: 'Phases', icon: <PhaseIcon /> },
|
|
106
|
+
{ value: 'error', label: 'Errors', icon: <ErrorIcon /> },
|
|
107
|
+
];
|
|
108
|
+
|
|
109
|
+
// Calculate phase distribution for the mini progress bar
|
|
110
|
+
const phaseStats = useMemo(() => {
|
|
111
|
+
const phases = steps.filter(s => s.phase).reduce((acc, s) => {
|
|
112
|
+
if (s.phase) acc[s.phase] = (acc[s.phase] || 0) + 1;
|
|
113
|
+
return acc;
|
|
114
|
+
}, {} as Record<string, number>);
|
|
115
|
+
const total = Object.values(phases).reduce((a, b) => a + b, 0);
|
|
116
|
+
return { phases, total };
|
|
117
|
+
}, [steps]);
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<div className="h-full flex flex-col bg-gradient-to-b from-bg-card to-bg-tertiary rounded-xl border border-border/50 overflow-hidden shadow-lg backdrop-blur-sm">
|
|
121
|
+
{/* Header with gradient accent line */}
|
|
122
|
+
<div className="relative">
|
|
123
|
+
<div className="absolute top-0 left-0 right-0 h-[2px] bg-gradient-to-r from-blue-500 via-accent-cyan to-blue-500 opacity-60" />
|
|
124
|
+
|
|
125
|
+
<div className="flex items-center justify-between px-5 py-4 border-b border-border/30">
|
|
126
|
+
<div className="flex items-center gap-3">
|
|
127
|
+
{/* Back button when viewing a specific trajectory */}
|
|
128
|
+
{selectedTrajectoryId && onSelectTrajectory && (
|
|
129
|
+
<button
|
|
130
|
+
onClick={() => onSelectTrajectory(null)}
|
|
131
|
+
className="flex items-center gap-1.5 px-2 py-1.5 text-[11px] font-medium text-text-muted hover:text-accent-cyan bg-bg-elevated/50 hover:bg-bg-elevated rounded-lg border border-border/30 hover:border-accent-cyan/30 transition-all duration-200"
|
|
132
|
+
title="Back to trajectory list"
|
|
133
|
+
>
|
|
134
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
|
|
135
|
+
<path d="M19 12H5M12 19l-7-7 7-7" strokeLinecap="round" strokeLinejoin="round" />
|
|
136
|
+
</svg>
|
|
137
|
+
<span>List</span>
|
|
138
|
+
</button>
|
|
139
|
+
)}
|
|
140
|
+
<div className="relative">
|
|
141
|
+
<div className="w-9 h-9 rounded-lg bg-gradient-to-br from-blue-500/20 to-accent-cyan/20 flex items-center justify-center border border-blue-500/30">
|
|
142
|
+
<TrajectoryHeaderIcon />
|
|
143
|
+
</div>
|
|
144
|
+
{steps.some(s => s.status === 'running') && (
|
|
145
|
+
<span className="absolute -top-1 -right-1 w-3 h-3 bg-accent-cyan rounded-full animate-pulse shadow-[0_0_8px_rgba(0,217,255,0.6)]" />
|
|
146
|
+
)}
|
|
147
|
+
</div>
|
|
148
|
+
<div className="flex flex-col">
|
|
149
|
+
<span className="font-semibold text-sm text-text-primary tracking-wide">Trajectory</span>
|
|
150
|
+
<div className="flex items-center gap-2">
|
|
151
|
+
<span className="text-[11px] text-text-muted font-mono">
|
|
152
|
+
{steps.length} {steps.length === 1 ? 'step' : 'steps'}
|
|
153
|
+
</span>
|
|
154
|
+
{agentName && (
|
|
155
|
+
<>
|
|
156
|
+
<span className="text-text-dim">|</span>
|
|
157
|
+
<span className="text-[11px] text-accent-cyan/80 font-medium truncate max-w-[120px]">{agentName}</span>
|
|
158
|
+
</>
|
|
159
|
+
)}
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
{/* Mini phase progress indicator */}
|
|
165
|
+
{phaseStats.total > 0 && !compact && (
|
|
166
|
+
<div className="flex items-center gap-1.5">
|
|
167
|
+
{(['plan', 'design', 'execute', 'review', 'observe'] as const).map(phase => {
|
|
168
|
+
const count = phaseStats.phases[phase] || 0;
|
|
169
|
+
const color = getPhaseColor(phase);
|
|
170
|
+
return count > 0 ? (
|
|
171
|
+
<div
|
|
172
|
+
key={phase}
|
|
173
|
+
className="h-1.5 rounded-full transition-all duration-300"
|
|
174
|
+
style={{
|
|
175
|
+
width: `${Math.max(8, (count / phaseStats.total) * 48)}px`,
|
|
176
|
+
backgroundColor: color || 'var(--color-border)',
|
|
177
|
+
}}
|
|
178
|
+
title={`${phase}: ${count}`}
|
|
179
|
+
/>
|
|
180
|
+
) : null;
|
|
181
|
+
})}
|
|
182
|
+
</div>
|
|
183
|
+
)}
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
{/* Filter tabs */}
|
|
187
|
+
{!compact && !isHistoryView && (
|
|
188
|
+
<div className="flex items-center gap-1 px-4 py-2 bg-bg-elevated/50 border-b border-border/20 overflow-x-auto scrollbar-thin">
|
|
189
|
+
{typeFilters.map((f) => (
|
|
190
|
+
<button
|
|
191
|
+
key={f.value}
|
|
192
|
+
className={`flex items-center gap-1.5 px-3 py-1.5 text-[11px] font-medium rounded-lg transition-all duration-200 whitespace-nowrap ${
|
|
193
|
+
filter === f.value
|
|
194
|
+
? 'bg-blue-500/20 text-blue-500 border border-blue-500/30 shadow-[0_0_12px_rgba(59,130,246,0.15)]'
|
|
195
|
+
: 'text-text-muted hover:text-text-secondary hover:bg-bg-hover/50'
|
|
196
|
+
}`}
|
|
197
|
+
onClick={() => setFilter(f.value)}
|
|
198
|
+
>
|
|
199
|
+
<span className="opacity-70">{f.icon}</span>
|
|
200
|
+
{f.label}
|
|
201
|
+
</button>
|
|
202
|
+
))}
|
|
203
|
+
</div>
|
|
204
|
+
)}
|
|
205
|
+
</div>
|
|
206
|
+
|
|
207
|
+
{/* Timeline */}
|
|
208
|
+
<div className="flex-1 min-h-0 overflow-y-auto px-4 py-3 scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent">
|
|
209
|
+
{isLoading ? (
|
|
210
|
+
<div className="flex flex-col items-center justify-center gap-4 py-12 text-text-muted">
|
|
211
|
+
<div className="relative">
|
|
212
|
+
<Spinner />
|
|
213
|
+
<div className="absolute inset-0 bg-accent-cyan/10 rounded-full blur-xl" />
|
|
214
|
+
</div>
|
|
215
|
+
<span className="text-sm font-medium">Loading trajectory...</span>
|
|
216
|
+
</div>
|
|
217
|
+
) : isHistoryView ? (
|
|
218
|
+
/* Show trajectory history list - allows browsing all trajectories */
|
|
219
|
+
<div className="flex flex-col gap-2">
|
|
220
|
+
<div className="flex items-center justify-between gap-3 px-2">
|
|
221
|
+
<span className="text-xs font-medium text-text-secondary uppercase tracking-wider">All Trajectories</span>
|
|
222
|
+
<input
|
|
223
|
+
type="search"
|
|
224
|
+
value={searchQuery}
|
|
225
|
+
onChange={(event) => setSearchQuery(event.target.value)}
|
|
226
|
+
placeholder="Search trajectories..."
|
|
227
|
+
className="text-[11px] text-text-secondary bg-bg-elevated/60 border border-border/30 rounded-md px-2 py-1 w-40 focus:outline-none focus:border-accent-cyan/40"
|
|
228
|
+
/>
|
|
229
|
+
</div>
|
|
230
|
+
<div className="flex flex-col gap-1">
|
|
231
|
+
{filteredHistory.map((entry) => (
|
|
232
|
+
<button
|
|
233
|
+
key={entry.id}
|
|
234
|
+
onClick={() => onSelectTrajectory?.(entry.id)}
|
|
235
|
+
className={`w-full text-left px-3 py-2.5 rounded-lg transition-all duration-200 border ${
|
|
236
|
+
entry.status === 'active'
|
|
237
|
+
? 'bg-blue-500/10 border-blue-500/30 hover:bg-blue-500/20'
|
|
238
|
+
: 'bg-bg-tertiary/50 border-transparent hover:bg-bg-elevated/60 hover:border-border/40'
|
|
239
|
+
}`}
|
|
240
|
+
>
|
|
241
|
+
<div className="flex items-center justify-between gap-2">
|
|
242
|
+
<span className="text-[13px] font-medium text-text-primary truncate flex-1">
|
|
243
|
+
{entry.title}
|
|
244
|
+
</span>
|
|
245
|
+
<span className={`text-[10px] px-1.5 py-0.5 rounded font-medium flex-shrink-0 ${
|
|
246
|
+
entry.status === 'completed'
|
|
247
|
+
? 'bg-green-500/15 text-green-500'
|
|
248
|
+
: entry.status === 'active'
|
|
249
|
+
? 'bg-blue-500/15 text-blue-500'
|
|
250
|
+
: 'bg-amber-500/15 text-amber-500'
|
|
251
|
+
}`}>
|
|
252
|
+
{entry.status}
|
|
253
|
+
</span>
|
|
254
|
+
</div>
|
|
255
|
+
<div className="flex items-center gap-2 mt-1">
|
|
256
|
+
<span className="text-[10px] text-text-dim">
|
|
257
|
+
{formatRelativeTime(entry.startedAt)}
|
|
258
|
+
</span>
|
|
259
|
+
{entry.confidence && (
|
|
260
|
+
<span className="text-[10px] text-text-dim">
|
|
261
|
+
• {Math.round(entry.confidence * 100)}% confidence
|
|
262
|
+
</span>
|
|
263
|
+
)}
|
|
264
|
+
</div>
|
|
265
|
+
{entry.summary && (
|
|
266
|
+
<p className="text-[11px] text-text-muted mt-1 line-clamp-2">
|
|
267
|
+
{entry.summary}
|
|
268
|
+
</p>
|
|
269
|
+
)}
|
|
270
|
+
</button>
|
|
271
|
+
))}
|
|
272
|
+
{filteredHistory.length === 0 && (
|
|
273
|
+
<div className="px-3 py-4 text-[11px] text-text-muted">
|
|
274
|
+
No matching trajectories. Try a different search.
|
|
275
|
+
</div>
|
|
276
|
+
)}
|
|
277
|
+
</div>
|
|
278
|
+
</div>
|
|
279
|
+
) : filteredSteps.length === 0 ? (
|
|
280
|
+
<div className="flex flex-col gap-4 py-4 text-text-muted">
|
|
281
|
+
{steps.length === 0 ? (
|
|
282
|
+
<div className="flex flex-col items-center justify-center gap-4 py-8">
|
|
283
|
+
<div className="w-16 h-16 rounded-2xl bg-bg-elevated/50 flex items-center justify-center border border-border/30">
|
|
284
|
+
<EmptyIcon />
|
|
285
|
+
</div>
|
|
286
|
+
<div className="text-center">
|
|
287
|
+
<p className="text-sm font-medium text-text-secondary">No steps recorded</p>
|
|
288
|
+
<p className="text-xs text-text-dim mt-1">Steps will appear here as the agent works</p>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
) : (
|
|
292
|
+
<div className="flex flex-col items-center justify-center gap-4 py-8">
|
|
293
|
+
<div className="w-16 h-16 rounded-2xl bg-bg-elevated/50 flex items-center justify-center border border-border/30">
|
|
294
|
+
<EmptyIcon />
|
|
295
|
+
</div>
|
|
296
|
+
<div className="text-center">
|
|
297
|
+
<p className="text-sm font-medium text-text-secondary">No matching steps</p>
|
|
298
|
+
<p className="text-xs text-text-dim mt-1">Try a different filter or select "All"</p>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
)}
|
|
302
|
+
</div>
|
|
303
|
+
) : (
|
|
304
|
+
<div className="flex flex-col gap-0.5">
|
|
305
|
+
{filteredSteps.map((step, index) => (
|
|
306
|
+
<TrajectoryStepItem
|
|
307
|
+
key={step.id}
|
|
308
|
+
step={step}
|
|
309
|
+
isExpanded={expandedSteps.has(step.id)}
|
|
310
|
+
isLast={index === filteredSteps.length - 1}
|
|
311
|
+
isFirst={index === 0}
|
|
312
|
+
compact={compact}
|
|
313
|
+
onToggle={() => toggleStep(step.id)}
|
|
314
|
+
onClick={onStepClick ? () => onStepClick(step) : undefined}
|
|
315
|
+
/>
|
|
316
|
+
))}
|
|
317
|
+
</div>
|
|
318
|
+
)}
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
interface TrajectoryStepItemProps {
|
|
325
|
+
step: TrajectoryStep;
|
|
326
|
+
isExpanded: boolean;
|
|
327
|
+
isLast: boolean;
|
|
328
|
+
isFirst?: boolean;
|
|
329
|
+
compact?: boolean;
|
|
330
|
+
onToggle: () => void;
|
|
331
|
+
onClick?: () => void;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
function TrajectoryStepItem({
|
|
335
|
+
step,
|
|
336
|
+
isExpanded,
|
|
337
|
+
isLast,
|
|
338
|
+
isFirst = false,
|
|
339
|
+
compact = false,
|
|
340
|
+
onToggle,
|
|
341
|
+
onClick,
|
|
342
|
+
}: TrajectoryStepItemProps) {
|
|
343
|
+
const timestamp = formatTimestamp(step.timestamp);
|
|
344
|
+
const icon = getStepIcon(step.type);
|
|
345
|
+
const statusColor = getStatusColor(step.status);
|
|
346
|
+
const phaseColor = getPhaseColor(step.phase);
|
|
347
|
+
const typeColor = getTypeColor(step.type);
|
|
348
|
+
const hasMetadata = step.metadata && Object.keys(step.metadata).length > 0;
|
|
349
|
+
const hasDetailContent = !!step.description || hasMetadata || !!onClick;
|
|
350
|
+
|
|
351
|
+
return (
|
|
352
|
+
<div className="flex gap-3 group">
|
|
353
|
+
{/* Timeline line and node */}
|
|
354
|
+
<div className="flex flex-col items-center w-7 relative">
|
|
355
|
+
{/* Connecting line above (if not first) */}
|
|
356
|
+
{!isFirst && (
|
|
357
|
+
<div
|
|
358
|
+
className="absolute top-0 w-px h-2 transition-colors"
|
|
359
|
+
style={{ backgroundColor: phaseColor ? `${phaseColor}40` : 'var(--color-border)' }}
|
|
360
|
+
/>
|
|
361
|
+
)}
|
|
362
|
+
|
|
363
|
+
{/* Node */}
|
|
364
|
+
<div
|
|
365
|
+
className={`w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0 z-10 mt-2 transition-all duration-200 ${
|
|
366
|
+
step.status === 'running'
|
|
367
|
+
? 'animate-pulse shadow-[0_0_12px_rgba(0,217,255,0.4)]'
|
|
368
|
+
: 'group-hover:scale-110'
|
|
369
|
+
}`}
|
|
370
|
+
style={{
|
|
371
|
+
background: statusColor
|
|
372
|
+
? `linear-gradient(135deg, ${statusColor}40, ${statusColor}20)`
|
|
373
|
+
: phaseColor
|
|
374
|
+
? `linear-gradient(135deg, ${phaseColor}30, ${phaseColor}10)`
|
|
375
|
+
: `linear-gradient(135deg, ${typeColor}30, ${typeColor}10)`,
|
|
376
|
+
borderWidth: '1px',
|
|
377
|
+
borderStyle: 'solid',
|
|
378
|
+
borderColor: statusColor || phaseColor || typeColor || 'var(--color-border)',
|
|
379
|
+
color: statusColor || phaseColor || typeColor || 'var(--color-text-secondary)',
|
|
380
|
+
}}
|
|
381
|
+
>
|
|
382
|
+
{icon}
|
|
383
|
+
</div>
|
|
384
|
+
|
|
385
|
+
{/* Connecting line below (if not last) */}
|
|
386
|
+
{!isLast && (
|
|
387
|
+
<div
|
|
388
|
+
className="w-px flex-1 mt-1 transition-colors"
|
|
389
|
+
style={{
|
|
390
|
+
background: `linear-gradient(to bottom, ${phaseColor || typeColor || 'var(--color-border)'}40, transparent)`
|
|
391
|
+
}}
|
|
392
|
+
/>
|
|
393
|
+
)}
|
|
394
|
+
</div>
|
|
395
|
+
|
|
396
|
+
{/* Content */}
|
|
397
|
+
<div className={`flex-1 min-w-0 pt-1 ${isLast ? 'pb-1' : 'pb-3'}`}>
|
|
398
|
+
<button
|
|
399
|
+
className={`w-full flex items-center justify-between gap-3 px-3 py-2.5 rounded-lg transition-all duration-200 text-left border ${
|
|
400
|
+
isExpanded
|
|
401
|
+
? 'bg-bg-elevated/80 border-border/60 shadow-sm'
|
|
402
|
+
: 'bg-bg-tertiary/50 border-transparent hover:bg-bg-elevated/60 hover:border-border/40'
|
|
403
|
+
}`}
|
|
404
|
+
onClick={onToggle}
|
|
405
|
+
>
|
|
406
|
+
<div className="flex items-center gap-2 min-w-0 flex-1">
|
|
407
|
+
<span className="text-[13px] font-medium text-text-primary truncate">
|
|
408
|
+
{step.title}
|
|
409
|
+
</span>
|
|
410
|
+
<span
|
|
411
|
+
className="text-[10px] px-1.5 py-0.5 rounded font-medium flex-shrink-0"
|
|
412
|
+
style={{
|
|
413
|
+
backgroundColor: `${typeColor}15`,
|
|
414
|
+
color: typeColor,
|
|
415
|
+
}}
|
|
416
|
+
>
|
|
417
|
+
{formatType(step.type)}
|
|
418
|
+
</span>
|
|
419
|
+
{step.phase && phaseColor && (
|
|
420
|
+
<span
|
|
421
|
+
className="text-[10px] px-1.5 py-0.5 rounded font-medium flex-shrink-0"
|
|
422
|
+
style={{
|
|
423
|
+
backgroundColor: `${phaseColor}15`,
|
|
424
|
+
color: phaseColor,
|
|
425
|
+
}}
|
|
426
|
+
>
|
|
427
|
+
{step.phase}
|
|
428
|
+
</span>
|
|
429
|
+
)}
|
|
430
|
+
</div>
|
|
431
|
+
<div className="flex items-center gap-2 flex-shrink-0">
|
|
432
|
+
{step.duration !== undefined && (
|
|
433
|
+
<span className="text-[10px] font-mono text-text-muted px-1.5 py-0.5 bg-bg-elevated/50 rounded">
|
|
434
|
+
{formatDuration(step.duration)}
|
|
435
|
+
</span>
|
|
436
|
+
)}
|
|
437
|
+
<span className="text-[10px] text-text-dim">{timestamp}</span>
|
|
438
|
+
{!compact && <ChevronIcon isExpanded={isExpanded} />}
|
|
439
|
+
</div>
|
|
440
|
+
</button>
|
|
441
|
+
|
|
442
|
+
{/* Expanded details */}
|
|
443
|
+
{isExpanded && !compact && hasDetailContent && (
|
|
444
|
+
<div className="mt-2 ml-1 pl-3 border-l-2 border-border/30">
|
|
445
|
+
{step.description && (
|
|
446
|
+
<p className="text-[13px] text-text-secondary mb-3 leading-relaxed">
|
|
447
|
+
{step.description}
|
|
448
|
+
</p>
|
|
449
|
+
)}
|
|
450
|
+
{hasMetadata && (
|
|
451
|
+
<div className="bg-bg-elevated/50 rounded-lg p-3 mb-3 overflow-x-auto border border-border/20">
|
|
452
|
+
<pre className="text-[11px] font-mono text-text-muted whitespace-pre-wrap break-words leading-relaxed">
|
|
453
|
+
{JSON.stringify(step.metadata, null, 2)}
|
|
454
|
+
</pre>
|
|
455
|
+
</div>
|
|
456
|
+
)}
|
|
457
|
+
{onClick && (
|
|
458
|
+
<button
|
|
459
|
+
className="inline-flex items-center gap-1.5 px-3 py-1.5 text-[11px] font-medium text-accent-cyan bg-accent-cyan/10 border border-accent-cyan/20 rounded-md hover:bg-accent-cyan/20 hover:border-accent-cyan/30 transition-colors"
|
|
460
|
+
onClick={(e) => {
|
|
461
|
+
e.stopPropagation();
|
|
462
|
+
onClick();
|
|
463
|
+
}}
|
|
464
|
+
>
|
|
465
|
+
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
|
|
466
|
+
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
|
|
467
|
+
<polyline points="15 3 21 3 21 9" />
|
|
468
|
+
<line x1="10" y1="14" x2="21" y2="3" />
|
|
469
|
+
</svg>
|
|
470
|
+
View Details
|
|
471
|
+
</button>
|
|
472
|
+
)}
|
|
473
|
+
</div>
|
|
474
|
+
)}
|
|
475
|
+
</div>
|
|
476
|
+
</div>
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
// Helper functions
|
|
481
|
+
function formatTimestamp(ts: string | number): string {
|
|
482
|
+
const date = new Date(ts);
|
|
483
|
+
return date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
function formatRelativeTime(dateStr: string): string {
|
|
487
|
+
const date = new Date(dateStr);
|
|
488
|
+
const now = new Date();
|
|
489
|
+
const diffMs = now.getTime() - date.getTime();
|
|
490
|
+
const diffMins = Math.floor(diffMs / 60000);
|
|
491
|
+
const diffHours = Math.floor(diffMs / 3600000);
|
|
492
|
+
const diffDays = Math.floor(diffMs / 86400000);
|
|
493
|
+
|
|
494
|
+
if (diffMins < 1) return 'just now';
|
|
495
|
+
if (diffMins < 60) return `${diffMins}m ago`;
|
|
496
|
+
if (diffHours < 24) return `${diffHours}h ago`;
|
|
497
|
+
if (diffDays < 7) return `${diffDays}d ago`;
|
|
498
|
+
return date.toLocaleDateString();
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
function formatDuration(ms: number): string {
|
|
502
|
+
if (ms < 1000) return `${ms}ms`;
|
|
503
|
+
if (ms < 60000) return `${(ms / 1000).toFixed(1)}s`;
|
|
504
|
+
return `${(ms / 60000).toFixed(1)}m`;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
function formatType(type: TrajectoryStep['type']): string {
|
|
508
|
+
const labels: Record<TrajectoryStep['type'], string> = {
|
|
509
|
+
tool_call: 'Tool',
|
|
510
|
+
decision: 'Decision',
|
|
511
|
+
message: 'Message',
|
|
512
|
+
state_change: 'State',
|
|
513
|
+
phase_transition: 'Phase',
|
|
514
|
+
error: 'Error',
|
|
515
|
+
};
|
|
516
|
+
return labels[type];
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
function getStatusColor(status?: TrajectoryStep['status']): string | null {
|
|
520
|
+
switch (status) {
|
|
521
|
+
case 'running':
|
|
522
|
+
return '#ff6b35'; // warning/orange
|
|
523
|
+
case 'success':
|
|
524
|
+
return '#00ffc8'; // success/green
|
|
525
|
+
case 'error':
|
|
526
|
+
return '#ff4757'; // error/red
|
|
527
|
+
default:
|
|
528
|
+
return null;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
function getPhaseColor(phase?: TrajectoryStep['phase']): string | null {
|
|
533
|
+
switch (phase) {
|
|
534
|
+
case 'plan':
|
|
535
|
+
return '#3b82f6'; // blue
|
|
536
|
+
case 'design':
|
|
537
|
+
return '#00d9ff'; // cyan
|
|
538
|
+
case 'execute':
|
|
539
|
+
return '#ff6b35'; // orange
|
|
540
|
+
case 'review':
|
|
541
|
+
return '#00ffc8'; // green
|
|
542
|
+
case 'observe':
|
|
543
|
+
return '#fbbf24'; // yellow
|
|
544
|
+
default:
|
|
545
|
+
return null;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
function getTypeColor(type: TrajectoryStep['type']): string {
|
|
550
|
+
switch (type) {
|
|
551
|
+
case 'tool_call':
|
|
552
|
+
return '#00d9ff'; // cyan
|
|
553
|
+
case 'decision':
|
|
554
|
+
return '#3b82f6'; // blue
|
|
555
|
+
case 'message':
|
|
556
|
+
return '#3b82f6'; // blue
|
|
557
|
+
case 'state_change':
|
|
558
|
+
return '#10b981'; // emerald
|
|
559
|
+
case 'phase_transition':
|
|
560
|
+
return '#f59e0b'; // amber
|
|
561
|
+
case 'error':
|
|
562
|
+
return '#ef4444'; // red
|
|
563
|
+
default:
|
|
564
|
+
return '#6b7280'; // gray
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
function getStepIcon(type: TrajectoryStep['type']): React.ReactNode {
|
|
569
|
+
switch (type) {
|
|
570
|
+
case 'tool_call':
|
|
571
|
+
return <ToolIcon />;
|
|
572
|
+
case 'decision':
|
|
573
|
+
return <DecisionIcon />;
|
|
574
|
+
case 'message':
|
|
575
|
+
return <MessageIcon />;
|
|
576
|
+
case 'state_change':
|
|
577
|
+
return <StateIcon />;
|
|
578
|
+
case 'phase_transition':
|
|
579
|
+
return <PhaseIcon />;
|
|
580
|
+
case 'error':
|
|
581
|
+
return <ErrorIcon />;
|
|
582
|
+
default:
|
|
583
|
+
return null;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
// Icon components
|
|
588
|
+
function TrajectoryHeaderIcon() {
|
|
589
|
+
return (
|
|
590
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" className="text-blue-500">
|
|
591
|
+
<path d="M3 12h4l3 9 4-18 3 9h4" strokeLinecap="round" strokeLinejoin="round" />
|
|
592
|
+
</svg>
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
function FilterAllIcon() {
|
|
597
|
+
return (
|
|
598
|
+
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
|
|
599
|
+
<circle cx="12" cy="12" r="3" />
|
|
600
|
+
<path d="M12 2v4m0 12v4m-7.07-14.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83" />
|
|
601
|
+
</svg>
|
|
602
|
+
);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
function ToolIcon() {
|
|
606
|
+
return (
|
|
607
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
608
|
+
<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" />
|
|
609
|
+
</svg>
|
|
610
|
+
);
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
function DecisionIcon() {
|
|
614
|
+
return (
|
|
615
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
616
|
+
<path d="M12 2l2.4 7.4H22l-6 4.6 2.3 7-6.3-4.6L5.7 21l2.3-7-6-4.6h7.6z" />
|
|
617
|
+
</svg>
|
|
618
|
+
);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
function MessageIcon() {
|
|
622
|
+
return (
|
|
623
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
624
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
|
|
625
|
+
</svg>
|
|
626
|
+
);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
function StateIcon() {
|
|
630
|
+
return (
|
|
631
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
632
|
+
<rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
|
|
633
|
+
<path d="M9 12h6m-3-3v6" />
|
|
634
|
+
</svg>
|
|
635
|
+
);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
function PhaseIcon() {
|
|
639
|
+
return (
|
|
640
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
641
|
+
<circle cx="12" cy="12" r="10" />
|
|
642
|
+
<path d="M12 6v6l4 2" />
|
|
643
|
+
</svg>
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
function ErrorIcon() {
|
|
648
|
+
return (
|
|
649
|
+
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
|
650
|
+
<circle cx="12" cy="12" r="10" />
|
|
651
|
+
<line x1="12" y1="8" x2="12" y2="12" />
|
|
652
|
+
<circle cx="12" cy="16" r="0.5" fill="currentColor" />
|
|
653
|
+
</svg>
|
|
654
|
+
);
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
function ChevronIcon({ isExpanded }: { isExpanded: boolean }) {
|
|
658
|
+
return (
|
|
659
|
+
<svg
|
|
660
|
+
width="14"
|
|
661
|
+
height="14"
|
|
662
|
+
viewBox="0 0 24 24"
|
|
663
|
+
fill="none"
|
|
664
|
+
stroke="currentColor"
|
|
665
|
+
strokeWidth="2"
|
|
666
|
+
className={`text-text-muted transition-transform duration-200 ${isExpanded ? 'rotate-180' : ''}`}
|
|
667
|
+
>
|
|
668
|
+
<polyline points="6 9 12 15 18 9" />
|
|
669
|
+
</svg>
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
function EmptyIcon() {
|
|
674
|
+
return (
|
|
675
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" className="text-text-dim">
|
|
676
|
+
<circle cx="12" cy="12" r="10" />
|
|
677
|
+
<line x1="8" y1="12" x2="16" y2="12" />
|
|
678
|
+
</svg>
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
function Spinner() {
|
|
683
|
+
return (
|
|
684
|
+
<svg className="animate-spin" width="20" height="20" viewBox="0 0 24 24">
|
|
685
|
+
<circle
|
|
686
|
+
cx="12"
|
|
687
|
+
cy="12"
|
|
688
|
+
r="10"
|
|
689
|
+
stroke="currentColor"
|
|
690
|
+
strokeWidth="2"
|
|
691
|
+
fill="none"
|
|
692
|
+
strokeDasharray="32"
|
|
693
|
+
strokeLinecap="round"
|
|
694
|
+
className="text-accent"
|
|
695
|
+
/>
|
|
696
|
+
</svg>
|
|
697
|
+
);
|
|
698
|
+
}
|