diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index d94287d59..c13afa8fe 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -40,6 +40,9 @@ ### Fixed - Removed the `read` exemption from the centralized artifact spill wrapper. Oversized read results now persist to a recoverable session artifact and return the configured inline head/tail instead of bypassing the threshold shared by other tools. +### Fixed + +- Fixed DuckDuckGo web search under-returning requests above the first-page result count by submitting the returned continuation form until the requested limit is reached ([#7116](https://github.com/can1357/oh-my-pi/issues/7116)). ## [17.2.1] - 2026-07-30 diff --git a/packages/coding-agent/src/web/search/providers/duckduckgo.ts b/packages/coding-agent/src/web/search/providers/duckduckgo.ts index f8343d7fb..173d35156 100644 --- a/packages/coding-agent/src/web/search/providers/duckduckgo.ts +++ b/packages/coding-agent/src/web/search/providers/duckduckgo.ts @@ -110,6 +110,25 @@ function parseHtmlResults(html: string): ParsedResult[] { } return results; } +/** + * Extract the hidden fields from DDG's next-page form. + * + * Attribute order varies across responses, so each input tag is parsed + * independently instead of matching one fixed HTML layout. + */ +function parseContinuationForm(html: string): URLSearchParams | undefined { + for (const formMatch of html.matchAll(/