Skip to content

Commit d89b4b3

Browse files
committed
Merge branch 'dev'
2 parents d8db948 + f7963f3 commit d89b4b3

18 files changed

Lines changed: 157 additions & 64 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
Unlimited AI coding in free chatbots for VS Code, Cursor and Windsurf. The best privacy, accuracy and speed.
66

7-
Free and open-source. Join our [discord server](https://discord.gg/KJySXsrSX5) and get involed!
7+
❤️ **Free and open-source.** _Join our [discord server](https://discord.gg/KJySXsrSX5) and get involed!_
88

9-
✅ **Initializes chatbots**—ChatGPT, Claude, Gemini, AI Studio, and 10+ more \
9+
✅ **Initializes chatbots**—ChatGPT, Claude, Gemini, AI Studio, Qwen, and 10+ more \
1010
✅ **Applies responses**—multi-file changes integration with easy rollback \
1111
✅ **Batteries included**—code completions, commit messages, and more
1212

@@ -23,15 +23,15 @@ Code Web Chat only starts new conversations. This idea is borrowed from [Firefox
2323
> [!NOTE]
2424
> The _Apply response_ button placed under responses is not a means of automatic output extraction, it's an alias for the original _copy to clipboard_ button.
2525
26-
🤓 **Control over "agency"**
26+
🧠 **Master model guidance through context ownership**
2727

2828
Large language models (LLMs) are trained on vast datasets targeting many use cases. For code generation, a model's training involves analyzing millions of simulated problem-solving flows, such as arriving at the accepted answer from a given StackOverflow question. For the purpose of agentic coding, models are trained on an additional layer of data that simulates gathering context and planning its next steps.
2929

3030
Because the model is only as smart as examples it has seen in its pre-training stage, the possible coverage of real-world scenarios when approached at a high level is fundamentally limited.
3131

3232
Therefore, CWC is designed to align with LLMs' true capabilities—that is, code generation in a controlled signal-to-noise ratio environment. Controlled by you, the engineer.
3333

34-
🤝 **Meet non-agentic workflow**
34+
🤝 **Meet the non-agentic workflow**
3535

3636
Select folders and files for context, enter instructions, and send message via...
3737

‎packages/browser/src/content-scripts/send-prompt-content-script/chatbots/chatgpt.ts‎

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,35 @@ import {
1111

1212
export const chatgpt: Chatbot = {
1313
wait_until_ready: async () => {
14-
await new Promise((resolve) => {
15-
const check_for_element = () => {
16-
if (
17-
document.querySelector(
18-
'span[data-testid="blocking-initial-modals-done"]'
19-
)
20-
) {
21-
resolve(null)
22-
} else {
23-
setTimeout(check_for_element, 100)
14+
const url = new URL(window.location.href)
15+
if (url.pathname == '/') {
16+
await new Promise((resolve) => {
17+
const check_for_element = () => {
18+
if (
19+
document.querySelector(
20+
'span[data-testid="blocking-initial-modals-done"]'
21+
)
22+
) {
23+
resolve(null)
24+
} else {
25+
setTimeout(check_for_element, 100)
26+
}
2427
}
25-
}
26-
check_for_element()
27-
})
28+
check_for_element()
29+
})
30+
} else {
31+
// User used custom path url for a "project"
32+
await new Promise((resolve) => {
33+
const check_for_element = () => {
34+
if (document.querySelector('textarea')) {
35+
resolve(null)
36+
} else {
37+
setTimeout(check_for_element, 100)
38+
}
39+
}
40+
check_for_element()
41+
})
42+
}
2843
},
2944
set_options: async (options?: string[]) => {
3045
if (!options) return
@@ -57,23 +72,19 @@ export const chatgpt: Chatbot = {
5772
} else {
5873
report_initialization_error({
5974
function_name: 'set_options',
60-
log_message: 'Temporary chat button not found',
61-
alert_message: InitializationError.UNABLE_TO_SET_OPTIONS
75+
log_message: 'Temporary chat button not found'
76+
// Don't show alert because temporary mode doesn't work in projects (url override)
6277
})
6378
}
64-
} else if (
65-
option == 'think-longer' &&
66-
supported_options['think-longer']
67-
) {
79+
} else if (option == 'thinking' && supported_options['thinking']) {
6880
const plus_button = document.querySelector(
6981
'button[data-testid="composer-plus-btn"]'
7082
) as HTMLButtonElement
7183
if (plus_button) {
7284
plus_button.dispatchEvent(
7385
new PointerEvent('pointerdown', { bubbles: true })
7486
)
75-
await new Promise((r) => requestAnimationFrame(r))
76-
87+
await new Promise((resolve) => setTimeout(resolve, 500))
7788
const menu_items = document.querySelectorAll(
7889
'div[role="menuitemradio"]'
7990
)

‎packages/browser/src/content-scripts/send-prompt-content-script/chatbots/perplexity.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ import {
1010

1111
export const perplexity: Chatbot = {
1212
wait_until_ready: async () => {
13+
const url = new URL(window.location.href)
14+
if (url.pathname != '/') {
15+
// User used custom path url for a "space"
16+
await new Promise((resolve) => {
17+
const check_for_element = () => {
18+
if (document.querySelector('div[contenteditable="true"]')) {
19+
resolve(null)
20+
} else {
21+
setTimeout(check_for_element, 100)
22+
}
23+
}
24+
check_for_element()
25+
})
26+
}
1327
await new Promise((resolve) => setTimeout(resolve, 500))
1428
if (window.innerWidth <= 768) {
1529
;(document.querySelector('[contenteditable="true"]') as any)?.click()

‎packages/browser/src/content-scripts/send-prompt-content-script/utils/report-initialization-error.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ export enum InitializationError {
2020
export const report_initialization_error = (params: {
2121
function_name: string
2222
log_message: string
23-
alert_message: InitializationError
23+
alert_message?: InitializationError
2424
}) => {
2525
Logger.error({
2626
function_name: params.function_name,
2727
message: params.log_message
2828
})
29-
alert(`${params.alert_message}. Please open an issue.`)
29+
if (params.alert_message) {
30+
alert(`${params.alert_message}. Please open an issue.`)
31+
}
3032
}

‎packages/browser/src/manifest.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "Code Web Chat Connector",
55
"short_name": "CWC",
66
"description": "Connect your editor with free chatbots. Parse websites for context.",
7-
"version": "1.61.0",
7+
"version": "1.62.0",
88
"homepage_url": "https://github.com/robertpiosik/CodeWebChat",
99
"icons": {
1010
"16": "icons/icon-16.png",
@@ -25,7 +25,7 @@
2525
{
2626
"matches": [
2727
"https://aistudio.google.com/prompts/new_chat",
28-
"https://chatgpt.com/",
28+
"https://chatgpt.com/*",
2929
"https://claude.ai/new",
3030
"https://copilot.microsoft.com/",
3131
"https://chat.deepseek.com/",
@@ -40,7 +40,7 @@
4040
"https://chat.mistral.ai/chat",
4141
"http://openwebui/",
4242
"https://openrouter.ai/chat*",
43-
"https://www.perplexity.ai/",
43+
"https://www.perplexity.ai/*",
4444
"https://chat.qwen.ai/",
4545
"https://chat.together.ai/",
4646
"https://yuanbao.tencent.com/chat*",

‎packages/shared/src/constants/chatbots.ts‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ type Chatbots = {
88
supports_user_provided_port: boolean
99
supports_reasoning_effort: boolean
1010
supports_thinking_budget: boolean
11+
supports_url_override: boolean
1112
default_system_instructions: string
1213
default_top_p: number
1314
supported_options: {
@@ -32,6 +33,7 @@ export const CHATBOTS = {
3233
supports_user_provided_port: false,
3334
supports_reasoning_effort: false,
3435
supports_thinking_budget: true,
36+
supports_url_override: false,
3537
default_system_instructions: "You're a helpful coding assistant.",
3638
default_top_p: 0.95,
3739
supported_options: {
@@ -69,10 +71,11 @@ export const CHATBOTS = {
6971
supports_user_provided_port: false,
7072
supports_reasoning_effort: false,
7173
supports_thinking_budget: false,
74+
supports_url_override: true,
7275
default_system_instructions: '',
7376
supported_options: {
7477
temporary: 'Temporary',
75-
'think-longer': 'Think longer (free plans)'
78+
thinking: 'Thinking (free plans)'
7679
},
7780
default_top_p: 0,
7881
models: {}
@@ -86,6 +89,7 @@ export const CHATBOTS = {
8689
supports_user_provided_port: false,
8790
supports_reasoning_effort: false,
8891
supports_thinking_budget: false,
92+
supports_url_override: false,
8993
default_system_instructions: '',
9094
supported_options: {
9195
'incognito-chat': 'Incognito chat'
@@ -106,6 +110,7 @@ export const CHATBOTS = {
106110
supports_user_provided_port: false,
107111
supports_reasoning_effort: false,
108112
supports_thinking_budget: false,
113+
supports_url_override: false,
109114
default_system_instructions: '',
110115
supported_options: {},
111116
default_top_p: 0,
@@ -126,6 +131,7 @@ export const CHATBOTS = {
126131
supports_user_provided_port: false,
127132
supports_reasoning_effort: false,
128133
supports_thinking_budget: false,
134+
supports_url_override: false,
129135
default_system_instructions: '',
130136
supported_options: { 'deep-think': 'DeepThink', search: 'Search' },
131137
default_top_p: 0,
@@ -140,6 +146,7 @@ export const CHATBOTS = {
140146
supports_user_provided_port: false,
141147
supports_reasoning_effort: false,
142148
supports_thinking_budget: false,
149+
supports_url_override: false,
143150
default_system_instructions: '',
144151
supported_options: { 'deep-thinking': 'Deep Thinking' },
145152
default_top_p: 0,
@@ -154,6 +161,7 @@ export const CHATBOTS = {
154161
supports_user_provided_port: false,
155162
supports_reasoning_effort: false,
156163
supports_thinking_budget: false,
164+
supports_url_override: false,
157165
supported_options: { 'temporary-chat': 'Temporary chat' },
158166
default_system_instructions: '',
159167
default_top_p: 0,
@@ -171,6 +179,7 @@ export const CHATBOTS = {
171179
supports_user_provided_port: false,
172180
supports_reasoning_effort: false,
173181
supports_thinking_budget: false,
182+
supports_url_override: false,
174183
default_system_instructions: '',
175184
supported_options: {},
176185
default_top_p: 0,
@@ -200,6 +209,7 @@ export const CHATBOTS = {
200209
supports_user_provided_port: false,
201210
supports_reasoning_effort: false,
202211
supports_thinking_budget: false,
212+
supports_url_override: false,
203213
default_system_instructions: '',
204214
supported_options: {},
205215
default_top_p: 0,
@@ -214,6 +224,7 @@ export const CHATBOTS = {
214224
supports_user_provided_port: false,
215225
supports_reasoning_effort: false,
216226
supports_thinking_budget: false,
227+
supports_url_override: false,
217228
default_system_instructions: '',
218229
supported_options: { private: 'Private' },
219230
default_top_p: 0,
@@ -234,6 +245,7 @@ export const CHATBOTS = {
234245
supports_user_provided_port: false,
235246
supports_reasoning_effort: false,
236247
supports_thinking_budget: false,
248+
supports_url_override: false,
237249
default_system_instructions: '',
238250
supported_options: {},
239251
default_top_p: 0,
@@ -248,6 +260,7 @@ export const CHATBOTS = {
248260
supports_user_provided_port: false,
249261
supports_reasoning_effort: false,
250262
supports_thinking_budget: false,
263+
supports_url_override: false,
251264
default_system_instructions: '',
252265
supported_options: {},
253266
default_top_p: 0,
@@ -262,6 +275,7 @@ export const CHATBOTS = {
262275
supports_user_provided_port: false,
263276
supports_reasoning_effort: false,
264277
supports_thinking_budget: false,
278+
supports_url_override: false,
265279
default_system_instructions: '',
266280
supported_options: {
267281
incognito: 'Incognito mode',
@@ -293,6 +307,7 @@ export const CHATBOTS = {
293307
supports_user_provided_port: true,
294308
supports_reasoning_effort: false,
295309
supports_thinking_budget: false,
310+
supports_url_override: false,
296311
default_system_instructions: "You're a helpful coding assistant.",
297312
supported_options: {},
298313
default_top_p: 0.9,
@@ -307,6 +322,7 @@ export const CHATBOTS = {
307322
supports_user_provided_port: false,
308323
supports_reasoning_effort: true,
309324
supports_thinking_budget: false,
325+
supports_url_override: false,
310326
default_system_instructions: "You're a helpful coding assistant.",
311327
supported_options: {
312328
'disable-reasoning': 'Disable reasoning (for hybrid models)'
@@ -323,6 +339,7 @@ export const CHATBOTS = {
323339
supports_user_provided_port: false,
324340
supports_reasoning_effort: false,
325341
supports_thinking_budget: false,
342+
supports_url_override: true,
326343
default_system_instructions: '',
327344
supported_options: {
328345
search: 'Search'
@@ -339,6 +356,7 @@ export const CHATBOTS = {
339356
supports_user_provided_port: false,
340357
supports_reasoning_effort: false,
341358
supports_thinking_budget: false,
359+
supports_url_override: false,
342360
default_system_instructions: '',
343361
supported_options: {
344362
thinking: 'Thinking',
@@ -366,6 +384,7 @@ export const CHATBOTS = {
366384
supports_user_provided_port: false,
367385
supports_reasoning_effort: false,
368386
supports_thinking_budget: false,
387+
supports_url_override: false,
369388
default_system_instructions: '',
370389
supported_options: {},
371390
default_top_p: 0,
@@ -389,6 +408,7 @@ export const CHATBOTS = {
389408
supports_user_provided_port: false,
390409
supports_reasoning_effort: false,
391410
supports_thinking_budget: false,
411+
supports_url_override: false,
392412
default_system_instructions: '',
393413
supported_options: { 'deep-think': 'DeepThink', search: 'Search' },
394414
default_top_p: 0,
@@ -406,6 +426,7 @@ export const CHATBOTS = {
406426
supports_user_provided_port: false,
407427
supports_reasoning_effort: false,
408428
supports_thinking_budget: false,
429+
supports_url_override: false,
409430
default_system_instructions: '',
410431
supported_options: {
411432
'deep-think': 'Deep Think'

‎packages/shared/src/constants/dictionary.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ export const dictionary = {
8181
TYPE_SOMETHING_TO_USE_GROUP: 'Type something to use this group.',
8282
GROUP_HAS_NO_SELECTED_PRESETS:
8383
'The chosen group has no selected presets to run.',
84+
URL_OVERRIDE_DIFFERENT_DOMAIN: (preset_name: string) =>
85+
`URL override for preset "${preset_name}" was discarded because it uses a different domain.`,
8486
CONTEXT_SIZE_WARNING: (threshold: string, percentage: number) =>
8587
`Context exceeds threshold of ${threshold} tokens by ${percentage}%. Unreasonably large context may degrade response quality, hurt plan's usage allowance or incur significant costs.`,
8688
FAILED_TO_CREATE_FILE: (file_path: string) =>

‎packages/shared/src/types/preset.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export type Preset = {
1313
system_instructions?: string
1414
options?: string[]
1515
port?: number
16+
new_url?: string
1617
is_selected?: boolean
1718
is_collapsed?: boolean
1819
}

‎packages/ui/src/components/editor/panel/ContextUtilisation/ContextUtilisation.tsx‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ export const ContextUtilisation: React.FC<Props> = (props) => {
3232
: formatted_current_size
3333

3434
let title_text = ''
35-
const context_text = is_above_threshold
36-
? `${display_current_size} tokens in context`
37-
: `${display_current_size}/${formatted_threshold} tokens in context`
3835

3936
if (!is_above_threshold) {
4037
const remaining_tokens =
@@ -43,9 +40,9 @@ export const ContextUtilisation: React.FC<Props> = (props) => {
4340
? props.current_context_size
4441
: Math.floor(props.current_context_size / 1000) * 1000)
4542
const formatted_remaining_tokens = format_tokens(remaining_tokens)
46-
title_text = `${formatted_remaining_tokens} tokens remaining until threshold warning`
43+
title_text = `${formatted_remaining_tokens} tokens remaining until threshold warning (change in settings)`
4744
} else {
48-
title_text = `Context size (${formatted_current_size}) exceeds threshold (${formatted_threshold})`
45+
title_text = `Context of size ${formatted_current_size} exceeds threshold ${formatted_threshold} by `
4946
}
5047

5148
return (
@@ -59,7 +56,7 @@ export const ContextUtilisation: React.FC<Props> = (props) => {
5956
/>
6057
</div>
6158
<span className={styles.label} title={title_text}>
62-
{context_text}
59+
{display_current_size} tokens in context
6360
</span>
6461
</div>
6562
)

0 commit comments

Comments
 (0)