@@ -47,39 +47,16 @@ export function useObservabilityAIAssistantRouter(): StatefulObservabilityAIAssi
47
47
...observabilityAIAssistantRouter ,
48
48
push : ( ...args ) => {
49
49
const next = link ( ...args ) ;
50
-
51
50
history . push ( next ) ;
52
51
} ,
53
- navigateToConversationsApp : ( path , ...args ) => {
54
- const [ _ , route , routeParam ] = path . split ( '/' ) ;
55
-
56
- const sanitized = routeParam . replace ( '{' , '' ) . replace ( '}' , '' ) ;
57
-
58
- const pathKey = args [ 0 ] ?. path ;
59
-
60
- if ( typeof pathKey !== 'object' ) {
61
- return ;
62
- }
63
-
64
- if ( Object . keys ( pathKey ) . length === 0 ) {
65
- navigateToApp ( 'observabilityAIAssistant' , {
66
- path : route ,
67
- } ) ;
68
- return ;
69
- }
70
-
71
- if ( Object . keys ( pathKey ) . length === 1 ) {
72
- navigateToApp ( 'observabilityAIAssistant' , {
73
- // @ts -expect-error
74
- path : `${ route } /${ pathKey [ sanitized ] } ` ,
75
- } ) ;
76
- return ;
77
- }
78
- } ,
79
52
replace : ( path , ...args ) => {
80
53
const next = link ( path , ...args ) ;
81
54
history . replace ( next ) ;
82
55
} ,
56
+ navigateToConversationsApp : ( path , ...args ) => {
57
+ const next = link ( path , ...args ) ;
58
+ navigateToApp ( 'observabilityAIAssistant' , { path : next , replace : false } ) ;
59
+ } ,
83
60
link : ( path , ...args ) => {
84
61
return http . basePath . prepend ( '/app/observabilityAIAssistant' + link ( path , ...args ) ) ;
85
62
} ,
0 commit comments