Commit Graph

64 Commits

Author SHA1 Message Date
Tim Xia
a66c86e121 Bug 1932930 Add "Writing & Grammar Check" option to list of AI Chatbot Prompts, r=Mardak,fluent-reviewers,bolsson,firefox-ai-ml-reviewers
- Name of Promopt Option: "Proofread" (subject to change)
- Updated default prefix prompt so it is more robust for LLM to understand what "selection" refers to
- Annotate prompt variables at replacement so we don't have to update l10nId or original prefix string
- Remove unnecessary NBSP
- Remove nightly targeting for proofread
- Update tests in test_build_chat_prompt.js

Differential Revision: https://phabricator.services.mozilla.com/D229954
2024-12-12 00:17:27 +00:00
Ed Lee
7138179e8f Bug 1905027 - There should be a Keyboard shortcut for the AI chat sidebar r=sidebar-reviewers,sclements,fluent-reviewers,flod,ngrato
Toggle chatbot with Ctrl-Alt-X / Ctrl-X macOS enabling if necessary. Record event on using keyboard shortcut.

Differential Revision: https://phabricator.services.mozilla.com/D226205
2024-12-11 09:01:57 +00:00
Nick Grato
585702e09a Bug 1922379 - Add error message for when too many characters are selected before selecting a prompt r=Mardak,fluent-reviewers,desktop-theme-reviewers,tabbrowser-reviewers,bolsson,firefox-ai-ml-reviewers,emilio
Use moz-message-bar warning to conditionally show long selection warning.

Differential Revision: https://phabricator.services.mozilla.com/D225895
2024-12-10 08:18:11 +00:00
Sandor Molnar
aab5624276 Backed out changeset 85e2f9195dc0 (bug 1905027) for causing failures @ test_no_errors_clean_profile 2024-12-05 23:37:36 +02:00
Ed Lee
4d9a31854e Bug 1905027 - There should be a Keyboard shortcut for the AI chat sidebar r=sidebar-reviewers,sclements,fluent-reviewers,flod,ngrato
Toggle chatbot with Ctrl-Alt-X / Ctrl-X macOS enabling if necessary. Record event on using keyboard shortcut.

Differential Revision: https://phabricator.services.mozilla.com/D226205
2024-12-05 18:31:34 +00:00
Tim Xia
1527c04f7e Bug 1930166 - Update Chatbot to meet UX spec, r=Mardak,desktop-theme-reviewers,firefox-ai-ml-reviewers,hjones
- Add border radius of 4px to select and buttons
- Add padding left and right for header
- Reduce caret-padding 'cause now we have left-padding from header
- First moz-button should have 4px margin spacing on the right
- Add margin-block: var(--space-xsmall) to select element to make header 40px.

Differential Revision: https://phabricator.services.mozilla.com/D228680
2024-12-04 20:09:11 +00:00
Logan Rosen
d24c9d9ff4 Bug 1857834 - auto-formatting with Prettier v3 r=linter-reviewers,webdriver-reviewers,perftest-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,reusable-components-reviewers,profiler-reviewers,dom-storage-reviewers,android-reviewers,firefox-ai-ml-reviewers,hjones,mcheang,mstange,sparky,janv,nchevobbe,tarek,Standard8,markh
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D230598
2024-11-29 15:18:25 +00:00
Tim Xia
940a632657 Bug 1922630 - Header of chatbot panel is themable like the history, tabs, r=Mardak,firefox-ai-ml-reviewers
- Use variables from theme for background-color and color in chat-ui
- Changed moz-button to be type of "icon ghost"
- Header background is updated 'cause moz-button bg-color is transparent
- use --button-* token styles for select hover

Differential Revision: https://phabricator.services.mozilla.com/D228456
2024-11-09 05:43:20 +00:00
Tim Xia
3309fc0d8a Bug 1922628 - Move dropdown arrow for provider select to the left in the chatbot panel r=Mardak,firefox-ai-ml-reviewers
- Adjust arrow with background-position
- Changes for Eric Pang's design spec, 16px on the left padding, 8px on the gap between caret and text

Differential Revision: https://phabricator.services.mozilla.com/D228106
2024-11-06 23:13:15 +00:00
Mark Banner
3832e2355f Bug 1927798 - Re-enable the curly rule for ESLint. r=frontend-codestyle-reviewers,mossop
This was accidentally disabled in bug 1920531 with the re-organisation of how eslint-plugin-mozilla worked.
The rule needs to be (re)enabled after eslint-config-prettier is applied, as eslint-config-prettier turns it off by default.

Differential Revision: https://phabricator.services.mozilla.com/D227621
2024-11-01 14:15:01 +00:00
Tamas Szentpeteri
7aa7c6235f Backed out changeset 08df39c35f9d (bug 1905027) as requested by Mardak for causing 1927304. CLOSED TREE 2024-10-27 18:38:15 +02:00
Ed Lee
8be1336fa3 Bug 1926932 - Add assets for future enabling Copilot r=ngrato,fluent-reviewers
Add icon and strings and update configs. Update huggingchat string.

Differential Revision: https://phabricator.services.mozilla.com/D226816
2024-10-26 06:43:23 +00:00
Ed Lee
0e72f5e021 Bug 1905027 - There should be a Keyboard shortcut for the AI chat sidebar r=sidebar-reviewers,sclements,fluent-reviewers,flod,ngrato
Toggle chatbot with accel-shift-i enabling if necessary. Record event on using keyboard shortcut.

Differential Revision: https://phabricator.services.mozilla.com/D226205
2024-10-25 14:33:50 +00:00
Norisz Fay
327e2a6efe Backed out changeset 298bca8a48dc (bug 1905027) for causing multiple dt failures 2024-10-23 23:47:43 +03:00
Ed Lee
3896deb1b4 Bug 1905027 - There should be a Keyboard shortcut for the AI chat sidebar r=sidebar-reviewers,sclements,fluent-reviewers,flod,ngrato
Toggle chatbot with accel-shift-i enabling if necessary. Record event on using keyboard shortcut.

Differential Revision: https://phabricator.services.mozilla.com/D226205
2024-10-23 17:42:19 +00:00
Nick Grato
c0f370837e Bug 1926336 - Selecting provider during onboarding shows preview but no details r=Mardak
Changed the action object in previous commit, values are now set to appropriate config

Differential Revision: https://phabricator.services.mozilla.com/D226542
2024-10-22 22:18:55 +00:00
Nick Grato
ab6a5b86cb Bug 1922376 - [UX Follow] Provider select onboarding - On select of a provider, preview in the background r=Mardak
Loading the providers in the background once the user has selected them but has not yet chosen the provider to be a pref

Differential Revision: https://phabricator.services.mozilla.com/D226199
2024-10-21 23:40:49 +00:00
Sarah Clements
0980f19cc6 Bug 1924107 - Add missing title and aria attributes to menu buttons in sidebar r=Mardak,sidebar-reviewers,fluent-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D226010
2024-10-21 13:20:58 +00:00
Norisz Fay
abd7b89b34 Backed out changeset cfc9c8d13810 (bug 1924107) for causing sidebar related failures 2024-10-18 22:13:55 +03:00
Sarah Clements
c8749c7247 Bug 1924107 - Add missing title and aria attributes to menu buttons in sidebar r=Mardak,sidebar-reviewers,fluent-reviewers,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D226010
2024-10-18 13:41:49 +00:00
Ed Lee
b241ea258a Bug 1905898 - ChatGPT, HuggingChat and LeChat Mistral AI's are returning server Errors for trying to analyze large pieces of Text r=ngrato
Refactor length calculation with even more conservative adjustments. Point to copilot instead of bing but still hidden.

Differential Revision: https://phabricator.services.mozilla.com/D226076
2024-10-18 00:01:59 +00:00
Nick Grato
b39c324f5f Bug 1922626 - In the change provider dropdown update the --- divider to be a full division line r=Mardak
Switch from option to hr

Differential Revision: https://phabricator.services.mozilla.com/D225871
2024-10-16 20:46:40 +00:00
Ed Lee
75132e2162 Bug 1911104 - Chatbot telemetry for 133 nimbus experiment with onboarding and menus r=tarek
Record onboarding events with AWSendEventTelemetry converted to chatbot glean. Instrument various menus including more, provider, shortcuts.

Differential Revision: https://phabricator.services.mozilla.com/D223938
2024-10-12 16:50:57 +00:00
Ed Lee
f568a27e32 Bug 1916274 - Improve nimbus chatbot behaviors, e.g., rollout and slugs r=tarek
Fix experiment vs rollout priority. Save full slug. Init on import no longer need test uninit. Enforce minimum versions.

Differential Revision: https://phabricator.services.mozilla.com/D223937
2024-10-03 13:51:55 +00:00
Ed Lee
82294b3cb0 Bug 1920778 - Enable custom prompts by default with multiline autosize r=tarek
Enable in all channels. Check for size on input and handle enter.

Differential Revision: https://phabricator.services.mozilla.com/D223930
2024-10-01 19:51:09 +00:00
Ed Lee
7ff0a56191 Bug 1903900 - Better handle different chat provider GET request limits for long text selection r=tarek
Still approximate but slightly smarter per-provider prompt max length limits.

Differential Revision: https://phabricator.services.mozilla.com/D223943
2024-10-01 12:26:39 +00:00
Ed Lee
2e7894ed89 Bug 1909986 - For sidebar revamp, only show chatbot entrypoints (context menu, shortcuts) when tools include aichat r=tarek
Convert existing entrypoint checks to getter that also checks sidebar.

Differential Revision: https://phabricator.services.mozilla.com/D223690
2024-09-28 01:53:48 +00:00
Ed Lee
f49fbbe7c7 Bug 1918481 - Exclude chatbot queries from History results r=tarek
Set disableglobalhistory attribute and use earlier test to verify lack of history.

Differential Revision: https://phabricator.services.mozilla.com/D223476
2024-09-27 19:03:19 +00:00
Ed Lee
2d91a6f6ef Bug 1921388 - Additional styling polish for chatbot onboarding r=tarek,desktop-theme-reviewers,hjones
Adjust various colors, sizes. Use crisp edges for lechat.

Differential Revision: https://phabricator.services.mozilla.com/D223902
2024-09-27 18:36:48 +00:00
Ed Lee
92ec028ba5 Bug 1920102 - Update chatbot header controls r=tarek,fluent-reviewers
Populate menu popup on more button. Handle showing/hiding shortcut including from shortcut. Add reshow onboarding from provider list.

Differential Revision: https://phabricator.services.mozilla.com/D223267
2024-09-26 06:44:45 +00:00
Ed Lee
f89496d229 Bug 1914977 - In-sidebar chatbot initial onboarding r=tarek,desktop-theme-reviewers,fluent-reviewers,bolsson,hjones
Reuse welcome bundle for sidebar onboarding. Add/reuse icons including brands and import-export. Expose onboarding strings for localization.

Differential Revision: https://phabricator.services.mozilla.com/D220155
2024-09-25 23:01:19 +00:00
Ed Lee
0f53e2f734 Bug 1911631 - Disable shortcuts in the input fields r=tarek
Allow ignoring various input fields starting with <input>.

Differential Revision: https://phabricator.services.mozilla.com/D222804
2024-09-19 16:27:46 +00:00
Ed Lee
de85a49a56 Bug 1912564 - More shortcuts triggering and hiding improvements r=tarek
Check for selection change instead of just having a selection. Support inputs/textarea selection. Hide before unload.

Differential Revision: https://phabricator.services.mozilla.com/D219105
2024-08-14 10:53:09 +00:00
Ed Lee
5856999dde Bug 1912080 - Chatbot prompt prefix string missing from localization r=tarek,fluent-reviewers,flod
Allow prefix pref to be json with l10nId that allows localization.

Differential Revision: https://phabricator.services.mozilla.com/D218804
2024-08-08 11:55:10 +00:00
Ed Lee
54766e0f44 Bug 1911748 - Chatbot: too much insistent -> shortcuts Icon every where ( when using the touchpad ) r=tarek
Allow the long press delay to be pref controlled with a higher default 200ms -> 60s effectively turning it off. Record the delay with glean.

Differential Revision: https://phabricator.services.mozilla.com/D218662
2024-08-07 19:41:20 +00:00
Ed Lee
45dd052bc0 Bug 1911888 - if text selected somewhere on page and a link clicked with middle mouse button/mousewheel (to open it in a new tab), generative AI popup button gets shown but shouldn't r=tarek
Ignore modified clicks to only support plain clicks.

Differential Revision: https://phabricator.services.mozilla.com/D218672
2024-08-07 14:32:37 +00:00
Ed Lee
5450fb19b4 Bug 1911173 - Update the shortcut text selection UX focusing on mouseup instead of keyboard r=tarek
Immediately show shortcuts on mouseup with selection or detect mousedown/mouseup timing for long press.

Differential Revision: https://phabricator.services.mozilla.com/D218417
2024-08-05 07:53:38 +00:00
Ed Lee
991ab9bfa1 Bug 1905042 - The AI Chat Sidebar stays open when the user disables the AI chat integration feature from the Experiments page r=tarek
Detect enabled switched to false and close sidebar if on chatbot.

Differential Revision: https://phabricator.services.mozilla.com/D218480
2024-08-03 17:12:48 +00:00
Ed Lee
3cf73b5fe9 Bug 1910063 - Avoid perma TV genai_init with matching uninit r=tarek
Differential Revision: https://phabricator.services.mozilla.com/D218475
2024-08-03 07:11:06 +00:00
Ed Lee
035e010fe9 Bug 1907350 - Expose genai-settings-chat-title and other chatbot strings for localization r=tarek,fluent-reviewers,mconley,bolsson
Move featuregate title to features.ftl used by about:preferences and about:support; and other strings to genai.ftl. Allow prompts to use l10nId to get fluent attributes. Convert inline strings for menu and shortcuts to fluent. Update simplify, add explain prompts.

Differential Revision: https://phabricator.services.mozilla.com/D218279
2024-08-03 06:40:26 +00:00
Ed Lee
7fcb70613f Bug 1910005 - Expose chat shortcuts pref as part of experimental subitem r=tarek,fluent-reviewers,settings-reviewers,desktop-theme-reviewers,dao,mstriemer
Switch default shortcuts enabled with labs checkbox to disable and labs visibility. Add metric and event telemetry for shortcuts pref and usage. Bump pip labs ordering up one.

Differential Revision: https://phabricator.services.mozilla.com/D217782
2024-08-03 04:19:46 +00:00
Noemi Erli
5578e35afb Backed out changeset c9ad93d58c14 (bug 1910005) for causing bustages in GleanMetrics.h CLOSED TREE 2024-08-03 06:17:37 +03:00
Ed Lee
0e362c1019 Bug 1910005 - Expose chat shortcuts pref as part of experimental subitem r=tarek,fluent-reviewers,settings-reviewers,desktop-theme-reviewers,dao,mstriemer
Switch default shortcuts enabled with labs checkbox to disable and labs visibility. Add metric and event telemetry for shortcuts pref and usage. Bump pip labs ordering up one.

Differential Revision: https://phabricator.services.mozilla.com/D217782
2024-08-03 02:46:23 +00:00
Ed Lee
28b3b1086d Bug 1911124 - Support chatbot provider list configuration via pref to hide r=tarek
Add hidden providers pref to reorder and show/hide providers including localhost with its existing pref.

Differential Revision: https://phabricator.services.mozilla.com/D218387
2024-08-02 08:25:15 +00:00
Ed Lee
4ef77f9229 Bug 1909642 - Firefox Labs does not load the AI provider list if the user Starts Firefox and enables the AI chatbot integration right after startup r=tarek
Also check for existing preferences at init to build.

Differential Revision: https://phabricator.services.mozilla.com/D218271
2024-08-01 14:50:55 +00:00
Ed Lee
feb0477b8b Bug 1910067 - Allow focusing shortcuts chat prompts r=tarek
Add tabindex to make toolbarbuttons focusable via the accessibility API.

Differential Revision: https://phabricator.services.mozilla.com/D218270
2024-08-01 14:16:31 +00:00
Ed Lee
7f99bc3758 Bug 1910509 - Add nimbus variables for chatbot configuration r=tarek
Allow setting user and default branch prefs specified in the nimbus variable for chatbot.

Differential Revision: https://phabricator.services.mozilla.com/D218045
2024-07-31 17:29:43 +00:00
Ed Lee
2a0610e953 Bug 1905750 - Display shortcuts on text selection r=tarek
Detect selection to show shortcut icon near the cursor. Open panel with prompts when hovering the icon. Hide these on various events that might move content or no selection.

Differential Revision: https://phabricator.services.mozilla.com/D217545
2024-07-26 07:23:00 +00:00
Ed Lee
1dd2819331 Bug 1905750 - Stub actors and panel to display content-area shortcuts on text selection r=tarek,desktop-theme-reviewers,tabbrowser-reviewers,firefox-desktop-core-reviewers ,dao
Add default false shortcuts pref to control GenAI actors initially detecting text selection. Prepare content-area elements that stack on top of tab's browser.

Differential Revision: https://phabricator.services.mozilla.com/D217544
2024-07-26 07:22:59 +00:00
Ed Lee
4158d9c453 Bug 1907246 - Add Anthropic Claude to chatbot provider list r=tarek,fluent-reviewers
Use ?q= to start while we figure out how to generalize &attachment=.

Differential Revision: https://phabricator.services.mozilla.com/D216242
2024-07-11 20:41:31 +00:00