MCPcopy Create free account
hub / github.com/TanStack/ai / buildTriagePrompt

Function buildTriagePrompt

examples/ts-react-chat/src/sandbox-triage.ts:323–346  ·  view source on GitHub ↗
(issue: GitHubIssue, repo: string)

Source from the content-addressed store, hash-verified

321}
322
323export function buildTriagePrompt(issue: GitHubIssue, repo: string): string {
324 return [
325 `You are triaging a GitHub issue in the ${repo} repository, which is checked`,
326 `out in your current working directory.`,
327 '',
328 `Issue #${issue.number}: ${issue.title}`,
329 `URL: ${issue.url}`,
330 '',
331 'Issue body:',
332 issue.body || '(no description provided)',
333 '',
334 'Investigate the repository to understand and triage this issue. Do NOT',
335 'change any source code — this is analysis only. Determine whether the bug',
336 'is still RELEVANT to the current code and find its root cause.',
337 '',
338 'Reply with Markdown. The VERY FIRST line MUST be exactly one of:',
339 ' VERDICT: relevant | not-relevant | uncertain',
340 'Then these sections:',
341 '## Summary',
342 '## Root cause / analysis',
343 '## Affected files',
344 '## Confidence',
345 ].join('\n')
346}
347
348/** One sandbox per (harness, provider, thread): switching a picker → fresh sandbox. */
349export function buildSandbox(opts: {

Callers 2

triagePostFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected