Skip to content

Commit d97aedb

Browse files
committed
Remove redundant change events and commit message auto-accept timeout setting across all chatbot integrations and editor components
1 parent ee9afc5 commit d97aedb

30 files changed

Lines changed: 15 additions & 160 deletions

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Code Web Chat (CWC) is a free and open-source, independent AI coding toolkit for
1515

1616
✅ **Integrate multi-file edits from chat responses** \
1717
✅ **Automatic checkpoints for easy rollback** \
18-
✅ **Presets for any task**
18+
✅ **Create presets for repeated tasks**
1919

2020
<p>
2121
<img src="https://github.com/robertpiosik/CodeWebChat/raw/HEAD/packages/shared/src/media/screenshot.png" alt="Screenshot" />

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ export const ai_studio: Chatbot = {
8181

8282
textarea.value = system_instructions
8383
textarea.dispatchEvent(new Event('input', { bubbles: true }))
84-
textarea.dispatchEvent(new Event('change', { bubbles: true }))
8584

8685
close_button.click()
8786
await new Promise((r) => requestAnimationFrame(r))
@@ -309,7 +308,6 @@ export const ai_studio: Chatbot = {
309308
}
310309
budget_input.value = thinking_budget.toString()
311310
budget_input.dispatchEvent(new Event('input', { bubbles: true }))
312-
budget_input.dispatchEvent(new Event('change', { bubbles: true }))
313311
}
314312
},
315313
set_top_p: async (chat) => {
@@ -343,7 +341,6 @@ export const ai_studio: Chatbot = {
343341
return
344342
}
345343
top_p_element.value = top_p.toString()
346-
top_p_element.dispatchEvent(new Event('change', { bubbles: true }))
347344
},
348345
enter_message: async (params) => {
349346
const input_element = document.querySelector(
@@ -358,7 +355,6 @@ export const ai_studio: Chatbot = {
358355
}
359356
input_element.value = params.message
360357
input_element.dispatchEvent(new Event('input', { bubbles: true }))
361-
input_element.dispatchEvent(new Event('change', { bubbles: true }))
362358
await new Promise((r) => requestAnimationFrame(r))
363359
await new Promise((resolve) => {
364360
const check = () => {

‎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
@@ -31,7 +31,6 @@ export const arena: Chatbot = {
3131
}
3232
input_element.value = params.message
3333
input_element.dispatchEvent(new Event('input', { bubbles: true }))
34-
input_element.dispatchEvent(new Event('change', { bubbles: true }))
3534
},
3635
inject_apply_response_button: (
3736
client_id: number,

‎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
@@ -129,7 +129,6 @@ export const chatgpt: Chatbot = {
129129
}
130130
input_element.innerText = params.message
131131
input_element.dispatchEvent(new Event('input', { bubbles: true }))
132-
input_element.dispatchEvent(new Event('change', { bubbles: true }))
133132
},
134133
inject_apply_response_button: (
135134
client_id: number,

‎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
@@ -125,7 +125,6 @@ export const claude: Chatbot = {
125125

126126
input_element.innerText = params.message
127127
input_element.dispatchEvent(new Event('input', { bubbles: true }))
128-
input_element.dispatchEvent(new Event('change', { bubbles: true }))
129128
input_element.focus()
130129
},
131130
inject_apply_response_button: (

‎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
@@ -31,7 +31,6 @@ export const copilot: Chatbot = {
3131
}
3232
input_element.value = params.message
3333
input_element.dispatchEvent(new Event('input', { bubbles: true }))
34-
input_element.dispatchEvent(new Event('change', { bubbles: true }))
3534
},
3635
inject_apply_response_button: (
3736
client_id: number,

‎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
@@ -79,7 +79,6 @@ export const deepseek: Chatbot = {
7979
}
8080
input_element.value = params.message
8181
input_element.dispatchEvent(new Event('input', { bubbles: true }))
82-
input_element.dispatchEvent(new Event('change', { bubbles: true }))
8382
},
8483
inject_apply_response_button: (
8584
client_id: number,

‎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
@@ -113,7 +113,6 @@ export const doubao: Chatbot = {
113113
}
114114
input_element.value = params.message
115115
input_element.dispatchEvent(new Event('input', { bubbles: true }))
116-
input_element.dispatchEvent(new Event('change', { bubbles: true }))
117116
},
118117
inject_apply_response_button: (
119118
client_id: number,

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ export const gemini: Chatbot = {
138138
const input_element = document.querySelector(
139139
'div[contenteditable="true"]'
140140
) as HTMLElement
141+
141142
if (!input_element) {
142143
report_initialization_error({
143144
function_name: 'gemini.enter_message',
@@ -148,7 +149,7 @@ export const gemini: Chatbot = {
148149

149150
input_element.innerText = params.message
150151
input_element.dispatchEvent(new Event('input', { bubbles: true }))
151-
input_element.dispatchEvent(new Event('change', { bubbles: true }))
152+
input_element.focus()
152153
},
153154
inject_apply_response_button: (
154155
client_id: number,

‎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
@@ -94,7 +94,6 @@ export const github_copilot: Chatbot = {
9494
}
9595
input_element.value = params.message
9696
input_element.dispatchEvent(new Event('input', { bubbles: true }))
97-
input_element.dispatchEvent(new Event('change', { bubbles: true }))
9897
input_element.focus()
9998
},
10099
inject_apply_response_button: (

0 commit comments

Comments
 (0)