fix(chat): 修复固资管理首轮问答残留中断与历史会话异常
This commit is contained in:
1 parent
25876f94bd
commit
3b771fc0b6
16 files changed
+1042
-35
No files matched your search
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* 对话页:发送消息编排(出货/请假前置拦截 → Dify SSE)、复制与重新生成。
|
||||
*/
|
||||
import { computed } from 'vue';
|
||||
@@ -28,6 +28,7 @@ export interface ChatPageSendContext {
|
||||
context?: { task_id?: string; batch_no?: string },
|
||||
) => Promise<void>;
|
||||
refreshHistoryAfterSend: () => Promise<void>;
|
||||
refreshConversationAfterSend?: () => Promise<void>;
|
||||
tryHandleShippingAttachmentAutoFlow: (
|
||||
textOrEvent: string | Event | undefined,
|
||||
content: string,
|
||||
@@ -61,8 +62,12 @@ export function createChatPageSendApi(ctx: ChatPageSendContext) {
|
||||
if (await ctx.tryHandleShippingAttachmentAutoFlow(textOrEvent, content, trimmed)) {
|
||||
return;
|
||||
}
|
||||
if (!trimmed || ctx.isThinking.value || ctx.isUploadingAttachments.value) return;
|
||||
if (ctx.tryHandleLeaveSend(content)) return;
|
||||
if (!trimmed || ctx.isThinking.value || ctx.isUploadingAttachments.value) {
|
||||
return;
|
||||
}
|
||||
if (ctx.tryHandleLeaveSend(content)) {
|
||||
return;
|
||||
}
|
||||
if (await ctx.tryHandleShippingSend(textOrEvent, content, trimmed)) {
|
||||
return;
|
||||
}
|
||||
@@ -100,6 +105,7 @@ export function createChatPageSendApi(ctx: ChatPageSendContext) {
|
||||
ctx.getChatContext?.(),
|
||||
);
|
||||
await ctx.refreshHistoryAfterSend();
|
||||
await ctx.refreshConversationAfterSend?.();
|
||||
await ctx.refreshToolRunProgressAfterSend();
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user