From 522b4d79c3794d73c05a99a36dcfcdd949cab288 Mon Sep 17 00:00:00 2001 From: agnaidev Date: Wed, 29 Oct 2025 10:46:21 +0800 Subject: [PATCH 1/3] - pass-through chat id inference stream - remove cdn api check --- srv/api/chat/inference.ts | 2 ++ web/pages/Chat/components/InputBar.tsx | 3 +-- web/store/data/bot-generate.ts | 1 + web/store/data/inference.ts | 5 +++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/srv/api/chat/inference.ts b/srv/api/chat/inference.ts index d23db1816..14bbcf388 100644 --- a/srv/api/chat/inference.ts +++ b/srv/api/chat/inference.ts @@ -24,6 +24,7 @@ const validInference = { presetId: 'string?', jsonSchema: 'any?', imageData: 'string?', + chatId: 'string?', } as const const validInferenceApi = { @@ -414,6 +415,7 @@ export const inferenceStream = wrap(async (req, res) => { imageData: body.imageData, stop: body.stop, signal, + chatId: body.chatId, }) const requestId = body.requestId || v4() diff --git a/web/pages/Chat/components/InputBar.tsx b/web/pages/Chat/components/InputBar.tsx index aff0925a5..36e60c3e4 100644 --- a/web/pages/Chat/components/InputBar.tsx +++ b/web/pages/Chat/components/InputBar.tsx @@ -51,7 +51,6 @@ import { EVENTS, events } from '/web/emitter' import { AutoComplete } from '/web/shared/AutoComplete' import FileInput, { FileInputResult } from '/web/shared/FileInput' import AvatarIcon from '/web/shared/AvatarIcon' -import { api } from '/web/store/api' import { resizeImage } from '/web/shared/image-resize' import { ALLOWED_TYPES, imageApi } from '/web/store/data/image' import { MsgAttachment } from '/srv/adapter/type' @@ -328,7 +327,7 @@ const InputBar: Component<{
- +