Repository navigation
Open
Description
Summary
As discussed in #787, this lets users turn on live web search for a resource collection, so research-style collections can use web results in every chat instead of enabling the chip each time. The global web search setting stays the master switch for privacy.
Current behaviour
- Web search in RAG is a per-session toggle:
sessionWebSearchStateinChatSessionService, set from the chip viaChatViewModel.setWebSearchInRag. - The chip is only shown in project sessions (
isProjectSession && webSearchEnabledinChatInputField), so sessions that use a resource collection can't enable web search at all today. - When web search is disabled in Settings → Web Search, the chip is silently hidden, so users don't know why it isn't there.
- The toggle lives in memory only, so it resets when the app restarts.
Proposal
- The global setting stays the master switch.
AppConfig.webSearch.enabled(Settings → Web Search → Enabled) keeps deciding whether any query may go to the web. A collection's setting can never turn web search on while it's disabled globally. - A per-collection "Use web search" option, off by default, so token usage and privacy don't change unless the user opts in.
- A warning instead of silently hiding. If a user turns on the collection option, or tries to use web search in a chat, while the global setting is off, show a message telling them to enable web search in Settings first, with a way to get there.
- The chip in resource collection sessions too, initialised from the collection's option. As you suggested, the chip overrides the collection option for that session.
- Out of scope: server-managed (TEAM_MANAGED) collections, since they retrieve remotely.
Implementation sketch
- Store the option for local collections and expose it in the collection's settings UI, disabled with the warning while global web search is off.
- When a session's active collection is resolved, use the collection's option as the default unless the user toggled the chip in that session. Global web search must be enabled for either to take effect.
- Render
webSearchRagChipfor resource collection sessions as well as project sessions, and show the warning instead of hiding it when global web search is off. - Tests for the default, the chip override, the global switch blocking both, and collections without the option.
Questions
- Where should the option live? A new column on
resource_collections(needs a migration), or a local preference keyed by collection id, given thatResourceCollectionis also synced and can be team-managed (the point you made in Make RAG citation style configurable (global setting) #793)? - Should projects get the same default (they already have the chip), or only resource collections?
- Should a session's chip choice persist across restarts, or is in-memory fine for now?
I'll work on this.
Metadata
Metadata
Assignees
Labels
No labels
Activity