@@ -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 ) => {
0 commit comments