Skip to content

Commit a1479cb

Browse files
committed
Remove temperature, top p, and thinking budget settings and UI components
- current behavior: web configurations are shown in panel only. Expected behavior: web configurations are shown in settings as well. - move `apps/editor/src/views/shared/components/EditWebConfigurationForm` to `apps/editor/src/views/components/EditWebConfigurationForm` - remove the ability to set temperature and top_p - disallow setting thinking budget
1 parent ae00a71 commit a1479cb

59 files changed

Lines changed: 8 additions & 1022 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/browser/src/background/message-handler.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ const process_next_chat = async () => {
7272
current_chat: {
7373
url: current_chat_message.url,
7474
model: current_chat_message.model,
75-
temperature: current_chat_message.temperature,
7675
reasoning_effort: current_chat_message.reasoning_effort,
77-
thinking_budget: current_chat_message.thinking_budget,
78-
top_p: current_chat_message.top_p,
7976
system_instructions: current_chat_message.system_instructions,
8077
options: current_chat_message.options
8178
},

‎apps/browser/src/content-scripts/send-prompt-content-script/chatbots/ai-studio.ts‎

Lines changed: 0 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,6 @@ export const ai_studio: Chatbot = {
141141
}
142142
await new Promise((r) => requestAnimationFrame(r))
143143
},
144-
set_temperature: async (chat) => {
145-
const temperature = chat.temperature
146-
if (temperature === undefined) return
147-
const temperature_element = document.querySelector(
148-
'ms-prompt-run-settings div[data-test-id="temperatureSliderContainer"] input[inputmode="decimal"]'
149-
) as HTMLInputElement
150-
if (!temperature_element) {
151-
report_initialization_error({
152-
function_name: 'set_temperature',
153-
log_message: 'Temperature input not found'
154-
})
155-
return
156-
}
157-
temperature_element.value = temperature.toString()
158-
temperature_element.dispatchEvent(new Event('change', { bubbles: true }))
159-
},
160144
set_reasoning_effort: async (chat) => {
161145
const reasoning_effort = chat.reasoning_effort
162146
if (!reasoning_effort) return
@@ -204,105 +188,6 @@ export const ai_studio: Chatbot = {
204188

205189
await new Promise((r) => requestAnimationFrame(r))
206190
},
207-
set_thinking_budget: async (chat) => {
208-
const thinking_budget = chat.thinking_budget
209-
if (thinking_budget === undefined) {
210-
const thinking_toggle = document.querySelector(
211-
'mat-slide-toggle[data-test-toggle="enable-thinking"] button'
212-
) as HTMLElement
213-
if (thinking_toggle?.getAttribute('aria-checked') == 'false') {
214-
return
215-
}
216-
217-
const manual_budget_toggle = document.querySelector(
218-
'mat-slide-toggle[data-test-toggle="manual-budget"] button'
219-
) as HTMLElement
220-
if (!manual_budget_toggle) {
221-
report_initialization_error({
222-
function_name: 'set_thinking_budget',
223-
log_message: 'Manual budget toggle not found'
224-
})
225-
return
226-
}
227-
if (manual_budget_toggle.getAttribute('aria-checked') == 'true') {
228-
manual_budget_toggle.click()
229-
await new Promise((r) => requestAnimationFrame(r))
230-
}
231-
} else {
232-
const thinking_toggle = document.querySelector(
233-
'mat-slide-toggle[data-test-toggle="enable-thinking"] button'
234-
) as HTMLElement
235-
if (!thinking_toggle) {
236-
report_initialization_error({
237-
function_name: 'set_thinking_budget',
238-
log_message: 'Thinking toggle not found'
239-
})
240-
return
241-
}
242-
if (thinking_toggle.getAttribute('aria-checked') == 'false') {
243-
thinking_toggle.click()
244-
await new Promise((resolve) => setTimeout(resolve, 250))
245-
}
246-
const manual_budget_toggle = document.querySelector(
247-
'mat-slide-toggle[data-test-toggle="manual-budget"] button'
248-
) as HTMLElement
249-
if (!manual_budget_toggle) {
250-
report_initialization_error({
251-
function_name: 'set_thinking_budget',
252-
log_message: 'Manual budget toggle not found'
253-
})
254-
return
255-
}
256-
if (manual_budget_toggle.getAttribute('aria-checked') == 'false') {
257-
manual_budget_toggle.click()
258-
await new Promise((resolve) => setTimeout(resolve, 250))
259-
}
260-
const budget_input = document.querySelector(
261-
'div[data-test-id="user-setting-budget-animation-wrapper"] input'
262-
) as HTMLInputElement
263-
if (!budget_input) {
264-
report_initialization_error({
265-
function_name: 'set_thinking_budget',
266-
log_message: 'Budget input not found'
267-
})
268-
return
269-
}
270-
budget_input.value = thinking_budget.toString()
271-
budget_input.dispatchEvent(new Event('input', { bubbles: true }))
272-
}
273-
},
274-
set_top_p: async (chat) => {
275-
const top_p = chat.top_p
276-
if (top_p === undefined) return
277-
const settings_items = Array.from(
278-
document.querySelectorAll('div.settings-item')
279-
)
280-
const advanced_settings = settings_items.find((item) => {
281-
const title_element = item.querySelector('p.group-title')
282-
return (
283-
title_element &&
284-
title_element.textContent?.trim() == 'Advanced settings'
285-
)
286-
})
287-
if (
288-
advanced_settings &&
289-
!advanced_settings.classList.contains('expanded')
290-
) {
291-
;(advanced_settings as HTMLElement).click()
292-
await new Promise((r) => requestAnimationFrame(r))
293-
}
294-
const top_p_element = document.querySelector(
295-
'ms-prompt-run-settings div[mattooltip="Probability threshold for top-p sampling"] input[inputmode="decimal"]'
296-
) as HTMLInputElement
297-
if (!top_p_element) {
298-
report_initialization_error({
299-
function_name: 'set_top_p',
300-
log_message: 'Top-p input not found'
301-
})
302-
return
303-
}
304-
top_p_element.value = top_p.toString()
305-
},
306191
enter_message: async (params) => {
307192
const input_element = document.querySelector(
308193
'textarea[formcontrolname="promptText"]'
@@ -339,7 +224,6 @@ export const ai_studio: Chatbot = {
339224
add_apply_response_button({
340225
client_id: params.client_id,
341226
raw_instructions: params.raw_instructions,
342-
edit_format: params.edit_format,
343227
footer,
344228
get_chat_turn: (f) => f.closest('ms-chat-turn'),
345229
perform_copy: (f) => {

‎apps/browser/src/content-scripts/send-prompt-content-script/chatbots/arena.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export const arena: Chatbot = {
3737
add_apply_response_button({
3838
client_id: params.client_id,
3939
raw_instructions: params.raw_instructions,
40-
edit_format: params.edit_format,
4140
footer,
4241
get_chat_turn: (f) =>
4342
f

‎apps/browser/src/content-scripts/send-prompt-content-script/chatbots/chatgpt.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ export const chatgpt: Chatbot = {
135135
add_apply_response_button({
136136
client_id: params.client_id,
137137
raw_instructions: params.raw_instructions,
138-
edit_format: params.edit_format,
139138
footer,
140139
get_chat_turn: (f) => f.closest('.agent-turn'),
141140
perform_copy: (f) => {

‎apps/browser/src/content-scripts/send-prompt-content-script/chatbots/claude.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ export const claude: Chatbot = {
8080
add_apply_response_button({
8181
client_id: params.client_id,
8282
raw_instructions: params.raw_instructions,
83-
edit_format: params.edit_format,
8483
footer,
8584
get_chat_turn: (f) => f.closest('.group'),
8685
perform_copy: (f) => {

‎apps/browser/src/content-scripts/send-prompt-content-script/chatbots/copilot.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export const copilot: Chatbot = {
3737
add_apply_response_button({
3838
client_id: params.client_id,
3939
raw_instructions: params.raw_instructions,
40-
edit_format: params.edit_format,
4140
footer,
4241
get_chat_turn: (f) => f.closest('div[data-content="ai-message"]'),
4342
perform_copy: (f) => {

‎apps/browser/src/content-scripts/send-prompt-content-script/chatbots/deepseek.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ export const deepseek: Chatbot = {
8585
add_apply_response_button({
8686
client_id: params.client_id,
8787
raw_instructions: params.raw_instructions,
88-
edit_format: params.edit_format,
8988
footer,
9089
get_chat_turn: (f) =>
9190
f.parentElement?.parentElement?.querySelector(

‎apps/browser/src/content-scripts/send-prompt-content-script/chatbots/doubao.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ export const doubao: Chatbot = {
119119
add_apply_response_button({
120120
client_id: params.client_id,
121121
raw_instructions: params.raw_instructions,
122-
edit_format: params.edit_format,
123122
footer,
124123
get_chat_turn: (f) => f.closest('div[data-testid="receive_message"]'),
125124
perform_copy: (f) => {

‎apps/browser/src/content-scripts/send-prompt-content-script/chatbots/gemini.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ export const gemini: Chatbot = {
220220
add_apply_response_button({
221221
client_id: params.client_id,
222222
raw_instructions: params.raw_instructions,
223-
edit_format: params.edit_format,
224223
footer,
225224
get_chat_turn: (f) => f.closest('response-container'),
226225
perform_copy: (f) => {

‎apps/browser/src/content-scripts/send-prompt-content-script/chatbots/github-copilot.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export const github_copilot: Chatbot = {
3838
add_apply_response_button({
3939
client_id: params.client_id,
4040
raw_instructions: params.raw_instructions,
41-
edit_format: params.edit_format,
4241
footer,
4342
get_chat_turn: (f) => f.closest('div.message-container') as HTMLElement,
4443
perform_copy: (f) => {

0 commit comments

Comments
 (0)