Spaces:
Running
Running
File size: 626 Bytes
6e631f3 eb48dcc 6e631f3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import { createContext } from 'react'
import type { ScreenName } from '../types'
export type InvestigationIntent = { kind: 'trace' | 'compare' | 'mentor' | 'scratchpad'; runId?: string; metric?: string; question?: string } | null
export type AppContextValue = {
activeScreen: ScreenName
setActiveScreen: (screen: ScreenName) => void
toast: string
notify: (message: string) => void
investigationIntent: InvestigationIntent
openInvestigation: (intent: NonNullable<InvestigationIntent>) => void
clearInvestigationIntent: () => void
}
export const AppContext = createContext<AppContextValue | undefined>(undefined)
|