File tree Expand file tree Collapse file tree
apps/browser/src/content-scripts/send-prompt-content-script/chatbots Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import browser from 'webextension-polyfill'
2+ import { Message } from '@/types/messages'
13import { Chatbot } from '../types/chatbot'
24import { CHATBOTS } from '@shared/constants/chatbots'
35import { show_response_ready_notification } from '../utils/show-response-ready-notification'
@@ -436,7 +438,15 @@ export const ai_studio: Chatbot = {
436438 ( span ) => span . textContent ?. trim ( ) == 'thumb_up'
437439 )
438440 if ( has_thumb_up ) {
439- show_response_ready_notification ( { chatbot_name : 'AI Studio' } )
441+ const has_apply_button = ! ! footer . querySelector (
442+ '.cwc-apply-response-button'
443+ )
444+ if ( ! has_apply_button ) {
445+ browser . runtime . sendMessage < Message > ( {
446+ action : 'finished-responding'
447+ } )
448+ show_response_ready_notification ( { chatbot_name : 'AI Studio' } )
449+ }
440450 add_buttons ( footer )
441451 }
442452 } )
You can’t perform that action at this time.
0 commit comments