@app-studio/web 0.9.16 → 0.9.18
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/dist/components/Alert/Alert/Alert.props.d.ts +3 -2
- package/dist/components/Alert/Alert/Alert.view.d.ts +1 -1
- package/dist/components/AuthGuard/AuthGuard.d.ts +35 -0
- package/dist/components/AuthGuard/index.d.ts +1 -0
- package/dist/components/Avatar/Avatar/Avatar.props.d.ts +2 -1
- package/dist/components/Avatar/Avatar/Avatar.view.d.ts +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Tabs/Tabs/Tabs.props.d.ts +51 -3
- package/dist/components/Tabs/Tabs/Tabs.state.d.ts +13 -2
- package/dist/components/Tabs/Tabs/Tabs.view.d.ts +7 -1
- package/dist/components/Tabs/Tabs.d.ts +8 -1
- package/dist/components/Tabs/examples/compound.d.ts +5 -0
- package/dist/components/Tabs/examples/index.d.ts +1 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.props.d.ts +157 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.state.d.ts +24 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.style.d.ts +130 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.view.d.ts +12 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentMessage.d.ts +21 -0
- package/dist/components/adk/AgentChat/AgentChat/AgentTypingIndicator.d.ts +7 -0
- package/dist/components/adk/AgentChat/AgentChat/MessageAttachmentPreview.d.ts +12 -0
- package/dist/components/adk/AgentChat/AgentChat.d.ts +41 -0
- package/dist/components/adk/AgentChat/examples/default.d.ts +25 -0
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.props.d.ts +182 -0
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.state.d.ts +27 -0
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.style.d.ts +144 -0
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.view.d.ts +12 -0
- package/dist/components/adk/AgentEval/AgentEval/EvaluationCreator.d.ts +17 -0
- package/dist/components/adk/AgentEval/AgentEval/EvaluationList.d.ts +23 -0
- package/dist/components/adk/AgentEval/AgentEval/EvaluationMetrics.d.ts +15 -0
- package/dist/components/adk/AgentEval/AgentEval/EvaluationResults.d.ts +19 -0
- package/dist/components/adk/AgentEval/AgentEval.d.ts +41 -0
- package/dist/components/adk/AgentEval/examples/default.d.ts +31 -0
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.props.d.ts +148 -0
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.state.d.ts +32 -0
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.style.d.ts +105 -0
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.view.d.ts +12 -0
- package/dist/components/adk/AgentSession/AgentSession/SessionActions.d.ts +20 -0
- package/dist/components/adk/AgentSession/AgentSession/SessionFilters.d.ts +14 -0
- package/dist/components/adk/AgentSession/AgentSession/SessionListItem.d.ts +26 -0
- package/dist/components/adk/AgentSession/AgentSession.d.ts +42 -0
- package/dist/components/adk/AgentSession/examples/default.d.ts +31 -0
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.props.d.ts +159 -0
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.state.d.ts +27 -0
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.style.d.ts +146 -0
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.view.d.ts +12 -0
- package/dist/components/adk/AgentTrace/AgentTrace/TraceEventList.d.ts +20 -0
- package/dist/components/adk/AgentTrace/AgentTrace/TraceFilters.d.ts +13 -0
- package/dist/components/adk/AgentTrace/AgentTrace/TraceMetrics.d.ts +16 -0
- package/dist/components/adk/AgentTrace/AgentTrace/TraceTimeline.d.ts +19 -0
- package/dist/components/adk/AgentTrace/AgentTrace/TraceVisualization.d.ts +19 -0
- package/dist/components/adk/AgentTrace/AgentTrace.d.ts +44 -0
- package/dist/components/adk/AgentTrace/examples/default.d.ts +31 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/configs/AppConfig.d.ts +4 -0
- package/dist/hooks/useAdk.d.ts +42 -0
- package/dist/pages/adk/CompleteAgentApp.d.ts +30 -0
- package/dist/pages/adk/adkComponents.page.d.ts +8 -0
- package/dist/pages/adk/adkIntegration.page.d.ts +6 -0
- package/dist/pages/adk/agentChat.page.d.ts +8 -0
- package/dist/pages/adk/providers/AdkProvider.d.ts +83 -0
- package/dist/pages/adk/providers/index.d.ts +1 -0
- package/dist/pages/adk/services/AgentService.d.ts +167 -0
- package/dist/pages/adk/services/AgentServiceProvider.d.ts +83 -0
- package/dist/pages/adk/services/AgentServiceUtils.d.ts +176 -0
- package/dist/pages/adk/services/index.d.ts +50 -0
- package/dist/services/api/core/ApiError.d.ts +8 -0
- package/dist/services/api/core/ApiRequestOptions.d.ts +14 -0
- package/dist/services/api/core/ApiResult.d.ts +7 -0
- package/dist/services/api/core/CancelablePromise.d.ts +19 -0
- package/dist/services/api/core/OpenAPI.d.ts +17 -0
- package/dist/services/api/core/request.d.ts +16 -0
- package/dist/services/api/index.d.ts +156 -0
- package/dist/services/api/models/AgentMessage.d.ts +15 -0
- package/dist/services/api/models/AgentMessageResponse.d.ts +26 -0
- package/dist/services/api/models/AgentRunRequest.d.ts +27 -0
- package/dist/services/api/models/AgentRunResponse.d.ts +16 -0
- package/dist/services/api/models/AutoChargeSettingsParams.d.ts +14 -0
- package/dist/services/api/models/Buffer.d.ts +1 -0
- package/dist/services/api/models/CheckRatingParams.d.ts +7 -0
- package/dist/services/api/models/CreateActionParams.d.ts +22 -0
- package/dist/services/api/models/CreateAdminParams.d.ts +5 -0
- package/dist/services/api/models/CreateAnalyticParams.d.ts +22 -0
- package/dist/services/api/models/CreateApplicationParams.d.ts +10 -0
- package/dist/services/api/models/CreateCommentAnswerParams.d.ts +9 -0
- package/dist/services/api/models/CreateCommentParams.d.ts +8 -0
- package/dist/services/api/models/CreateComponentRevisionParams.d.ts +10 -0
- package/dist/services/api/models/CreateContentParams.d.ts +10 -0
- package/dist/services/api/models/CreateEvaluationParams.d.ts +22 -0
- package/dist/services/api/models/CreateExempleParams.d.ts +6 -0
- package/dist/services/api/models/CreateFeedbackParams.d.ts +14 -0
- package/dist/services/api/models/CreateGrantParams.d.ts +10 -0
- package/dist/services/api/models/CreateHighlightParams.d.ts +14 -0
- package/dist/services/api/models/CreateHomeParams.d.ts +10 -0
- package/dist/services/api/models/CreateItemParams.d.ts +22 -0
- package/dist/services/api/models/CreateLikeParams.d.ts +14 -0
- package/dist/services/api/models/CreateNewsParams.d.ts +6 -0
- package/dist/services/api/models/CreateNewsletterParams.d.ts +10 -0
- package/dist/services/api/models/CreateNewsletterSectionParams.d.ts +6 -0
- package/dist/services/api/models/CreatePageParams.d.ts +22 -0
- package/dist/services/api/models/CreatePaymentParams.d.ts +6 -0
- package/dist/services/api/models/CreateProjectParams.d.ts +10 -0
- package/dist/services/api/models/CreateRatingParams.d.ts +14 -0
- package/dist/services/api/models/CreateReportParams.d.ts +15 -0
- package/dist/services/api/models/CreateSessionParams.d.ts +14 -0
- package/dist/services/api/models/CreateSourceParams.d.ts +10 -0
- package/dist/services/api/models/CreateUserParams.d.ts +5 -0
- package/dist/services/api/models/DeployPageParams.d.ts +6 -0
- package/dist/services/api/models/DomainPageParams.d.ts +10 -0
- package/dist/services/api/models/EditComponentsParams.d.ts +14 -0
- package/dist/services/api/models/EditImageParams.d.ts +14 -0
- package/dist/services/api/models/EditTextParams.d.ts +18 -0
- package/dist/services/api/models/EvaluationResponse.d.ts +38 -0
- package/dist/services/api/models/FieldCreateOptionsParams.d.ts +14 -0
- package/dist/services/api/models/FindAdminParams.d.ts +19 -0
- package/dist/services/api/models/FindAnalyticParams.d.ts +19 -0
- package/dist/services/api/models/FindApplicationParams.d.ts +19 -0
- package/dist/services/api/models/FindCommentParams.d.ts +26 -0
- package/dist/services/api/models/FindContentParams.d.ts +19 -0
- package/dist/services/api/models/FindExempleParams.d.ts +19 -0
- package/dist/services/api/models/FindFeedbackParams.d.ts +30 -0
- package/dist/services/api/models/FindLikeParams.d.ts +26 -0
- package/dist/services/api/models/FindNewsParams.d.ts +31 -0
- package/dist/services/api/models/FindNewsletterParams.d.ts +19 -0
- package/dist/services/api/models/FindPageParams.d.ts +22 -0
- package/dist/services/api/models/FindReportParams.d.ts +30 -0
- package/dist/services/api/models/FindUserParams.d.ts +23 -0
- package/dist/services/api/models/FixComponentParams.d.ts +10 -0
- package/dist/services/api/models/FixPageParams.d.ts +10 -0
- package/dist/services/api/models/ForgotPasswordAdminParams.d.ts +6 -0
- package/dist/services/api/models/ForgotPasswordParams.d.ts +6 -0
- package/dist/services/api/models/GenerateAssistantParams.d.ts +15 -0
- package/dist/services/api/models/GenerateJsonAssistantParams.d.ts +14 -0
- package/dist/services/api/models/GenerateProjectParams.d.ts +10 -0
- package/dist/services/api/models/GetAnalyticViewParams.d.ts +10 -0
- package/dist/services/api/models/ImportSessionParams.d.ts +14 -0
- package/dist/services/api/models/ListCommentParams.d.ts +7 -0
- package/dist/services/api/models/ManualChargeParams.d.ts +14 -0
- package/dist/services/api/models/MessagePart.d.ts +14 -0
- package/dist/services/api/models/RequestTask.d.ts +10 -0
- package/dist/services/api/models/ResetPasswordAdminParams.d.ts +10 -0
- package/dist/services/api/models/ResetPasswordParams.d.ts +10 -0
- package/dist/services/api/models/ResetTaskParams.d.ts +10 -0
- package/dist/services/api/models/SaveReceiptParams.d.ts +10 -0
- package/dist/services/api/models/SessionResponse.d.ts +30 -0
- package/dist/services/api/models/SetAnalyticViewParams.d.ts +14 -0
- package/dist/services/api/models/SetPaymentMethodParams.d.ts +6 -0
- package/dist/services/api/models/SignInAdminParams.d.ts +4 -0
- package/dist/services/api/models/SignInParams.d.ts +4 -0
- package/dist/services/api/models/SignUpParams.d.ts +14 -0
- package/dist/services/api/models/SignalCommentParams.d.ts +7 -0
- package/dist/services/api/models/TraceEvent.d.ts +26 -0
- package/dist/services/api/models/TraceMetrics.d.ts +22 -0
- package/dist/services/api/models/UpdateAccountParams.d.ts +4 -0
- package/dist/services/api/models/UpdateActionParams.d.ts +6 -0
- package/dist/services/api/models/UpdateAdminParams.d.ts +4 -0
- package/dist/services/api/models/UpdateApplicationParams.d.ts +6 -0
- package/dist/services/api/models/UpdateCommentParams.d.ts +6 -0
- package/dist/services/api/models/UpdateComponentParams.d.ts +26 -0
- package/dist/services/api/models/UpdateComponentPropsParams.d.ts +10 -0
- package/dist/services/api/models/UpdateContentParams.d.ts +10 -0
- package/dist/services/api/models/UpdateExempleParams.d.ts +6 -0
- package/dist/services/api/models/UpdateFeedbackParams.d.ts +14 -0
- package/dist/services/api/models/UpdateGrantParams.d.ts +6 -0
- package/dist/services/api/models/UpdateHighlightParams.d.ts +10 -0
- package/dist/services/api/models/UpdateHomeParams.d.ts +6 -0
- package/dist/services/api/models/UpdateImagePropsParams.d.ts +10 -0
- package/dist/services/api/models/UpdateItemJsonBody.d.ts +6 -0
- package/dist/services/api/models/UpdateItemParams.d.ts +14 -0
- package/dist/services/api/models/UpdateItemTextBody.d.ts +6 -0
- package/dist/services/api/models/UpdateLikeParams.d.ts +6 -0
- package/dist/services/api/models/UpdateNewsParams.d.ts +46 -0
- package/dist/services/api/models/UpdateNewsletterParams.d.ts +6 -0
- package/dist/services/api/models/UpdateNewsletterSectionParams.d.ts +6 -0
- package/dist/services/api/models/UpdatePageParams.d.ts +14 -0
- package/dist/services/api/models/UpdatePasswordAminParams.d.ts +10 -0
- package/dist/services/api/models/UpdatePasswordParams.d.ts +10 -0
- package/dist/services/api/models/UpdateProfileParams.d.ts +22 -0
- package/dist/services/api/models/UpdateProjectParams.d.ts +10 -0
- package/dist/services/api/models/UpdateReportParams.d.ts +3 -0
- package/dist/services/api/models/UpdateSourceParams.d.ts +6 -0
- package/dist/services/api/models/UpdateTaskStatus.d.ts +18 -0
- package/dist/services/api/models/UpdateUserCountParams.d.ts +6 -0
- package/dist/services/api/models/UpdateUserParams.d.ts +44 -0
- package/dist/services/api/models/createPageComponentParams.d.ts +10 -0
- package/dist/services/api/services/AccountService.d.ts +132 -0
- package/dist/services/api/services/ActionService.d.ts +72 -0
- package/dist/services/api/services/AdkEvaluationService.d.ts +93 -0
- package/dist/services/api/services/AdkService.d.ts +104 -0
- package/dist/services/api/services/AdkTraceService.d.ts +90 -0
- package/dist/services/api/services/AdminService.d.ts +131 -0
- package/dist/services/api/services/AnalyticService.d.ts +72 -0
- package/dist/services/api/services/AppService.d.ts +42 -0
- package/dist/services/api/services/ApplicationService.d.ts +83 -0
- package/dist/services/api/services/AssistantService.d.ts +50 -0
- package/dist/services/api/services/AuthService.d.ts +130 -0
- package/dist/services/api/services/CommentService.d.ts +144 -0
- package/dist/services/api/services/ComponentRevisionService.d.ts +25 -0
- package/dist/services/api/services/ComponentService.d.ts +102 -0
- package/dist/services/api/services/ContentService.d.ts +72 -0
- package/dist/services/api/services/CronService.d.ts +12 -0
- package/dist/services/api/services/ExempleService.d.ts +104 -0
- package/dist/services/api/services/FeedbackService.d.ts +83 -0
- package/dist/services/api/services/FieldService.d.ts +47 -0
- package/dist/services/api/services/FileService.d.ts +30 -0
- package/dist/services/api/services/GrantService.d.ts +100 -0
- package/dist/services/api/services/HighlightService.d.ts +59 -0
- package/dist/services/api/services/HomeService.d.ts +59 -0
- package/dist/services/api/services/IapService.d.ts +36 -0
- package/dist/services/api/services/ItemJsonService.d.ts +58 -0
- package/dist/services/api/services/ItemService.d.ts +53 -0
- package/dist/services/api/services/ItemTextsService.d.ts +101 -0
- package/dist/services/api/services/LikeService.d.ts +86 -0
- package/dist/services/api/services/NewsService.d.ts +87 -0
- package/dist/services/api/services/NewsletterService.d.ts +169 -0
- package/dist/services/api/services/PageService.d.ts +84 -0
- package/dist/services/api/services/PaymentService.d.ts +79 -0
- package/dist/services/api/services/ProfileService.d.ts +50 -0
- package/dist/services/api/services/ProjectService.d.ts +59 -0
- package/dist/services/api/services/PromptService.d.ts +18 -0
- package/dist/services/api/services/RatingService.d.ts +34 -0
- package/dist/services/api/services/ReportService.d.ts +48 -0
- package/dist/services/api/services/SectionService.d.ts +50 -0
- package/dist/services/api/services/SeedService.d.ts +24 -0
- package/dist/services/api/services/UserService.d.ts +148 -0
- package/dist/services/api/services/WorkflowService.d.ts +203 -0
- package/dist/stores/AuthStore.d.ts +2 -0
- package/dist/utils/env.d.ts +15 -0
- package/dist/utils/localstorage.d.ts +5 -0
- package/dist/utils/request.d.ts +38 -0
- package/dist/utils/store.d.ts +7 -0
- package/dist/web.cjs.development.js +6079 -50
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +6077 -52
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +6081 -54
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/package.json +6 -3
- package/dist/hooks/useRect.d.ts +0 -7
- package/dist/pages/positioning-test.page.d.ts +0 -3
- package/dist/pages/responsive-title-demo.page.d.ts +0 -6
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { ViewProps } from 'app-studio';
|
|
2
|
+
/**
|
|
3
|
+
* Core ADK Evaluation Types
|
|
4
|
+
*/
|
|
5
|
+
export interface EvaluationMetric {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
type: 'accuracy' | 'latency' | 'cost' | 'quality' | 'safety' | 'custom';
|
|
10
|
+
threshold?: number;
|
|
11
|
+
weight?: number;
|
|
12
|
+
config?: Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
export interface EvaluationTestCase {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
input: any;
|
|
19
|
+
expectedOutput?: any;
|
|
20
|
+
metadata?: Record<string, any>;
|
|
21
|
+
tags?: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface EvaluationRun {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
appName: string;
|
|
27
|
+
userId: string;
|
|
28
|
+
status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
29
|
+
progress: number;
|
|
30
|
+
startTime: number;
|
|
31
|
+
endTime?: number;
|
|
32
|
+
duration?: number;
|
|
33
|
+
testCases: EvaluationTestCase[];
|
|
34
|
+
metrics: EvaluationMetric[];
|
|
35
|
+
results?: EvaluationResult[];
|
|
36
|
+
summary?: EvaluationSummary;
|
|
37
|
+
config?: EvaluationConfig;
|
|
38
|
+
error?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface EvaluationResult {
|
|
41
|
+
id: string;
|
|
42
|
+
evaluationId: string;
|
|
43
|
+
testCaseId: string;
|
|
44
|
+
status: 'pass' | 'fail' | 'error' | 'skip';
|
|
45
|
+
score?: number;
|
|
46
|
+
actualOutput?: any;
|
|
47
|
+
metrics: Record<string, number>;
|
|
48
|
+
duration: number;
|
|
49
|
+
error?: string;
|
|
50
|
+
details?: Record<string, any>;
|
|
51
|
+
timestamp: number;
|
|
52
|
+
}
|
|
53
|
+
export interface EvaluationSummary {
|
|
54
|
+
totalTests: number;
|
|
55
|
+
passedTests: number;
|
|
56
|
+
failedTests: number;
|
|
57
|
+
errorTests: number;
|
|
58
|
+
skippedTests: number;
|
|
59
|
+
averageScore: number;
|
|
60
|
+
totalDuration: number;
|
|
61
|
+
metricsAverages: Record<string, number>;
|
|
62
|
+
passRate: number;
|
|
63
|
+
}
|
|
64
|
+
export interface EvaluationConfig {
|
|
65
|
+
maxConcurrency?: number;
|
|
66
|
+
timeout?: number;
|
|
67
|
+
retryCount?: number;
|
|
68
|
+
stopOnFailure?: boolean;
|
|
69
|
+
randomizeOrder?: boolean;
|
|
70
|
+
enableDetailedLogging?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Component View Customization
|
|
74
|
+
*/
|
|
75
|
+
export interface AgentEvalViews {
|
|
76
|
+
container?: ViewProps;
|
|
77
|
+
header?: ViewProps;
|
|
78
|
+
evaluationList?: ViewProps;
|
|
79
|
+
evaluationItem?: ViewProps;
|
|
80
|
+
activeEvaluationItem?: ViewProps;
|
|
81
|
+
createPanel?: ViewProps;
|
|
82
|
+
resultsPanel?: ViewProps;
|
|
83
|
+
metricsPanel?: ViewProps;
|
|
84
|
+
testCaseList?: ViewProps;
|
|
85
|
+
testCaseItem?: ViewProps;
|
|
86
|
+
progressBar?: ViewProps;
|
|
87
|
+
statusIndicator?: ViewProps;
|
|
88
|
+
actionButtons?: ViewProps;
|
|
89
|
+
exportButton?: ViewProps;
|
|
90
|
+
refreshButton?: ViewProps;
|
|
91
|
+
searchInput?: ViewProps;
|
|
92
|
+
emptyState?: ViewProps;
|
|
93
|
+
loadingState?: ViewProps;
|
|
94
|
+
errorState?: ViewProps;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Event Handlers
|
|
98
|
+
*/
|
|
99
|
+
export interface AgentEvalEventHandlers {
|
|
100
|
+
onEvaluationCreate?: (evaluation: EvaluationRun) => void;
|
|
101
|
+
onEvaluationStart?: (evaluationId: string) => void;
|
|
102
|
+
onEvaluationComplete?: (result: EvaluationRun) => void;
|
|
103
|
+
onEvaluationCancel?: (evaluationId: string) => void;
|
|
104
|
+
onEvaluationDelete?: (evaluationId: string) => void;
|
|
105
|
+
onTestCaseSelect?: (testCase: EvaluationTestCase) => void;
|
|
106
|
+
onResultSelect?: (result: EvaluationResult) => void;
|
|
107
|
+
onExport?: (format: 'json' | 'csv' | 'pdf') => void;
|
|
108
|
+
onError?: (error: Error) => void;
|
|
109
|
+
onRefresh?: () => void;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Evaluation Templates
|
|
113
|
+
*/
|
|
114
|
+
export interface EvaluationTemplate {
|
|
115
|
+
id: string;
|
|
116
|
+
name: string;
|
|
117
|
+
description: string;
|
|
118
|
+
testCases: EvaluationTestCase[];
|
|
119
|
+
metrics: EvaluationMetric[];
|
|
120
|
+
config: EvaluationConfig;
|
|
121
|
+
tags?: string[];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Comparison Options
|
|
125
|
+
*/
|
|
126
|
+
export interface EvaluationComparison {
|
|
127
|
+
baselineId: string;
|
|
128
|
+
comparisonIds: string[];
|
|
129
|
+
metrics: string[];
|
|
130
|
+
showDifferences?: boolean;
|
|
131
|
+
showTrends?: boolean;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Main AgentEval Props Interface
|
|
135
|
+
*/
|
|
136
|
+
export interface AgentEvalProps extends ViewProps, AgentEvalEventHandlers {
|
|
137
|
+
appName: string;
|
|
138
|
+
userId: string;
|
|
139
|
+
apiBaseUrl?: string;
|
|
140
|
+
enableBatchEvaluation?: boolean;
|
|
141
|
+
enableMetricsComparison?: boolean;
|
|
142
|
+
enableResultExport?: boolean;
|
|
143
|
+
enableTemplates?: boolean;
|
|
144
|
+
enableAutoRefresh?: boolean;
|
|
145
|
+
maxConcurrentEvals?: number;
|
|
146
|
+
maxTestCases?: number;
|
|
147
|
+
refreshInterval?: number;
|
|
148
|
+
showEvaluationHistory?: boolean;
|
|
149
|
+
showMetricsPanel?: boolean;
|
|
150
|
+
showTestCaseDetails?: boolean;
|
|
151
|
+
showProgressIndicators?: boolean;
|
|
152
|
+
compactMode?: boolean;
|
|
153
|
+
views?: AgentEvalViews;
|
|
154
|
+
initialEvaluations?: EvaluationRun[];
|
|
155
|
+
selectedEvaluationId?: string;
|
|
156
|
+
availableTemplates?: EvaluationTemplate[];
|
|
157
|
+
enableRealTimeUpdates?: boolean;
|
|
158
|
+
enableResultCaching?: boolean;
|
|
159
|
+
enableCustomMetrics?: boolean;
|
|
160
|
+
ariaLabel?: string;
|
|
161
|
+
ariaDescribedBy?: string;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Export Options
|
|
165
|
+
*/
|
|
166
|
+
export interface EvaluationExportOptions {
|
|
167
|
+
format: 'json' | 'csv' | 'pdf';
|
|
168
|
+
includeTestCases?: boolean;
|
|
169
|
+
includeResults?: boolean;
|
|
170
|
+
includeMetrics?: boolean;
|
|
171
|
+
includeSummary?: boolean;
|
|
172
|
+
evaluationIds?: string[];
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Real-time Update Types
|
|
176
|
+
*/
|
|
177
|
+
export interface EvaluationUpdate {
|
|
178
|
+
type: 'progress' | 'result' | 'status' | 'complete' | 'error';
|
|
179
|
+
evaluationId: string;
|
|
180
|
+
data: any;
|
|
181
|
+
timestamp: number;
|
|
182
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AgentEvalProps, EvaluationRun, EvaluationResult, EvaluationTestCase, EvaluationMetric, EvaluationTemplate, EvaluationExportOptions } from './AgentEval.props';
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook for managing AgentEval state and operations
|
|
5
|
+
*/
|
|
6
|
+
export declare const useAgentEval: (props: AgentEvalProps) => {
|
|
7
|
+
evaluations: EvaluationRun[];
|
|
8
|
+
selectedEvaluation: EvaluationRun | null;
|
|
9
|
+
selectedResult: EvaluationResult | null;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
isCreating: boolean;
|
|
12
|
+
error: string | null;
|
|
13
|
+
searchQuery: string;
|
|
14
|
+
templates: EvaluationTemplate[];
|
|
15
|
+
fetchEvaluations: () => Promise<void>;
|
|
16
|
+
createEvaluation: (name: string, testCases: EvaluationTestCase[], metrics: EvaluationMetric[], config?: any) => Promise<EvaluationRun>;
|
|
17
|
+
startEvaluation: (evaluationId: string) => Promise<void>;
|
|
18
|
+
cancelEvaluation: (evaluationId: string) => Promise<void>;
|
|
19
|
+
deleteEvaluation: (evaluationId: string) => Promise<void>;
|
|
20
|
+
selectEvaluation: (evaluationId: string) => void;
|
|
21
|
+
selectResult: (result: EvaluationResult) => void;
|
|
22
|
+
exportEvaluations: (options: EvaluationExportOptions) => Promise<void>;
|
|
23
|
+
setSearchQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
24
|
+
setError: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
25
|
+
runningEvaluationsCount: number;
|
|
26
|
+
canStartNewEvaluation: boolean;
|
|
27
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { ViewProps } from 'app-studio';
|
|
2
|
+
/**
|
|
3
|
+
* Default styles for AgentEval component
|
|
4
|
+
* Following the app-studio design system with 4px grid, Inter/Geist fonts, and neutral palette
|
|
5
|
+
*/
|
|
6
|
+
export declare const DefaultAgentEvalStyles: {
|
|
7
|
+
container: ViewProps;
|
|
8
|
+
header: ViewProps;
|
|
9
|
+
evaluationList: ViewProps;
|
|
10
|
+
evaluationItem: ViewProps;
|
|
11
|
+
activeEvaluationItem: ViewProps;
|
|
12
|
+
evaluationHeader: ViewProps;
|
|
13
|
+
evaluationTitle: ViewProps;
|
|
14
|
+
evaluationMeta: ViewProps;
|
|
15
|
+
statusBadge: ViewProps;
|
|
16
|
+
statusPending: ViewProps;
|
|
17
|
+
statusRunning: ViewProps;
|
|
18
|
+
statusCompleted: ViewProps;
|
|
19
|
+
statusFailed: ViewProps;
|
|
20
|
+
statusCancelled: ViewProps;
|
|
21
|
+
progressBar: ViewProps;
|
|
22
|
+
progressFill: ViewProps;
|
|
23
|
+
evaluationActions: ViewProps;
|
|
24
|
+
actionButton: ViewProps;
|
|
25
|
+
startButton: ViewProps;
|
|
26
|
+
cancelButton: ViewProps;
|
|
27
|
+
deleteButton: ViewProps;
|
|
28
|
+
createPanel: ViewProps;
|
|
29
|
+
formGroup: ViewProps;
|
|
30
|
+
formLabel: ViewProps;
|
|
31
|
+
formInput: ViewProps;
|
|
32
|
+
formTextarea: ViewProps;
|
|
33
|
+
resultsPanel: ViewProps;
|
|
34
|
+
resultsSummary: ViewProps;
|
|
35
|
+
summaryGrid: ViewProps;
|
|
36
|
+
summaryCard: ViewProps;
|
|
37
|
+
summaryValue: ViewProps;
|
|
38
|
+
summaryLabel: ViewProps;
|
|
39
|
+
testCaseList: ViewProps;
|
|
40
|
+
testCaseItem: ViewProps;
|
|
41
|
+
testCaseHeader: ViewProps;
|
|
42
|
+
testCaseName: ViewProps;
|
|
43
|
+
testCaseStatus: ViewProps;
|
|
44
|
+
testCasePass: ViewProps;
|
|
45
|
+
testCaseFail: ViewProps;
|
|
46
|
+
testCaseError: ViewProps;
|
|
47
|
+
testCaseSkip: ViewProps;
|
|
48
|
+
metricsPanel: ViewProps;
|
|
49
|
+
metricsGrid: ViewProps;
|
|
50
|
+
metricCard: ViewProps;
|
|
51
|
+
metricTitle: ViewProps;
|
|
52
|
+
metricValue: ViewProps;
|
|
53
|
+
metricChange: ViewProps;
|
|
54
|
+
metricIncrease: ViewProps;
|
|
55
|
+
metricDecrease: ViewProps;
|
|
56
|
+
emptyState: ViewProps;
|
|
57
|
+
loadingState: ViewProps;
|
|
58
|
+
errorState: ViewProps;
|
|
59
|
+
searchInput: ViewProps;
|
|
60
|
+
exportButton: ViewProps;
|
|
61
|
+
refreshButton: ViewProps;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Size variants for AgentEval
|
|
65
|
+
*/
|
|
66
|
+
export declare const AgentEvalSizes: {
|
|
67
|
+
sm: {
|
|
68
|
+
container: {
|
|
69
|
+
height: string;
|
|
70
|
+
};
|
|
71
|
+
evaluationList: {
|
|
72
|
+
minHeight: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
md: {
|
|
76
|
+
container: {
|
|
77
|
+
height: string;
|
|
78
|
+
};
|
|
79
|
+
evaluationList: {
|
|
80
|
+
minHeight: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
lg: {
|
|
84
|
+
container: {
|
|
85
|
+
height: string;
|
|
86
|
+
};
|
|
87
|
+
evaluationList: {
|
|
88
|
+
minHeight: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
xl: {
|
|
92
|
+
container: {
|
|
93
|
+
height: string;
|
|
94
|
+
};
|
|
95
|
+
evaluationList: {
|
|
96
|
+
minHeight: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Theme variants for AgentEval
|
|
102
|
+
*/
|
|
103
|
+
export declare const AgentEvalThemes: {
|
|
104
|
+
light: {
|
|
105
|
+
container: {
|
|
106
|
+
backgroundColor: string;
|
|
107
|
+
};
|
|
108
|
+
header: {
|
|
109
|
+
backgroundColor: string;
|
|
110
|
+
};
|
|
111
|
+
evaluationList: {
|
|
112
|
+
backgroundColor: string;
|
|
113
|
+
};
|
|
114
|
+
createPanel: {
|
|
115
|
+
backgroundColor: string;
|
|
116
|
+
};
|
|
117
|
+
resultsPanel: {
|
|
118
|
+
backgroundColor: string;
|
|
119
|
+
};
|
|
120
|
+
metricsPanel: {
|
|
121
|
+
backgroundColor: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
dark: {
|
|
125
|
+
container: {
|
|
126
|
+
backgroundColor: string;
|
|
127
|
+
};
|
|
128
|
+
header: {
|
|
129
|
+
backgroundColor: string;
|
|
130
|
+
};
|
|
131
|
+
evaluationList: {
|
|
132
|
+
backgroundColor: string;
|
|
133
|
+
};
|
|
134
|
+
createPanel: {
|
|
135
|
+
backgroundColor: string;
|
|
136
|
+
};
|
|
137
|
+
resultsPanel: {
|
|
138
|
+
backgroundColor: string;
|
|
139
|
+
};
|
|
140
|
+
metricsPanel: {
|
|
141
|
+
backgroundColor: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AgentEvalProps } from './AgentEval.props';
|
|
3
|
+
import { useAgentEval } from './AgentEval.state';
|
|
4
|
+
export interface AgentEvalViewProps extends AgentEvalProps, ReturnType<typeof useAgentEval> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* AgentEval View Component
|
|
8
|
+
*
|
|
9
|
+
* Renders the complete evaluation interface with creation, monitoring, and results analysis
|
|
10
|
+
*/
|
|
11
|
+
declare const AgentEvalView: React.FC<AgentEvalViewProps>;
|
|
12
|
+
export default AgentEvalView;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EvaluationTemplate, EvaluationTestCase, EvaluationMetric } from './AgentEval.props';
|
|
3
|
+
export interface EvaluationCreatorProps {
|
|
4
|
+
templates: EvaluationTemplate[];
|
|
5
|
+
isCreating: boolean;
|
|
6
|
+
canCreate: boolean;
|
|
7
|
+
onCreateEvaluation: (name: string, testCases: EvaluationTestCase[], metrics: EvaluationMetric[]) => void;
|
|
8
|
+
views?: {
|
|
9
|
+
container?: any;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* EvaluationCreator Component
|
|
14
|
+
*
|
|
15
|
+
* Form for creating new evaluations with test cases and metrics
|
|
16
|
+
*/
|
|
17
|
+
export declare const EvaluationCreator: React.FC<EvaluationCreatorProps>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EvaluationRun } from './AgentEval.props';
|
|
3
|
+
export interface EvaluationListProps {
|
|
4
|
+
evaluations: EvaluationRun[];
|
|
5
|
+
selectedEvaluation?: EvaluationRun | null;
|
|
6
|
+
onEvaluationSelect: (evaluationId: string) => void;
|
|
7
|
+
onEvaluationStart: (evaluationId: string) => void;
|
|
8
|
+
onEvaluationCancel: (evaluationId: string) => void;
|
|
9
|
+
onEvaluationDelete: (evaluationId: string) => void;
|
|
10
|
+
showProgressIndicators?: boolean;
|
|
11
|
+
compactMode?: boolean;
|
|
12
|
+
views?: {
|
|
13
|
+
container?: any;
|
|
14
|
+
evaluationItem?: any;
|
|
15
|
+
activeEvaluationItem?: any;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* EvaluationList Component
|
|
20
|
+
*
|
|
21
|
+
* Renders a list of evaluations with status, progress, and actions
|
|
22
|
+
*/
|
|
23
|
+
export declare const EvaluationList: React.FC<EvaluationListProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EvaluationRun } from './AgentEval.props';
|
|
3
|
+
export interface EvaluationMetricsProps {
|
|
4
|
+
evaluations: EvaluationRun[];
|
|
5
|
+
enableComparison?: boolean;
|
|
6
|
+
views?: {
|
|
7
|
+
container?: any;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* EvaluationMetrics Component
|
|
12
|
+
*
|
|
13
|
+
* Displays aggregated metrics and comparisons across evaluations
|
|
14
|
+
*/
|
|
15
|
+
export declare const EvaluationMetrics: React.FC<EvaluationMetricsProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EvaluationRun, EvaluationResult } from './AgentEval.props';
|
|
3
|
+
export interface EvaluationResultsProps {
|
|
4
|
+
evaluation: EvaluationRun;
|
|
5
|
+
selectedResult?: EvaluationResult | null;
|
|
6
|
+
onResultSelect: (result: EvaluationResult) => void;
|
|
7
|
+
showTestCaseDetails?: boolean;
|
|
8
|
+
views?: {
|
|
9
|
+
container?: any;
|
|
10
|
+
testCaseList?: any;
|
|
11
|
+
testCaseItem?: any;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* EvaluationResults Component
|
|
16
|
+
*
|
|
17
|
+
* Displays evaluation results with summary and detailed test case results
|
|
18
|
+
*/
|
|
19
|
+
export declare const EvaluationResults: React.FC<EvaluationResultsProps>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AgentEvalProps } from './AgentEval/AgentEval.props';
|
|
3
|
+
/**
|
|
4
|
+
* AgentEval Component
|
|
5
|
+
*
|
|
6
|
+
* A comprehensive evaluation component for ADK agents.
|
|
7
|
+
* Handles evaluation creation, execution, monitoring, and results analysis.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <AgentEval
|
|
12
|
+
* appName="my-agent"
|
|
13
|
+
* userId="user123"
|
|
14
|
+
* onEvaluationComplete={(result) => console.log('Evaluation complete:', result)}
|
|
15
|
+
* />
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* // With custom evaluation configuration
|
|
21
|
+
* <AgentEval
|
|
22
|
+
* appName="my-agent"
|
|
23
|
+
* userId="user123"
|
|
24
|
+
* enableBatchEvaluation={true}
|
|
25
|
+
* enableMetricsComparison={true}
|
|
26
|
+
* enableResultExport={true}
|
|
27
|
+
* maxConcurrentEvals={5}
|
|
28
|
+
* autoRefresh={true}
|
|
29
|
+
* refreshInterval={10000}
|
|
30
|
+
* views={{
|
|
31
|
+
* container: { backgroundColor: 'color.gray.50' },
|
|
32
|
+
* evaluationList: { maxHeight: '400px' },
|
|
33
|
+
* resultsPanel: { minHeight: '300px' }
|
|
34
|
+
* }}
|
|
35
|
+
* />
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare const AgentEval: React.FC<AgentEvalProps>;
|
|
39
|
+
export default AgentEval;
|
|
40
|
+
export { AgentEval };
|
|
41
|
+
export type { AgentEvalProps };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Default AgentEval Example
|
|
4
|
+
*
|
|
5
|
+
* Demonstrates basic usage of the AgentEval component
|
|
6
|
+
*/
|
|
7
|
+
export declare const DefaultDemo: () => React.JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* AgentEval with Mock Data Example
|
|
10
|
+
*
|
|
11
|
+
* Shows the component with sample evaluation data
|
|
12
|
+
*/
|
|
13
|
+
export declare const MockDataDemo: () => React.JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Compact AgentEval Example
|
|
16
|
+
*
|
|
17
|
+
* Shows the component in compact mode
|
|
18
|
+
*/
|
|
19
|
+
export declare const CompactDemo: () => React.JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Customized AgentEval Example
|
|
22
|
+
*
|
|
23
|
+
* Shows advanced customization options
|
|
24
|
+
*/
|
|
25
|
+
export declare const CustomizedDemo: () => React.JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Real-time AgentEval Example
|
|
28
|
+
*
|
|
29
|
+
* Demonstrates real-time updates and monitoring
|
|
30
|
+
*/
|
|
31
|
+
export declare const RealTimeDemo: () => React.JSX.Element;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { ViewProps } from 'app-studio';
|
|
2
|
+
/**
|
|
3
|
+
* Core ADK Session Types
|
|
4
|
+
*/
|
|
5
|
+
export interface AgentSession {
|
|
6
|
+
id: string;
|
|
7
|
+
userId: string;
|
|
8
|
+
appName: string;
|
|
9
|
+
state: any;
|
|
10
|
+
events: AgentEvent[];
|
|
11
|
+
createdAt: number;
|
|
12
|
+
updatedAt: number;
|
|
13
|
+
metadata?: {
|
|
14
|
+
title?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
tags?: string[];
|
|
17
|
+
messageCount?: number;
|
|
18
|
+
lastActivity?: number;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface AgentEvent {
|
|
22
|
+
id: string;
|
|
23
|
+
sessionId: string;
|
|
24
|
+
type: string;
|
|
25
|
+
data: any;
|
|
26
|
+
timestamp: number;
|
|
27
|
+
title?: string;
|
|
28
|
+
author?: 'user' | 'bot' | 'system';
|
|
29
|
+
content?: {
|
|
30
|
+
parts?: any[];
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface SessionSummary {
|
|
34
|
+
id: string;
|
|
35
|
+
title: string;
|
|
36
|
+
lastMessage: string;
|
|
37
|
+
messageCount: number;
|
|
38
|
+
createdAt: number;
|
|
39
|
+
updatedAt: number;
|
|
40
|
+
isActive: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Component View Customization
|
|
44
|
+
*/
|
|
45
|
+
export interface AgentSessionViews {
|
|
46
|
+
container?: ViewProps;
|
|
47
|
+
header?: ViewProps;
|
|
48
|
+
sessionList?: ViewProps;
|
|
49
|
+
sessionItem?: ViewProps;
|
|
50
|
+
activeSessionItem?: ViewProps;
|
|
51
|
+
sessionInfo?: ViewProps;
|
|
52
|
+
sessionActions?: ViewProps;
|
|
53
|
+
createButton?: ViewProps;
|
|
54
|
+
deleteButton?: ViewProps;
|
|
55
|
+
exportButton?: ViewProps;
|
|
56
|
+
importButton?: ViewProps;
|
|
57
|
+
refreshButton?: ViewProps;
|
|
58
|
+
searchInput?: ViewProps;
|
|
59
|
+
emptyState?: ViewProps;
|
|
60
|
+
loadingState?: ViewProps;
|
|
61
|
+
errorState?: ViewProps;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Event Handlers
|
|
65
|
+
*/
|
|
66
|
+
export interface AgentSessionEventHandlers {
|
|
67
|
+
onSessionSelect?: (session: AgentSession) => void;
|
|
68
|
+
onSessionCreate?: (session: AgentSession) => void;
|
|
69
|
+
onSessionUpdate?: (session: AgentSession) => void;
|
|
70
|
+
onSessionDelete?: (sessionId: string) => void;
|
|
71
|
+
onSessionImport?: (session: AgentSession) => void;
|
|
72
|
+
onSessionExport?: (session: AgentSession) => void;
|
|
73
|
+
onError?: (error: Error) => void;
|
|
74
|
+
onRefresh?: () => void;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Session Filter and Sort Options
|
|
78
|
+
*/
|
|
79
|
+
export interface SessionFilters {
|
|
80
|
+
searchQuery?: string;
|
|
81
|
+
dateRange?: {
|
|
82
|
+
start: Date;
|
|
83
|
+
end: Date;
|
|
84
|
+
};
|
|
85
|
+
tags?: string[];
|
|
86
|
+
messageCountRange?: {
|
|
87
|
+
min: number;
|
|
88
|
+
max: number;
|
|
89
|
+
};
|
|
90
|
+
isActive?: boolean;
|
|
91
|
+
}
|
|
92
|
+
export interface SessionSortOptions {
|
|
93
|
+
field: 'createdAt' | 'updatedAt' | 'messageCount' | 'title';
|
|
94
|
+
direction: 'asc' | 'desc';
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Main AgentSession Props Interface
|
|
98
|
+
*/
|
|
99
|
+
export interface AgentSessionProps extends ViewProps, AgentSessionEventHandlers {
|
|
100
|
+
appName: string;
|
|
101
|
+
userId: string;
|
|
102
|
+
apiBaseUrl?: string;
|
|
103
|
+
showSessionHistory?: boolean;
|
|
104
|
+
enableSessionImport?: boolean;
|
|
105
|
+
enableSessionExport?: boolean;
|
|
106
|
+
enableSessionDelete?: boolean;
|
|
107
|
+
enableSessionSearch?: boolean;
|
|
108
|
+
enableAutoRefresh?: boolean;
|
|
109
|
+
maxSessions?: number;
|
|
110
|
+
refreshInterval?: number;
|
|
111
|
+
showSessionInfo?: boolean;
|
|
112
|
+
showSessionActions?: boolean;
|
|
113
|
+
showCreateButton?: boolean;
|
|
114
|
+
showRefreshButton?: boolean;
|
|
115
|
+
compactMode?: boolean;
|
|
116
|
+
views?: AgentSessionViews;
|
|
117
|
+
initialSessions?: AgentSession[];
|
|
118
|
+
selectedSessionId?: string;
|
|
119
|
+
defaultFilters?: SessionFilters;
|
|
120
|
+
defaultSort?: SessionSortOptions;
|
|
121
|
+
enableSessionTags?: boolean;
|
|
122
|
+
enableSessionMetadata?: boolean;
|
|
123
|
+
enableBulkOperations?: boolean;
|
|
124
|
+
ariaLabel?: string;
|
|
125
|
+
ariaDescribedBy?: string;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Session Action Types
|
|
129
|
+
*/
|
|
130
|
+
export declare type SessionAction = 'create' | 'select' | 'delete' | 'export' | 'import' | 'refresh' | 'search' | 'filter' | 'sort';
|
|
131
|
+
/**
|
|
132
|
+
* Session Status Types
|
|
133
|
+
*/
|
|
134
|
+
export declare type SessionStatus = 'active' | 'inactive' | 'archived' | 'error';
|
|
135
|
+
/**
|
|
136
|
+
* Session Import/Export Format
|
|
137
|
+
*/
|
|
138
|
+
export interface SessionExportData {
|
|
139
|
+
session: AgentSession;
|
|
140
|
+
exportedAt: number;
|
|
141
|
+
exportedBy: string;
|
|
142
|
+
version: string;
|
|
143
|
+
}
|
|
144
|
+
export interface SessionImportOptions {
|
|
145
|
+
overwriteExisting?: boolean;
|
|
146
|
+
preserveIds?: boolean;
|
|
147
|
+
updateTimestamps?: boolean;
|
|
148
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AgentSessionProps, AgentSession, SessionFilters, SessionSortOptions, SessionImportOptions } from './AgentSession.props';
|
|
3
|
+
/**
|
|
4
|
+
* Custom hook for managing AgentSession state and operations
|
|
5
|
+
*/
|
|
6
|
+
export declare const useAgentSession: (props: AgentSessionProps) => {
|
|
7
|
+
sessions: AgentSession[];
|
|
8
|
+
selectedSession: AgentSession | null;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
isCreating: boolean;
|
|
11
|
+
error: string | null;
|
|
12
|
+
searchQuery: string;
|
|
13
|
+
filters: SessionFilters;
|
|
14
|
+
sortOptions: SessionSortOptions;
|
|
15
|
+
fetchSessions: () => Promise<void>;
|
|
16
|
+
createSession: (metadata?: {
|
|
17
|
+
title?: string | undefined;
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
tags?: string[] | undefined;
|
|
20
|
+
} | undefined) => Promise<AgentSession>;
|
|
21
|
+
selectSession: (sessionId: string) => Promise<void>;
|
|
22
|
+
deleteSession: (sessionId: string) => Promise<void>;
|
|
23
|
+
exportSession: (session: AgentSession) => void;
|
|
24
|
+
importSession: (file: File, options?: SessionImportOptions) => Promise<void>;
|
|
25
|
+
handleFileImport: () => void;
|
|
26
|
+
setSearchQuery: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
27
|
+
setFilters: import("react").Dispatch<import("react").SetStateAction<SessionFilters>>;
|
|
28
|
+
setSortOptions: import("react").Dispatch<import("react").SetStateAction<SessionSortOptions>>;
|
|
29
|
+
setError: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
30
|
+
fileInputRef: import("react").MutableRefObject<HTMLInputElement | null>;
|
|
31
|
+
handleFileSelect: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
32
|
+
};
|