Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for image processing by updating the Anthropic tool result content types and modifying the message handling logic to properly process mixed content types (text and images). It also includes version updates and configuration changes.
- Expanded
AnthropicToolResultBlockcontent type to support arrays of text and image blocks - Reordered tool result processing in message handling and updated content mapping
- Updated API versions and simplified base URL configuration
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/routes/messages/anthropic-types.ts | Expanded tool result content type to support image blocks |
| src/routes/messages/non-stream-translation.ts | Reordered tool result processing and updated content mapping |
| src/lib/api-config.ts | Updated versions and simplified URL configuration |
| src/start.ts | Added hostname binding configuration |
| package.json | Updated dev script with start argument |
| export const copilotBaseUrl = (state: State) => | ||
| state.accountType === "individual" ? | ||
| "https://api.githubcopilot.com" | ||
| : `https://api.${state.accountType}.githubcopilot.com` | ||
| `https://api.${state.accountType}.githubcopilot.com` |
There was a problem hiding this comment.
The simplified URL configuration removes the special case for 'individual' account types. This could break existing functionality if individual accounts require the 'api.githubcopilot.com' endpoint instead of 'api.individual.githubcopilot.com'.
| ) | ||
|
|
||
| serve({ | ||
| hostname: "0.0.0.0", |
There was a problem hiding this comment.
Binding to '0.0.0.0' exposes the server to all network interfaces, which may introduce security risks if the server is intended for localhost development only. Consider using '127.0.0.1' or making this configurable.
| hostname: "0.0.0.0", | |
| hostname: options.hostname || "127.0.0.1", // Use configurable hostname with default |
|
I forgot to say, thanks for making a pr! |
No description provided.