Skip to content

Commit 25d353d

Browse files
committed
Remove unused get_chat_turn property from add_apply_response_button and chatbot content scripts
- remove 'get chat turn'
1 parent 73df562 commit 25d353d

21 files changed

Lines changed: 0 additions & 43 deletions

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ export const ai_studio: Chatbot = {
225225
client_id: params.client_id,
226226
raw_instructions: params.raw_instructions,
227227
footer,
228-
get_chat_turn: (f) => f.closest('ms-chat-turn'),
229228
perform_copy: (f) => {
230229
const chat_turn_container = f.closest('.chat-turn-container')
231230
if (!chat_turn_container) {

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ export const arena: Chatbot = {
3838
client_id: params.client_id,
3939
raw_instructions: params.raw_instructions,
4040
footer,
41-
get_chat_turn: (f) =>
42-
f
43-
.closest('.bg-surface-primary')
44-
?.querySelector('div.prose') as HTMLElement,
4541
perform_copy: (f) => {
4642
const copy_button = f.querySelector(
4743
'button:has([d="M15 9V4.6C15 4.26863 14.7314 4 14.4 4H4.6C4.26863 4 4 4.26863 4 4.6V14.4C4 14.7314 4.26863 15 4.6 15H9"])'

‎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
@@ -84,7 +84,6 @@ export const chatgpt: Chatbot = {
8484
client_id: params.client_id,
8585
raw_instructions: params.raw_instructions,
8686
footer,
87-
get_chat_turn: (f) => f.closest('.agent-turn'),
8887
perform_copy: (f) => {
8988
const copy_button = f.querySelector(
9089
'button[data-testid="copy-turn-action-button"]'

‎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
@@ -86,7 +86,6 @@ export const claude: Chatbot = {
8686
client_id: params.client_id,
8787
raw_instructions: params.raw_instructions,
8888
footer,
89-
get_chat_turn: (f) => f.closest('.group'),
9089
perform_copy: (f) => {
9190
const copy_button = f.querySelector(
9291
'button:first-child'

‎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
@@ -38,7 +38,6 @@ export const copilot: Chatbot = {
3838
client_id: params.client_id,
3939
raw_instructions: params.raw_instructions,
4040
footer,
41-
get_chat_turn: (f) => f.closest('div[data-content="ai-message"]'),
4241
perform_copy: (f) => {
4342
const copy_button = f.querySelector(
4443
'button[data-testid="copy-ai-message-button"]'

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,6 @@ export const deepseek: Chatbot = {
109109
client_id: params.client_id,
110110
raw_instructions: params.raw_instructions,
111111
footer,
112-
get_chat_turn: (f) =>
113-
f.parentElement?.parentElement?.querySelector(
114-
'.ds-markdown'
115-
) as HTMLElement,
116112
perform_copy: (f) => {
117113
const copy_button = f.querySelector(
118114
'div[role="button"]'

‎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
@@ -120,7 +120,6 @@ export const doubao: Chatbot = {
120120
client_id: params.client_id,
121121
raw_instructions: params.raw_instructions,
122122
footer,
123-
get_chat_turn: (f) => f.closest('div[data-testid="receive_message"]'),
124123
perform_copy: (f) => {
125124
const copy_button = f.querySelector(
126125
'button[data-testid="message_action_copy"]'

‎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
@@ -221,7 +221,6 @@ export const gemini: Chatbot = {
221221
client_id: params.client_id,
222222
raw_instructions: params.raw_instructions,
223223
footer,
224-
get_chat_turn: (f) => f.closest('response-container'),
225224
perform_copy: (f) => {
226225
const copy_button = f.querySelector(
227226
'copy-button button'

‎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
@@ -39,7 +39,6 @@ export const github_copilot: Chatbot = {
3939
client_id: params.client_id,
4040
raw_instructions: params.raw_instructions,
4141
footer,
42-
get_chat_turn: (f) => f.closest('div.message-container') as HTMLElement,
4342
perform_copy: (f) => {
4443
const copy_button = f.querySelector(
4544
'button:nth-of-type(3)'

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export const grok: Chatbot = {
6161
client_id: params.client_id,
6262
raw_instructions: params.raw_instructions,
6363
footer,
64-
get_chat_turn: (f) => f.closest('.items-start'),
6564
perform_copy: (f) => {
6665
const copy_button = f.querySelector(
6766
'button:first-child'

0 commit comments

Comments
 (0)