Merge af5c1c6841 into 96096ea0ff
This commit is contained in:
commit
e431e8ad9b
|
|
@ -11,6 +11,7 @@
|
|||
"dependencies": {
|
||||
"axios": "^1.14.0",
|
||||
"d3": "^7.9.0",
|
||||
"dompurify": "^3.3.3",
|
||||
"vue": "^3.5.24",
|
||||
"vue-i18n": "^11.3.0",
|
||||
"vue-router": "^4.6.3"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -467,10 +467,12 @@ let statusTimer = null
|
|||
let detailTimer = null
|
||||
|
||||
const startStatusPolling = () => {
|
||||
if (statusTimer) clearInterval(statusTimer)
|
||||
statusTimer = setInterval(fetchRunStatus, 2000)
|
||||
}
|
||||
|
||||
const startDetailPolling = () => {
|
||||
if (detailTimer) clearInterval(detailTimer)
|
||||
detailTimer = setInterval(fetchRunStatusDetail, 3000)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@ import { ref, computed, watch, onMounted, onUnmounted, nextTick, h, reactive } f
|
|||
import { useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { getAgentLog, getConsoleLog } from '../api/report'
|
||||
import { sanitizeHtml } from '../utils/sanitize.js'
|
||||
|
||||
const router = useRouter()
|
||||
const { t } = useI18n()
|
||||
|
|
@ -1973,7 +1974,7 @@ const renderMarkdown = (content) => {
|
|||
}
|
||||
html = tokens.join('')
|
||||
|
||||
return html
|
||||
return sanitizeHtml(html)
|
||||
}
|
||||
|
||||
const getTimelineItemClass = (log, idx, total) => {
|
||||
|
|
|
|||
|
|
@ -414,6 +414,7 @@
|
|||
import { ref, computed, watch, onMounted, onUnmounted, nextTick } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { chatWithReport, getReport, getAgentLog } from '../api/report'
|
||||
import { sanitizeHtml } from '../utils/sanitize.js'
|
||||
import { interviewAgents, getSimulationProfilesRealtime } from '../api/simulation'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
|
@ -638,7 +639,7 @@ const renderMarkdown = (content) => {
|
|||
}
|
||||
html = tokens.join('')
|
||||
|
||||
return html
|
||||
return sanitizeHtml(html)
|
||||
}
|
||||
|
||||
// Chat Methods
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
import DOMPurify from 'dompurify'
|
||||
|
||||
export function sanitizeHtml(html) {
|
||||
if (!html) return ''
|
||||
return DOMPurify.sanitize(html)
|
||||
}
|
||||
|
|
@ -297,6 +297,7 @@ const startBuildGraph = async () => {
|
|||
const startGraphPolling = () => {
|
||||
addLog('Started polling for graph data...')
|
||||
fetchGraphData()
|
||||
if (graphPollTimer) clearInterval(graphPollTimer)
|
||||
graphPollTimer = setInterval(fetchGraphData, 10000)
|
||||
}
|
||||
|
||||
|
|
@ -320,6 +321,7 @@ const fetchGraphData = async () => {
|
|||
|
||||
const startPollingTask = (taskId) => {
|
||||
pollTaskStatus(taskId)
|
||||
if (pollTimer) clearInterval(pollTimer)
|
||||
pollTimer = setInterval(() => pollTaskStatus(taskId), 2000)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue