mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-14 04:01:35 +00:00
fix(desktop): adapt host fetch handlers
This commit is contained in:
@@ -193,6 +193,7 @@ function assetHandler(ctx: Context, projectDir: string): ConnectionFetchHandler
|
||||
return new Response(body, { headers: { 'content-type': MIME['.html'] ?? 'text/html; charset=utf-8' } })
|
||||
}
|
||||
return {
|
||||
requestBodyMode: () => 'buffered',
|
||||
async fetch(request): Promise<Response> {
|
||||
if (request.method !== 'GET' && request.method !== 'HEAD') return new Response(null, { status: 405 })
|
||||
const url = new URL(request.url)
|
||||
@@ -221,6 +222,7 @@ function assetHandler(ctx: Context, projectDir: string): ConnectionFetchHandler
|
||||
|
||||
function remoteStreamHandler(ctx: Context): ConnectionFetchHandler {
|
||||
return {
|
||||
requestBodyMode: () => 'buffered',
|
||||
async fetch(request): Promise<Response> {
|
||||
if (request.method !== 'POST') return new Response(null, { status: 405 })
|
||||
const gateway = ctx.get('typertGateway')
|
||||
|
||||
Reference in New Issue
Block a user