Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | // Permissive navigate type that allows any string path during migration
// This can be tightened once all routes are created
export type PermissiveNavigateOptions = {
to: string;
replace?: boolean;
search?: Record<string, string>;
params?: Record<string, string>;
};
export type NavigateFn = (opts: PermissiveNavigateOptions) => void;
export interface BreadcrumbSegment {
label: string;
path: string;
onClick?: () => void;
isAgentDropdown?: boolean;
isSkillDropdown?: boolean;
isClusterDropdown?: boolean;
isArmDropdown?: boolean;
}
export interface NavigationState {
section: 'agents' | 'documentation' | 'settings';
selectedAgentName?: string;
selectedSkillName?: string;
selectedClusterName?: string;
selectedArmName?: string;
selectedEvaluationId?: string;
currentView:
| 'agents-list'
| 'edit-agent'
| 'agent-view'
| 'create-skill'
| 'skill-dashboard'
| 'edit-skill'
| 'logs'
| 'evaluations'
| 'edit-evaluation'
| 'datasets'
| 'configurations'
| 'models'
| 'skill-events'
| 'clusters'
| 'cluster-arms'
| 'arm-detail'
| 'create-evaluation'
| 'create-dataset'
| 'create-configuration'
| 'edit-configuration'
| 'log-detail'
| 'evaluation-detail'
| 'dataset-detail';
logId?: string;
evalId?: string;
datasetId?: string;
breadcrumbs: BreadcrumbSegment[];
}
export interface NavigationContextType {
navigationState: NavigationState;
isLoadingFromStorage: boolean;
navigate: NavigateFn;
setSection: (section: NavigationState['section']) => void;
navigateToSkillDashboard: (agentName: string, skillName: string) => void;
navigateToLogs: (agentName: string, skillName: string) => void;
navigateToLogDetail: (
agentName: string,
skillName: string,
logId: string,
) => void;
navigateToEvaluations: (agentName: string, skillName: string) => void;
navigateToEvaluationDetail: (
agentName: string,
skillName: string,
evalId: string,
) => void;
navigateToEditEvaluation: (
agentName: string,
skillName: string,
evaluationId: string,
) => void;
navigateToCreateEvaluation: (agentName: string, skillName: string) => void;
replaceToEvaluations: (agentName: string, skillName: string) => void;
navigateToDatasets: (agentName: string, skillName: string) => void;
replaceToDatasets: (agentName: string, skillName: string) => void;
navigateToDatasetDetail: (
agentName: string,
skillName: string,
datasetId: string,
) => void;
navigateToCreateDataset: (agentName: string, skillName: string) => void;
navigateToConfigurations: (agentName: string, skillName: string) => void;
navigateToModels: (agentName: string, skillName: string) => void;
navigateToClusters: (agentName: string, skillName: string) => void;
navigateToClusterArms: (
agentName: string,
skillName: string,
clusterName: string,
) => void;
navigateToArmDetail: (
agentName: string,
skillName: string,
clusterName: string,
armName: string,
) => void;
navigateBack: (targetSegmentIndex: number) => void;
updateBreadcrumbs: (segments: BreadcrumbSegment[]) => void;
}
|