-
-
Notifications
You must be signed in to change notification settings - Fork 142
Add support for image processing #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
AnthropicToolResultBlock
content 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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'.
Copilot uses AI. Check for mistakes.
@@ -99,6 +99,7 @@ export async function runServer(options: RunServerOptions): Promise<void> { | |||
) | |||
|
|||
serve({ | |||
hostname: "0.0.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot uses AI. Check for mistakes.
I forgot to say, thanks for making a pr! |
No description provided.