fix(web): narrow default search review scope
This commit is contained in:
@@ -483,8 +483,17 @@ describe('tool-web registration', () => {
|
||||
const { fiber, ctx } = await mountTools()
|
||||
const prompt = await ctx.systemPrompt.assemble()
|
||||
const text = prompt.sections.map(s => s.text).join('\n')
|
||||
expect(text).toContain('web_search')
|
||||
expect(text).toContain('web_fetch')
|
||||
expect(text).toContain('Use the web_search tool to discover current information on the web. It returns an optional answer plus a list of source URLs. Follow up with web_fetch when you need the full content of a specific result, and cite the relevant URLs as markdown links.')
|
||||
expect(text).toContain('Use the web_fetch tool to retrieve the content of a specific HTTP(S) URL')
|
||||
await fiber.dispose()
|
||||
})
|
||||
|
||||
it('does not advertise web_fetch in search-only prompt guidance', async () => {
|
||||
const { fiber, ctx } = await mountTools({ config: { search: true, fetch: false } })
|
||||
const prompt = await ctx.systemPrompt.assemble()
|
||||
const text = prompt.sections.map(s => s.text).join('\n')
|
||||
expect(text).toContain('Use the returned source snippets when available')
|
||||
expect(text).not.toContain('web_fetch')
|
||||
await fiber.dispose()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user