@@ -75,7 +75,7 @@ XPCOMUtils.defineLazyPreferenceGetter(
75
75
lazy ,
76
76
"chatProviders" ,
77
77
"browser.ml.chat.providers" ,
78
- "claude,chatgpt,gemini,lechat" ,
78
+ "claude,chatgpt,copilot, gemini,lechat" ,
79
79
reorderChatProviders
80
80
) ;
81
81
XPCOMUtils . defineLazyPreferenceGetter (
@@ -162,7 +162,7 @@ export const GenAI = {
162
162
} ,
163
163
] ,
164
164
[
165
- "https://copilot.microsoft.com" ,
165
+ "https://copilot.microsoft.com/?form=MOZCMC " ,
166
166
{
167
167
choiceIds : [
168
168
"genai-onboarding-copilot-generate" ,
@@ -1101,9 +1101,6 @@ export const GenAI = {
1101
1101
source : context . entry ,
1102
1102
} ) ;
1103
1103
1104
- await this . prepareChatPromptPrefix ( ) ;
1105
- const prompt = this . buildChatPrompt ( promptObj , context ) ;
1106
-
1107
1104
// If no provider is configured, open sidebar and wait once for onboarding
1108
1105
const { SidebarController } = context . window ;
1109
1106
@@ -1115,6 +1112,10 @@ export const GenAI = {
1115
1112
}
1116
1113
}
1117
1114
1115
+ // Build prompt after provider is confirmed to use correct length limits
1116
+ await this . prepareChatPromptPrefix ( ) ;
1117
+ const prompt = this . buildChatPrompt ( promptObj , context ) ;
1118
+
1118
1119
// Pass the prompt via GET url ?q= param or request header
1119
1120
const { header, queryParam = "q" } =
1120
1121
this . chatProviders . get ( lazy . chatProvider ) ?? { } ;
0 commit comments