@@ -4,6 +4,7 @@ import { leftPart } from '@servicestack/client'
44import { Chart , registerables } from "chart.js"
55import { QueryDb , QueryResponse } from "dtos"
66import { Marked } from "marked"
7+ import hljs from "highlight.js"
78
89Chart . register ( ...registerables )
910
@@ -318,7 +319,7 @@ const LogDetailDialog = {
318319 <!-- Code view (default) -->
319320 <div v-if="!preview" class="bg-gray-50 dark:bg-gray-900 rounded-md p-3 text-sm text-gray-900 dark:text-gray-100 whitespace-pre-wrap">{{ log.answer?.trim() }}</div>
320321 <!-- Preview view (rendered markdown) -->
321- <div v-else class="bg-gray-50 dark:bg-gray-900 rounded-md p-3 text-sm text-gray-900 dark:text-gray-100 prose dark:prose-invert max-w-none" v-html="renderMarkdown(log.answer?.trim())"></div>
322+ <div v-else class="bg-gray-50 dark:bg-gray-900 rounded-md p-3 text-sm text-gray-900 dark:text-gray-100 prose prose-sm dark:prose-invert max-w-none" v-html="renderMarkdown(log.answer?.trim())"></div>
322323 </div>
323324
324325 <!-- Error -->
@@ -333,13 +334,13 @@ const LogDetailDialog = {
333334 <!-- Request Body -->
334335 <div v-if="log.requestBody">
335336 <h3 class="text-sm font-medium text-gray-900 dark:text-gray-100 mb-2">Request Body</h3>
336- <pre class="bg-gray-50 dark:bg-gray-900 rounded-md p-3 text-xs text-gray-900 dark:text-gray-100 overflow-x-auto">{{ formatJson(log.requestBody) }} </pre>
337+ <pre class="whitespace-pre-wrap"><code :key="log.id" lang="json" class="language-json text-sm" v-highlightjs=" formatJson(log.requestBody)"></code> </pre>
337338 </div>
338339
339340 <!-- Response Body -->
340341 <div v-if="log.responseBody">
341342 <h3 class="text-sm font-medium text-gray-900 dark:text-gray-100 mb-2">Response Body</h3>
342- <pre class="bg-gray-50 dark:bg-gray-900 rounded-md p-3 text-xs text-gray-900 dark:text-gray-100 overflow-x-auto">{{ formatJson(log.responseBody) }} </pre>
343+ <pre class="whitespace-pre-wrap"><code :key="log.id" lang="json" class="language-json text-sm" v-highlightjs=" formatJson(log.responseBody)"></code> </pre>
343344 </div>
344345 </div>
345346 </div>
@@ -389,6 +390,7 @@ const LogDetailDialog = {
389390 if ( nextLog ) {
390391 props . routes . to ( { show : nextLog . id } )
391392 }
393+ hljs . highlightAll ( )
392394 }
393395
394396 // Handle keyboard navigation
@@ -1673,7 +1675,6 @@ export const AdminChat = {
16731675 }
16741676}
16751677
1676- const hljs = globalThis . hljs
16771678export const marked = ( ( ) => {
16781679 const aliases = {
16791680 vue : 'html' ,
0 commit comments