File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed
pages/AIGovernancePage/RequestLogsPage Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ import { MockInterception } from "testHelpers/entities" ;
2+ import type { Meta , StoryObj } from "@storybook/react-vite" ;
3+ import { RequestLogsPageView } from "./RequestLogsPageView" ;
4+
5+ const meta : Meta < typeof RequestLogsPageView > = {
6+ title : "pages/AIGovernancePage/RequestLogsPageView" ,
7+ component : RequestLogsPageView ,
8+ args : { } ,
9+ } ;
10+
11+ export default meta ;
12+ type Story = StoryObj < typeof RequestLogsPageView > ;
13+
14+ export const NotEnabled : Story = {
15+ args : {
16+ isRequestLogsVisible : false ,
17+ } ,
18+ } ;
19+
20+ export const WithLogs : Story = {
21+ args : {
22+ isRequestLogsVisible : true ,
23+ interceptions : [ MockInterception ] ,
24+ } ,
25+ } ;
26+
27+ export const EmptyLogs : Story = {
28+ args : {
29+ isRequestLogsVisible : true ,
30+ interceptions : [ ] ,
31+ } ,
32+ } ;
Original file line number Diff line number Diff line change @@ -5056,3 +5056,25 @@ export const MockNewTaskData = {
50565056 } ,
50575057 } ,
50585058} ;
5059+
5060+ export const MockInterception : TypesGen . AIBridgeInterception = {
5061+ id : "5c1da48a-9eb0-440e-9c82-5bc5692a603d" ,
5062+ initiator_id : "1ebb7622-e6ea-45b4-b244-dda30afc7238" ,
5063+ provider : "openai" ,
5064+ model : "gpt-4o" ,
5065+ started_at : "2022-05-17T17:39:01.382927298Z" ,
5066+ token_usages : [
5067+ {
5068+ id : "32e7fd17-24be-46b9-b867-2f0adfd42aff" ,
5069+ interception_id : "5c1da48a-9eb0-440e-9c82-5bc5692a603d" ,
5070+ provider_response_id : "res_1234567890" ,
5071+ input_tokens : 5 ,
5072+ output_tokens : 1 ,
5073+ metadata : { } ,
5074+ created_at : "2022-05-17T17:39:01.382927298Z" ,
5075+ } ,
5076+ ] ,
5077+ metadata : { } ,
5078+ user_prompts : [ ] ,
5079+ tool_usages : [ ] ,
5080+ } ;
You can’t perform that action at this time.
0 commit comments