Skip to content

Commit 67b9973

Browse files
committed
Simplify tab reuse logic by removing prompt type checks for apply response buttons
1 parent a635eb7 commit 67b9973

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

apps/browser/src/background/message-handler.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,11 @@ const process_next_chat = async () => {
103103
target_url = `${current_chat_message.url}#cwc-${batch_id}`
104104
}
105105

106-
const expects_apply_response_button =
107-
current_chat_message.prompt_type == 'edit-context' ||
108-
current_chat_message.prompt_type == 'code-at-cursor' ||
109-
current_chat_message.prompt_type == 'find-relevant-files'
110-
111106
let tab_reused = false
112107
if (
113108
last_opened_tab_id !== undefined &&
114109
current_chat_message.reuse_last_tab &&
115-
(!expects_apply_response_button || is_finished_responding)
110+
is_finished_responding
116111
) {
117112
try {
118113
const tab = await browser.tabs.get(last_opened_tab_id)

apps/browser/src/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "Autofill for Code Web Chat",
55
"short_name": "CWC",
66
"description": "Got tired with copy and paste? Enable prompt autofill!",
7-
"version": "1.108.0",
7+
"version": "1.109.0",
88
"homepage_url": "https://github.com/robertpiosik/CodeWebChat",
99
"icons": {
1010
"16": "icons/icon-16.png",

0 commit comments

Comments
 (0)