@@ -217,7 +217,7 @@ export function ChatRightPanel({
217217 const source_type = result . source_type || "url" ;
218218
219219 return (
220- < div className = "p-3 rounded-lg border border-gray-200 text-xs hover:bg-gray-50 transition-colors" >
220+ < div className = "p-3 rounded-lg border border-gray-200 text-xs hover:bg-gray-50 transition-colors overflow-hidden " >
221221 < div className = "flex flex-col" >
222222 < div >
223223 { source_type === "url" ? (
@@ -226,13 +226,31 @@ export function ChatRightPanel({
226226 target = "_blank"
227227 rel = "noopener noreferrer"
228228 className = "font-medium text-blue-600 hover:underline block text-base"
229+ style = { {
230+ display : '-webkit-box' ,
231+ WebkitLineClamp : 2 ,
232+ WebkitBoxOrient : 'vertical' ,
233+ overflow : 'hidden' ,
234+ wordBreak : 'break-word'
235+ } }
236+ title = { title }
229237 >
230238 { title }
231239 </ a >
232240 ) : (
233- < span className = "font-medium block text-base" >
241+ < div
242+ className = "font-medium text-base"
243+ style = { {
244+ display : '-webkit-box' ,
245+ WebkitLineClamp : 2 ,
246+ WebkitBoxOrient : 'vertical' ,
247+ overflow : 'hidden' ,
248+ wordBreak : 'break-word'
249+ } }
250+ title = { title }
251+ >
234252 { title }
235- </ span >
253+ </ div >
236254 ) }
237255
238256 { published_date && (
@@ -249,15 +267,22 @@ export function ChatRightPanel({
249267 </ div >
250268
251269 < div className = "mt-2 text-sm flex justify-between items-center" >
252- < div className = "flex items-center min-w-0 flex-1" >
270+ < div className = "flex items-center overflow-hidden" style = { { flex : 1 , minWidth : 0 } } >
253271 < div className = "w-3 h-3 flex-shrink-0 mr-1" >
254272 { source_type === "url" ? (
255273 < ExternalLink className = "w-full h-full" />
256274 ) : source_type === "file" ? (
257275 < Database className = "w-full h-full" />
258276 ) : null }
259277 </ div >
260- < span className = "text-gray-500 truncate" >
278+ < span
279+ className = "text-gray-500 truncate"
280+ style = { {
281+ maxWidth : '75%' ,
282+ display : 'inline-block'
283+ } }
284+ title = { formatUrl ( result ) }
285+ >
261286 { formatUrl ( result ) }
262287 </ span >
263288 </ div >
@@ -311,7 +336,7 @@ export function ChatRightPanel({
311336 return (
312337 < div className = { `transition-all duration-300 ease-in-out ${
313338 isVisible ? 'lg:block w-[400px]' : 'lg:block w-0 opacity-0'
314- } hidden border-l bg-background relative`} >
339+ } hidden border-l bg-background relative`} style = { { maxWidth : '400px' , overflow : 'hidden' } } >
315340 { /* Image viewer modal */ }
316341 { viewingImage && (
317342 < div className = "fixed inset-0 z-50 flex items-center justify-center bg-black/80" onClick = { ( ) => setViewingImage ( null ) } >
@@ -343,7 +368,7 @@ export function ChatRightPanel({
343368 </ div >
344369 ) }
345370
346- < div className = "flex-none sticky top-0 z-20 flex items-center justify-between border-b p-2 bg-gray-50" >
371+ < div className = "flex-none sticky top-0 z-20 flex items-center justify-between border-b p-2 bg-gray-50" style = { { maxWidth : '400px' , overflow : 'hidden' } } >
347372 < div className = "flex items-center space-x-1" >
348373 < h3 className = "text-sm font-semibold text-gray-800 pl-2" >
349374 网页 · 知识库搜索
@@ -363,8 +388,8 @@ export function ChatRightPanel({
363388 ) }
364389 </ div >
365390
366- < Tabs defaultValue = "sources" >
367- < TabsList className = "w-full" >
391+ < Tabs defaultValue = "sources" style = { { maxWidth : '400px' , overflow : 'hidden' } } >
392+ < TabsList className = "w-full" style = { { maxWidth : '400px' } } >
368393 < TabsTrigger value = "sources" className = "flex-1" >
369394 来源
370395 { searchResults . length > 0 && (
@@ -383,12 +408,12 @@ export function ChatRightPanel({
383408 </ TabsTrigger >
384409 </ TabsList >
385410
386- < StaticScrollArea className = "h-[calc(100vh-120px)]" >
387- < TabsContent value = "sources" className = "p-4" >
388- < div className = "space-y-2" >
411+ < StaticScrollArea className = "h-[calc(100vh-120px)]" style = { { maxWidth : '400px' , overflow : 'hidden' } } >
412+ < TabsContent value = "sources" className = "p-4" style = { { maxWidth : '400px' , overflow : 'hidden' } } >
413+ < div className = "space-y-2" style = { { maxWidth : '100%' , overflow : 'hidden' } } >
389414 { searchResults . length > 0 ? (
390415 < >
391- < div className = "space-y-3" >
416+ < div className = "space-y-3" style = { { maxWidth : '100%' , overflow : 'hidden' } } >
392417 { searchResults . map ( ( result , index ) => (
393418 < SearchResultItem
394419 key = { `result-${ index } ` }
@@ -406,7 +431,7 @@ export function ChatRightPanel({
406431 </ div >
407432 </ TabsContent >
408433
409- < TabsContent value = "images" className = "p-4" >
434+ < TabsContent value = "images" className = "p-4" style = { { maxWidth : '400px' , overflow : 'hidden' } } >
410435 { processedImages . length > 0 ? (
411436 < >
412437 < div className = "grid grid-cols-2 gap-2" >
0 commit comments