@@ -16,7 +16,7 @@ declare global {
1616 }
1717}
1818
19- // eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars
19+ // eslint-disable-next-line no-unused-vars
2020type KapaFunction = ( command : string , options ?: unknown ) => void ;
2121
2222interface ChatAttributes extends Record < string , string | undefined > {
@@ -162,16 +162,11 @@ function getProductExampleQuestions(): string {
162162 return questions . join ( ',' ) ;
163163 }
164164
165- // Extract version subpath for hint
166- const pathParts = window . location . pathname . split ( '/' ) . filter ( Boolean ) ;
167- const versionPath =
168- pathParts . length >= 2
169- ? `/${ pathParts [ 0 ] } /${ pathParts [ 1 ] } /`
170- : window . location . pathname ;
165+ const productName = productData ?. product ?. name || 'InfluxDB' ;
171166
172167 // Append version hint to each question
173168 const questionsWithHint = questions . map ( ( question ) => {
174- return `${ question } (Version : ${ versionPath } )` ;
169+ return `${ question } (My version : ${ productName } )` ;
175170 } ) ;
176171
177172 return questionsWithHint . join ( ',' ) ;
@@ -196,14 +191,9 @@ function getVersionContext(): string {
196191 return '' ;
197192 }
198193
199- // Extract version subpath for context
200- const pathParts = window . location . pathname . split ( '/' ) . filter ( Boolean ) ;
201- const versionPath =
202- pathParts . length >= 2
203- ? `/${ pathParts [ 0 ] } /${ pathParts [ 1 ] } /`
204- : window . location . pathname ;
194+ const productName = productData ?. product ?. name || 'InfluxDB' ;
205195
206- return `(Version : ${ versionPath } ) ` ;
196+ return `My version : ${ productName } ` ;
207197}
208198
209199function setupVersionPrefill ( ) : void {
0 commit comments