Integrates You.com chatbot in web-mode using session cookie. Supports conversation history + "create" chatMode (image generation).#834
Conversation
Integrates You.com chatbot using session cookie. Supports conversation history + "create" chatMode (image generation).
Integrates You.com chatbot using session cookie. Supports conversation history + "create" chatMode (image generation).
Integrates You.com chatbot using session cookie. Supports conversation history + "create" chatMode (image generation).
…n history + "create" chatMode (image generation). Integrates You.com chatbot using session cookie. Supports conversation history + "create" chatMode (image generation).1
…n history + "create" chatMode (image generation). Integrates You.com chatbot using session cookie. Supports conversation history + "create" chatMode (image generation).
…n history + "create" chatMode (image generation). Integrates You.com chatbot using session cookie. Supports conversation history + "create" chatMode (image generation).
There was a problem hiding this comment.
Pull Request Overview
Integrates You.com chatbot in web mode by fetching a session cookie, streaming conversation history via SSE, and supporting “create” mode for image generation.
- Adds
getYouSessionKeyalongside existing session-cookie helpers. - Implements
generateAnswersWithYouWebApifor streaming chat responses. - Extends config and background logic to include You.com model keys and routing.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/services/wrappers.mjs | Added getYouSessionKey to retrieve You.com session cookie. |
| src/services/apis/you-web.mjs | New SSE-based API client for You.com chat and create modes. |
| src/config/index.mjs | Registered You.com model keys, groups, and default modes. |
| src/background/index.mjs | Routed You.com requests in the main execution flow. |
Comments suppressed due to low confidence (2)
src/services/apis/you-web.mjs:1
- New API wrapper
generateAnswersWithYouWebApiandgenerateUUIDhelper lack associated unit tests. Please add tests to cover streaming logic, error handling, and different chat modes.
// path/to/services/apis/you-web.mjs
src/config/index.mjs:418
- The
activeApiModesarray was completely replaced by You.com keys, removing all existing default modes (e.g., chatgptFree35, bingFree4). Please merge You.com entries into the existing list rather than overwriting it.
'create',
| gptApiInstruct: { value: 'gpt-3.5-turbo-instruct', desc: 'GPT-3.5-turbo Instruct' }, | ||
| gptApiDavinci: { value: 'text-davinci-003', desc: 'GPT-3.5' }, | ||
|
|
||
| create: { value: 'create', desc: 'YouWeb create' }, |
There was a problem hiding this comment.
Duplicate create key in the Models object (also defined at line 251). Please remove or consolidate one of the definitions to avoid key collisions.
| create: { value: 'create', desc: 'YouWeb create' }, | |
| // Removed duplicate 'create' key to avoid key collisions |
| // Handle start if needed | ||
| }, | ||
| onEnd() { | ||
| finishMessage() |
There was a problem hiding this comment.
Calling finishMessage() here will push the record and post a completed message, but the onEnd callback also calls finishMessage(), leading to duplicate pushes and messages. Consider invoking it in only one place.
| finishMessage() | |
| if (!isFinished) { | |
| finishMessage() | |
| isFinished = true | |
| } |
| method: 'GET', | ||
| signal: controller.signal, | ||
| headers: { | ||
| 'Content-Type': 'text/event-stream;charset=utf-8', |
There was a problem hiding this comment.
[nitpick] For SSE GET requests, it's more appropriate to set an Accept: 'text/event-stream' header instead of Content-Type to signal the expected response format.
| 'Content-Type': 'text/event-stream;charset=utf-8', | |
| 'Accept': 'text/event-stream', |
|
/review |
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
/improve |
|
Qodo Merge was enabled for this repository. To continue using it, please link your Git account with your Qodo account here. PR Code Suggestions ✨
|
||||||||||||||
Integrates You.com chatbot using session cookie. Supports conversation history + "create" chatMode (image generation).