Repository navigation
feat: add optional you.com search integration - #154
Open
brainsparker wants to merge 1 commit into
Open
brainsparker wants to merge 1 commit into
brainsparker wants to merge 1 commit into
Conversation
3 of 6 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I work at You.com, so treat the recommendation accordingly.(先说明:我在 You.com 工作。)
本 PR 在 Multi Search Engine 里加入一个
youcom引擎。它默认关闭(enabled: false),不改变现有默认引擎顺序和duckduckgo_instant默认 provider。用户在多引擎配置里启用后才会调用。改动
src/components/settings-v2/system/web-search/webSearchConfig.ts:DEFAULT_MSE_ENGINES增加youcom,url_template为https://api.you.com/v1/agents/search?query={query},默认关闭。lime-rs/crates/core/src/config/types.rs与lime-rs/crates/tool-runtime/src/web_search/support.rs:Rust 侧默认引擎列表同步增加同一条目(默认关闭)。lime-rs/crates/tool-runtime/src/web_search.rs:api.you.com、ydc-index.io),走 JSON 解析,不走 HTML 链接抽取。YDC_API_KEY:GET免密钥端点(每个 IP 每天 100 次)。设置后:POST https://ydc-index.io/v1/search,带X-API-Key。results.web[]和results.news[]映射为SearchResult(description + snippets 作为 snippet,page_age作为 publish_date)。Retry-After。失败只记入failed_engines,不影响其他引擎。User-Agent: youdotcom-integration/limecloud-lime。timeout_ms与max_results_per_engine(count 上限 20)。web_search.rs增加 2 个单元测试(默认关闭、JSON 解析、错误信息),webSearchConfig.unit.test.ts增加 1 个用例。验证
npm run lint:通过。npm run typecheck:通过。vitest run src/components/settings-v2/system/web-search:3 个文件,43 个用例通过。web_search.rswere added but NOT run locally, and the Rust code was not compiled here (not enough disk). Please treat it as unverified until CI orcargo test -p tool-runtimeruns. 新增的 Rust 单元测试未在本地运行,Rust 代码也未在本地编译。说明
youcom加说明文字,我会补齐 zh-CN、zh-TW、en-US、ja-JP、ko-KR。