discourse/plugins/chat/test/javascripts
Kris 98d594a7b3
FEATURE: AI header icon should remember last URL (#34108)
This change concerns these header icons

<img width="220" height="116" alt="image"
src="https://github.com/user-attachments/assets/eb7883cf-4766-4499-8d1a-116a542a2cdd"
/>


Currently the chat icon in the header switches to chat "mode" when
possible, and remembers your last forum location. The AI header icon
does not remember your last forum location, and just redirects you to
the homepage when you toggle it off.

This PR adds the last forum URL memory for the AI header icon as well. 
 
I've also updated the AI header icon to be a link when
`ai_bot_enable_dedicated_ux` is enabled, this way it can be opened in a
new tab and do all the typical link behavior (requested here:
https://meta.discourse.org/t/change-ai-bot-icon-to-link-element/377435).
It is still a button when `ai_bot_enable_dedicated_ux`, which is
appropriate for opening the composer.

This also updates the AI button title when the state changes (noted
here:
https://meta.discourse.org/t/ai-bot-header-button-title-doesnt-always-match-its-action/377402)
2025-08-08 09:12:22 +10:00
..
acceptance FEATURE: add icons and emojis to category (#31795) 2025-03-26 09:46:17 +04:00
components FEATURE: AI header icon should remember last URL (#34108) 2025-08-08 09:12:22 +10:00
helpers DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733) 2025-01-13 13:02:49 +00:00
integration/components/user-menu REFACTOR: consolidate empty states, add invite variant (#33455) 2025-07-09 12:34:04 -04:00
unit Build(deps-dev): Bump the lint group across 1 directory with 4 updates (#33881) 2025-07-28 18:02:41 +02:00
chat-fixtures.js DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733) 2025-01-13 13:02:49 +00:00