Skip to content

Commit 11173f1

Browse files
committed
Update DeepSeek is_generating detection to use SVG path selector
1 parent 4d1c539 commit 11173f1

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

  • apps/browser/src/content-scripts/send-prompt-content-script/chatbots

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,10 @@ export const deepseek: Chatbot = {
105105

106106
observe_for_responses({
107107
chatbot_name: 'DeepSeek',
108-
is_generating: () => {
109-
const textarea = document.querySelector('textarea')
110-
if (!textarea) {
111-
return false
112-
}
113-
return (
114-
!!document.querySelector(
115-
'input[type="file"] + div[aria-disabled="false"]'
116-
) && !textarea.value
117-
)
118-
},
108+
is_generating: () =>
109+
!!document.querySelector(
110+
'path[d="M2 4.88C2 3.68009 2 3.08013 2.30557 2.65954C2.40426 2.52371 2.52371 2.40426 2.65954 2.30557C3.08013 2 3.68009 2 4.88 2H11.12C12.3199 2 12.9199 2 13.3405 2.30557C13.4763 2.40426 13.5957 2.52371 13.6944 2.65954C14 3.08013 14 3.68009 14 4.88V11.12C14 12.3199 14 12.9199 13.6944 13.3405C13.5957 13.4763 13.4763 13.5957 13.3405 13.6944C12.9199 14 12.3199 14 11.12 14H4.88C3.68009 14 3.08013 14 2.65954 13.6944C2.52371 13.5957 2.40426 13.4763 2.30557 13.3405C2 12.9199 2 12.3199 2 11.12V4.88Z"]'
111+
),
119112
footer_selector: 'div.ds-message + div > div.ds-flex',
120113
add_buttons: params.inject_button ? add_buttons : undefined
121114
})

0 commit comments

Comments
 (0)