Find
Search dashboard pages and product views.
Repositories
Evidence Refs
Run Artifacts
Trace Refs
Replay Entry
Search dashboard pages and product views.
These are repository signals used to attribute this repo to the product. They are not code written by the agent; they are matched package, middleware, environment, API, or UI locations found in the repository.
| Repository Signal | Matched Source | Matched Code Location | Preview |
|---|---|---|---|
source | fetchDirect(): raw fetch(url) with a browser UAthen html = await resp.text(); markdown = htmlToMarkdown(html). | packages/polywise/src/fetch/direct.tsline 5 | Preview |
source | htmlToMarkdown is built on TurndownService (turndown)removing script/style/meta/link/noscript. | packages/polywise/src/fetch/runtime.tsline 6 | Preview |
1import { spawn } from 'child_process'2import TurndownService from 'turndown'3 4import { getRuntimeCommandEnv, resolveCommand } from '../utils/resolveCommand'5 6const turndown = new TurndownService({7 headingStyle: 'atx',8 hr: '---',9 bulletListMarker: '-',10 codeBlockStyle: 'fenced',11 emDelimiter: '*'12})13 14turndown.remove(['script', 'style', 'meta', 'link', 'noscript'])15 16export const htmlToMarkdown = (html: string) => {17 return turndown.turndown(html)18}19 20export const trimContent = (content: string, max_chars: number) => {21 const normalized_content = content.trim()22 23 return {24 content: normalized_content.slice(0, max_chars),25 truncated: normalized_content.length > max_chars26 }27}28 29export const extractTitleFromContent = (content: string) => {30 const lines = content1import { htmlToMarkdown, trimContent } from './runtime'2 3import type { FetchProviderHandler } from './types'4 5const fetchDirect: FetchProviderHandler = async ({ url, max_chars }) => {6 const resp = await fetch(url, {7 signal: AbortSignal.timeout(15000),8 headers: {9 'User-Agent':10 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36',11 Accept: 'text/html,application/xhtml+xml,*/*'12 }13 })14 15 if (!resp.ok) {16 throw new Error(`HTTP ${resp.status}`)17 }18 19 const html = await resp.text()20 const markdown = htmlToMarkdown(html)21 22 if (!markdown.trim()) {23 throw new Error('Direct fetch returned empty content')24 }25 26 return {27 ok: true,28 source: 'direct',29 ...trimContent(markdown, max_chars)30 }31}32 33export default fetchDirect34