File tree Expand file tree Collapse file tree
packages/appkit/src/connectors/genie Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ import type {
1212 GenieStreamEvent ,
1313} from "./types" ;
1414
15- const { Time, TimeUnits } = SDK ;
15+ const { TimeUnits } = SDK ;
16+ const Time = SDK . Time ?? ( SDK as any ) . default . Time ;
17+
1618const logger = createLogger ( "connectors:genie" ) ;
1719
1820type CreateMessageWaiter = Waiter < GenieMessage , GenieMessage > ;
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ import { AnalyticsPage } from './pages/analytics/AnalyticsPage';
1111{ { - if . plugins . lakebase } }
1212import { LakebasePage } from './pages/lakebase/LakebasePage' ;
1313{ { - end } }
14+ { { - if . plugins . genie } }
15+ import { GeniePage } from './pages/genie/GeniePage' ;
16+ { { - end } }
1417
1518const navLinkClass = ( { isActive } : { isActive : boolean } ) =>
1619 `px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${
@@ -37,6 +40,11 @@ function Layout() {
3740 < NavLink to = "/lakebase" className = { navLinkClass } >
3841 Lakebase
3942 </ NavLink >
43+ { { - end} }
44+ { { - if . plugins . genie } }
45+ < NavLink to = "/genie" className = { navLinkClass } >
46+ Genie
47+ </ NavLink >
4048{ { - end} }
4149 </ nav >
4250 </ header >
@@ -58,6 +66,9 @@ const router = createBrowserRouter([
5866{ { - end} }
5967{ { - if . plugins . lakebase } }
6068 { path : '/lakebase' , element : < LakebasePage /> } ,
69+ { { - end} }
70+ { { - if . plugins . genie } }
71+ { path : '/genie' , element : < GeniePage /> } ,
6172{ { - end} }
6273 ] ,
6374 } ,
Original file line number Diff line number Diff line change 1+ { { if . plugins . genie - } }
2+ import { GenieChat } from '@databricks/appkit-ui/react' ;
3+
4+ export function GeniePage ( ) {
5+ return (
6+ < div className = "space-y-6 w-full max-w-4xl mx-auto" >
7+ < div >
8+ < h2 className = "text-2xl font-bold text-foreground" > Genie</ h2 >
9+ < p className = "text-sm text-muted-foreground mt-1" >
10+ Ask questions about your data using Databricks AI/BI Genie.
11+ </ p >
12+ </ div >
13+ < div className = "h-[600px] border rounded-lg overflow-hidden" >
14+ < GenieChat alias = "default" />
15+ </ div >
16+ </ div >
17+ ) ;
18+ }
19+ { { - end } }
Original file line number Diff line number Diff line change @@ -13,9 +13,15 @@ resources:
1313 description: " {{.appDescription}}"
1414 source_code_path: . /
1515
16+ {{- if .plugins.genie }}
17+ user_api_scopes:
18+ - dashboards.genie
19+ {{- end }}
20+ {{- if not .plugins.genie }}
1621 # Uncomment to enable on behalf of user API scopes. Available scopes: sql, dashboards.genie , files.files
1722 # user_api_scopes:
1823 # - sql
24+ {{- end }}
1925{{- if .bundle.resources }}
2026
2127 # The resources which this app has access to.
You can’t perform that action at this time.
0 commit comments