Skip to content

feat(tool): browser search bing engine & app updater #253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 21, 2025
Merged

Conversation

ycjcl868
Copy link
Collaborator

  • feat(tool): browser search bing engine
  • feat(agent-tars): app updater

@ycjcl868 ycjcl868 changed the title feat/browser search feat(tool): browser search bing engine & app updater Mar 21, 2025
Copy link

codecov bot commented Mar 21, 2025

Codecov Report

Attention: Patch coverage is 0% with 20 lines in your changes missing coverage. Please review.

Project coverage is 4.69%. Comparing base (775a4e6) to head (fce1443).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ch/browser-search/src/engines/get-search-engine.ts 0.00% 5 Missing ⚠️
apps/agent-tars/src/main/customTools/search.ts 0.00% 3 Missing ⚠️
apps/agent-tars/src/main/index.ts 0.00% 3 Missing ⚠️
...-infra/search/browser-search/src/browser-search.ts 0.00% 3 Missing ⚠️
apps/agent-tars/src/main/ipcRoutes/action.ts 0.00% 2 Missing ⚠️
apps/agent-tars/src/main/ipcRoutes/llm.ts 0.00% 1 Missing ⚠️
.../components/LeftSidebar/Settings/useAppSettings.ts 0.00% 1 Missing ⚠️
packages/agent-infra/browser/src/base-browser.ts 0.00% 1 Missing ⚠️
.../agent-infra/shared/src/agent-tars-types/search.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #253      +/-   ##
========================================
- Coverage   4.70%   4.69%   -0.01%     
========================================
  Files        253     253              
  Lines       7756    7769      +13     
  Branches    1447    1450       +3     
========================================
  Hits         365     365              
- Misses      7351    7364      +13     
  Partials      40      40              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ulivz ulivz merged commit 23495b8 into main Mar 21, 2025
8 of 10 checks passed
@ulivz ulivz deleted the feat/browser-search branch March 21, 2025 11:10
pageFunction: searchEngine.extractSearchResults,
pageFunctionParams: [],
beforePageLoad: async (page) => {
await interceptRequest(page);
},
afterPageLoad: async (page) => {
await page.waitForSelector('.b_pag');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是不是会导致 local browser search 只能在 bing 下面工作?baidu 现在现在不 work 了

@@ -119,11 +121,17 @@ export class BrowserSearch {

let links = await browser.evaluateOnNewPage({
url,
waitForOptions: {
waitUntil: 'networkidle0',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里还有个 Breaking Change,之前 Browser Search 是采用默认值 networkidle2,现在是 networkidle0,Browser Search 这种场景 networkidle2 应该够用了

Refs:

  • 如果你需要尽快捕获页面(比如只需要 DOM 加载完成,不关心后续的异步请求),用 networkidle2。
  • 如果你需要确保页面所有资源(包括图片、脚本等)都加载完成,用 networkidle0。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

试了下 networkidle2 拿不到数据,失败概率比较高

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants