This commit is contained in:
nyk 2026-05-28 17:30:23 -04:00 committed by GitHub
commit e431e8ad9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 1399 additions and 2 deletions

View File

@ -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"

1384
frontend/pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -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)
}

View File

@ -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) => {

View File

@ -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

View File

@ -0,0 +1,6 @@
import DOMPurify from 'dompurify'
export function sanitizeHtml(html) {
if (!html) return ''
return DOMPurify.sanitize(html)
}

View File

@ -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)
}