Skip to content

Commit b5c876b

Browse files
committed
fix: accept backtick DOMPurify markers and loop snapshot mocks
Match docs-bundled DOMPurify 3.4.14 version strings that use backticks, and update session status tests to mock IAgentLoopService.snapshot.
1 parent c059bde commit b5c876b

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎apps/pythinker-code/src/tui/components/markdown/markdown.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,4 @@ export class Markdown extends Container {
169169
}
170170
}
171171

172-
export { setMarkdownAltScreenActive, setMarkdownMermaidMode, setMarkdownRenderLatex, setMarkdownRenderRequester } from '../../utils/markdown-options';
172+
export { setMarkdownAltScreenActive, setMarkdownMermaidMode, setMarkdownRenderLatex, setMarkdownRenderRequester } from '#/tui/utils/markdown-options';

‎packages/agent-core-v2/test/app/sessionManager/sessionStatus.test.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ describe('Session legacy status (best-effort runtime state)', () => {
141141
[IAgentPlanService, { status: () => Promise.resolve(null) }],
142142
[IAgentDynamicWorkflowService, { isActive: false }],
143143
[IAgentTowerService, { isActive: false }],
144-
[IAgentLoopService, { status: () => ({ state: 'idle' }) }],
144+
[IAgentLoopService, { snapshot: () => ({ state: 'idle' }) }],
145145
[IAgentTaskService, { list: () => [] }],
146146
[IAgentFullCompactionService, { compacting: null }],
147147
]),
@@ -203,7 +203,7 @@ describe('Session legacy status (best-effort runtime state)', () => {
203203
[IAgentDynamicWorkflowService, { isActive: false }],
204204
[IAgentTowerService, { isActive: false }],
205205
[IModelService, { getDefaultModel: () => undefined }],
206-
[IAgentLoopService, { status: () => ({ state: 'idle' }) }],
206+
[IAgentLoopService, { snapshot: () => ({ state: 'idle' }) }],
207207
[IAgentTaskService, { list: () => [] }],
208208
[IAgentFullCompactionService, { compacting: null }],
209209
]),
@@ -274,7 +274,7 @@ describe('Session legacy status (best-effort runtime state)', () => {
274274
},
275275
},
276276
],
277-
[IAgentLoopService, { status: () => ({ state: 'idle' }) }],
277+
[IAgentLoopService, { snapshot: () => ({ state: 'idle' }) }],
278278
[IAgentTaskService, { list: () => [] }],
279279
[IAgentFullCompactionService, { compacting: null }],
280280
]),
@@ -351,7 +351,7 @@ describe('Session legacy status (best-effort runtime state)', () => {
351351
[IAgentPlanService, { status: () => Promise.resolve(null) }],
352352
[IAgentDynamicWorkflowService, { isActive: false }],
353353
[IAgentTowerService, { isActive: false }],
354-
[IAgentLoopService, { status: () => ({ state: 'idle' }) }],
354+
[IAgentLoopService, { snapshot: () => ({ state: 'idle' }) }],
355355
[IAgentTaskService, { list: () => [] }],
356356
[IAgentFullCompactionService, { compacting: null }],
357357
]),

‎scripts/security/check-artifacts.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const vulnerableCode = [
1717
/\.version\s*=\s*["']3\.2\.7["']/,
1818
/\.version\s*=\s*["']3\.4\.7["']/,
1919
];
20-
const safeCode = [/@license DOMPurify 3\.4\.14\b/, /\.version\s*=\s*["']3\.4\.14["']/];
20+
const safeCode = [/@license DOMPurify 3\.4\.14\b/, /\.version\s*=\s*["'`]3\.4\.14["'`]/];
2121

2222
function compareVersions(left, right) {
2323
const parse = (value) => value.split('-')[0].split('.').map((part) => Number.parseInt(part, 10) || 0);

0 commit comments

Comments
 (0)