mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: resolve TypeScript type error for agent property in fetch
- Use spread operator with type assertion for Node.js-specific agent property - Ensures compatibility with standard RequestInit type while allowing HTTPS agent
This commit is contained in:
parent
a158c21e8c
commit
b73bd7cded
1 changed files with 2 additions and 1 deletions
|
|
@ -859,10 +859,11 @@ export class McpHub {
|
|||
// Custom fetch function that includes the HTTPS agent
|
||||
reconnectingEventSourceOptions.fetch = (url: string | URL, init: RequestInit) => {
|
||||
const headers = new Headers({ ...(init?.headers || {}), ...(configInjected.headers || {}) })
|
||||
// Use type assertion for Node.js-specific agent property
|
||||
return fetch(url, {
|
||||
...init,
|
||||
headers,
|
||||
agent: agent as any,
|
||||
...({ agent } as any),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue