File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -209,15 +209,6 @@ export const DocsChatbot = ({
209209 return part . text ;
210210 }
211211 case "source-url" : {
212- const snippetLines = part . providerMetadata ?. result
213- ?. snippet
214- ? [
215- (
216- part . providerMetadata . result . snippet as string
217- ) . slice ( 0 , 200 ) ,
218- ]
219- : [ ] ;
220-
221212 return (
222213 < Artifact key = { part . sourceId } >
223214 < ArtifactHeader
@@ -234,10 +225,13 @@ export const DocsChatbot = ({
234225 </ ArtifactActions >
235226 </ ArtifactHeader >
236227
237- { snippetLines . length > 0 && (
228+ { part . providerMetadata ?. result && (
238229 < ArtifactContent >
239230 < ResponseLight >
240- { snippetLines . join ( "\n" ) + "..." }
231+ {
232+ part . providerMetadata . result
233+ . snippet as string
234+ }
241235 </ ResponseLight >
242236 </ ArtifactContent >
243237 ) }
You can’t perform that action at this time.
0 commit comments