Closed Bug 2013393 Opened 7 months ago Closed 7 months ago

Implement search handoff Option 1 - automatic run_search tool with SERP content retrieval, reworked

Categories

(Core :: Machine Learning: General, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox149 --- fixed

People

(Reporter: again, Assigned: again, NeedInfo)

References

(Blocks 4 open bugs)

Details

(Whiteboard: [genai][models])

Attachments

(1 file)

Implement Option 1 (Ideal Happy Path) of the search handoff feature for Smart Window:

  • Add run_search(generated_query) tool call that:
    1. Generates Google SERP URL from the query
    2. Opens the SERP in the main tab (moves chat to sidebar if fullscreen)
    3. Retrieves page content
    4. Returns content to LLM to continue the conversation

See Search Handoff Doc for full options comparison.

This is a rework of https://bugzilla.mozilla.org/show_bug.cgi?id=2011900 due to a patch that landed with overlapping functionality.

Add run_search tool that navigates the main tab to a SERP, extracts
page content, and returns it to the LLM to continue the conversation
in the sidebar.

This a new reworked patch of search handoff: This fixes some bugs, adds more tests, reuses components introduced in a recent patch, and addresses some prior comments in the prev patch.

Assignee: nobody → again
Attachment #9541054 - Attachment description: WIP: Bug 2013393 - Implement search handoff with run_search tool ? → Bug 2013393 - Implement search handoff with run_search tool
Status: NEW → ASSIGNED
Attachment #9541054 - Attachment description: Bug 2013393 - Implement search handoff with run_search tool → Bug 2013393 - Implement search handoff with run_search tool ?
Attachment #9541054 - Attachment description: Bug 2013393 - Implement search handoff with run_search tool ? → Bug 2013393 - Implement search handoff Option 1 - automatic run_search tool with SERP content retrieval, reworked
Attachment #9541054 - Attachment description: Bug 2013393 - Implement search handoff Option 1 - automatic run_search tool with SERP content retrieval, reworked → Bug 2013393 - Implement search handoff with run_search tool ?
Pushed by again@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/71e4ebe69c99 https://hg.mozilla.org/integration/autoland/rev/729384e861fd Implement search handoff with run_search tool ? r=ai-frontend-reviewers,ai-models-reviewers,bjohns,omarg
Pushed by imoraru@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/93f1c1f6c187 https://hg.mozilla.org/integration/autoland/rev/c2a5ee9b2e87 Revert "Bug 2013393 - Implement search handoff with run_search tool ? r=ai-frontend-reviewers,ai-models-reviewers,bjohns,omarg" for causing bc failures on browser_conversation_stream.js.

Revert for causing bc failures on browser_conversation_stream.js.

[task 2026-02-03T19:21:24.096+00:00] 19:21:24     INFO - TEST-PASS | browser/components/aiwindow/models/tests/browser/browser_conversation_stream.js | test_chat_tool_call_get_page_content - Tool result recorded - 1 == 1
[task 2026-02-03T19:21:24.097+00:00] 19:21:24     INFO - got content: Error retrieving content from http://localhost:33577/test-page.html.
[task 2026-02-03T19:21:24.097+00:00] 19:21:24     INFO - Buffered messages finished
[task 2026-02-03T19:21:24.100+00:00] 19:21:24     INFO - TEST-UNEXPECTED-FAIL | browser/components/aiwindow/models/tests/browser/browser_conversation_stream.js | test_chat_tool_call_get_page_content - Page content should be extracted - false == true
[task 2026-02-03T19:21:24.100+00:00] 19:21:24     INFO - chrome://mochitests/content/browser/browser/components/aiwindow/models/tests/browser/browser_conversation_stream.js:test_chat_tool_call_get_page_content/<:239
[task 2026-02-03T19:21:24.100+00:00] 19:21:24     INFO - chrome://mochitests/content/browser/browser/components/aiwindow/models/tests/browser/head.js:withServer:267
[task 2026-02-03T19:21:24.100+00:00] 19:21:24     INFO - chrome://mochitests/content/browser/browser/components/aiwindow/models/tests/browser/browser_conversation_stream.js:test_chat_tool_call_get_page_content:203
[task 2026-02-03T19:21:24.100+00:00] 19:21:24     INFO - chrome://mochikit/content/browser-test.js:handleTask:1302
[task 2026-02-03T19:21:24.100+00:00] 19:21:24     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1392
[task 2026-02-03T19:21:24.100+00:00] 19:21:24     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1539
[task 2026-02-03T19:21:24.100+00:00] 19:21:24     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1282
[task 2026-02-03T19:21:24.100+00:00] 19:21:24     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1063
[task 2026-02-03T19:21:24.101+00:00] 19:21:24     INFO - Leaving test test_chat_tool_call_get_page_content
[task 2026-02-03T19:21:24.101+00:00] 19:21:24     INFO - GECKO(3611) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmpmnz51ki1.mozrunner/runtests_leaks_tab_pid4070.log
[task 2026-02-03T19:21:24.102+00:00] 19:21:24     INFO - GECKO(3611) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmpmnz51ki1.mozrunner/runtests_leaks_tab_pid4077.log
[task 2026-02-03T19:21:24.103+00:00] 19:21:24     INFO - GECKO(3611) | ### XPCOM_MEM_BLOAT_LOG defined -- logging bloat/leaks to /tmp/tmpmnz51ki1.mozrunner/runtests_leaks_tab_pid4084.log
[task 2026-02-03T19:21:24.385+00:00] 19:21:24     INFO - GECKO(3611) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2026-02-03T19:21:24.386+00:00] 19:21:24     INFO - GECKO(3611) | MEMORY STAT | vsize 11522MB | residentFast 468MB | heapAllocated 253MB
[task 2026-02-03T19:21:24.387+00:00] 19:21:24     INFO - checking for open sidebars
[task 2026-02-03T19:21:24.387+00:00] 19:21:24     INFO - checking window state
[task 2026-02-03T19:21:24.388+00:00] 19:21:24     INFO - Not taking screenshot here: see the one that was previously logged
[task 2026-02-03T19:21:24.388+00:00] 19:21:24     INFO - TEST-UNEXPECTED-FAIL | browser/components/aiwindow/models/tests/browser/browser_conversation_stream.js | finished in 1067ms
[task 2026-02-03T19:21:24.388+00:00] 19:21:24     INFO - TEST-INFO took 1081ms
[task 2026-02-03T19:21:24.407+00:00] 19:21:24     INFO - TEST-START | browser/components/aiwindow/models/tests/browser/browser_getCurrentTabMetadata.js
Flags: needinfo?(again)
Pushed by again@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c6ea8ea627f4 https://hg.mozilla.org/integration/autoland/rev/91c12376ddda Implement search handoff with run_search tool ? r=ai-frontend-reviewers,ai-models-reviewers,bjohns,omarg
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/40f7b67b97cf https://hg.mozilla.org/integration/autoland/rev/5d1886ba946b Revert "Bug 2013393 - Implement search handoff with run_search tool ? r=ai-frontend-reviewers,ai-models-reviewers,bjohns,omarg" for causing linting failures @ai-window.mjs.

Backed out for causing linting failures @ai-window.mjs.

Attachment #9541054 - Attachment description: Bug 2013393 - Implement search handoff with run_search tool ? → Bug 2013393 - Implement search handoff with run_search tool ? r=ai-frontend-reviewers,ai-models-reviewers,bjohns,omarg
Attachment #9541054 - Attachment description: Bug 2013393 - Implement search handoff with run_search tool ? r=ai-frontend-reviewers,ai-models-reviewers,bjohns,omarg → Bug 2013393 - Implement search handoff with run_search tool
Attachment #9541054 - Attachment description: Bug 2013393 - Implement search handoff with run_search tool → Bug 2013393 - Implement search handoff with run_search tool ? r=ai-frontend-reviewers,ai-models-reviewers,bjohns,omarg
Pushed by again@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6ad9e14e8fc5 https://hg.mozilla.org/integration/autoland/rev/acfc5836a942 Implement search handoff with run_search tool ? r=ai-frontend-reviewers,ai-models-reviewers,bjohns,omarg
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 149 Branch
Depends on: 2014802
Regressions: 2015162
Blocks: 2018027
Blocks: 2017989
Duplicate of this bug: 2011900
Blocks: 2018283
Blocks: 2019644
QA Whiteboard: [qa-triage-done-c150/b149]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: