feat(ai): optionally preselect fast or smart model when opening Ask AI (#22679)

Allow front components to preselect the AI model when opening the Ask AI
side panel with a preprompt.

- Add an optional `model: 'FAST' | 'SMART'` to the preprompt in the
  openSidePanelPage AskAI params of the front-component SDK.
- openAskAiPageWithPreprompt resolves FAST to the workspace fast model
  and SMART to the workspace default (null selection = pinned default
  model), writing to agentChatUserSelectedModelState.
This commit is contained in:
Weiko
2026-07-08 22:52:38 +02:00
committed by GitHub
parent 78a0f9ea77
commit 97e21c3403
3 changed files with 24 additions and 0 deletions
@@ -203,6 +203,7 @@ export const useFrontComponentExecutionContext = ({
openAskAiPageWithPreprompt({
text: params.preprompt.text,
mode: params.preprompt.mode,
model: params.preprompt.model,
});
if (params.shouldResetSearchState === true) {