feat: add 5 lines context around search matches in accessibilitySnapshot, getCleanHTML, getLatestLogs

This commit is contained in:
Tommy D. Rossi
2026-01-12 15:36:51 +01:00
parent 2498b523a3
commit 7e7edac856
3 changed files with 94 additions and 18 deletions
+2 -1
View File
@@ -979,7 +979,8 @@ describe('MCP Server Tests', () => {
const errorOutput = (errorLogsResult as any).content[0].text
expect(errorOutput).toContain('[error] Test error 67890')
expect(errorOutput).not.toContain('[log] Test log 12345')
// With context lines (5 above/below), nearby logs are also included
expect(errorOutput).toContain('[log] Test log 12345')
// Test that logs are cleared on page reload
await client.callTool({