@@ -64,8 +64,8 @@ const ChatMessage = ({ type, content, steps, queryData, analysisInfo, confirmati
6464 This operation will perform a < span className = { `font-semibold ${ isHighRisk ? 'text-red-400' : 'text-yellow-400' } ` } > { operationType } </ span > query:
6565 </ p >
6666 { confirmationData ?. sqlQuery && (
67- < div className = "bg-gray-900 border border-gray-700 rounded p-3 overflow-x-auto " >
68- < pre className = "text-sm font-mono text-gray-200" >
67+ < div className = "bg-gray-900 border border-gray-700 rounded p-3" >
68+ < pre className = "text-sm font-mono text-gray-200 whitespace-pre-wrap break-words overflow-wrap-anywhere " >
6969 < code className = "language-sql" > { confirmationData . sqlQuery } </ code >
7070 </ pre >
7171 </ div >
@@ -156,8 +156,8 @@ const ChatMessage = ({ type, content, steps, queryData, analysisInfo, confirmati
156156 </ div >
157157
158158 { hasSQL && (
159- < div className = "overflow-x-auto -mx-2 px-2" >
160- < pre className = "bg-gray-900 text-gray-200 p-3 rounded text-sm mb-3 w-fit min-w-full font-mono " >
159+ < div className = "-mx-2 px-2" >
160+ < pre className = "bg-gray-900 text-gray-200 p-3 rounded text-sm mb-3 font-mono whitespace-pre-wrap break-words overflow-wrap-anywhere " >
161161 < code className = "language-sql" > { content } </ code >
162162 </ pre >
163163 </ div >
@@ -219,7 +219,7 @@ const ChatMessage = ({ type, content, steps, queryData, analysisInfo, confirmati
219219 < thead className = "sticky top-0 bg-gray-800 z-10" >
220220 < tr className = "border-b border-gray-700" >
221221 { Object . keys ( queryData [ 0 ] ) . map ( ( column ) => (
222- < th key = { column } className = "text-left px-3 py-2 text-gray-300 font-semibold bg-gray-800 whitespace-nowrap" >
222+ < th key = { column } className = "text-left px-3 py-2 text-gray-300 font-semibold bg-gray-800 break-words" style = { { maxWidth : '300px' , minWidth : '100px' } } >
223223 { column }
224224 </ th >
225225 ) ) }
@@ -229,7 +229,7 @@ const ChatMessage = ({ type, content, steps, queryData, analysisInfo, confirmati
229229 { queryData . map ( ( row , index ) => (
230230 < tr key = { index } className = "border-b border-gray-700/50 hover:bg-gray-700/30" >
231231 { Object . values ( row ) . map ( ( value : any , cellIndex ) => (
232- < td key = { cellIndex } className = "px-3 py-2 text-gray-200 whitespace-nowrap" >
232+ < td key = { cellIndex } className = "px-3 py-2 text-gray-200 break-words" style = { { maxWidth : '300px' , minWidth : '100px' } } >
233233 { String ( value ) }
234234 </ td >
235235 ) ) }
0 commit comments