feat(shipping-notice): 添加订单抽取功能,支持异步运行和管理,优化相关数据模型和处理逻辑
This commit is contained in:
1 parent
34d489a2d1
commit
ce26d6d0c4
144 files changed
+12241
-4233
No files matched your search
@@ -9,10 +9,7 @@ import { getAuthHeaders } from '@/shared/utils/auth';
|
||||
import { applyStreamErrorToMessage, type StreamErrorLabels } from '../utils/streamErrorMessage';
|
||||
import type { StartChatTurnOptions } from '../types/chat-turn.types';
|
||||
import type { ChatMessage, ChatRun } from '../types/chat.types';
|
||||
import {
|
||||
applyShippingOrderExtractionStateToMessage,
|
||||
applyShippingUiStateToMessage,
|
||||
} from './useChat';
|
||||
import { applyShippingUiStateToMessage } from './useChat';
|
||||
|
||||
export interface CreateStartChatTurnOptions {
|
||||
messages: Ref<ChatMessage[]>;
|
||||
@@ -172,9 +169,7 @@ export function createStartChatTurn(options: CreateStartChatTurnOptions) {
|
||||
if (eventName === 'shipping_ui_state' || eventName === 'ui_state.updated') {
|
||||
const botMsg = ensureBotMessage();
|
||||
if (botMsg) applyShippingUiStateToMessage(botMsg, data);
|
||||
} else if (eventName === 'shipping_order_extraction_state') {
|
||||
const botMsg = ensureBotMessage();
|
||||
if (botMsg) applyShippingOrderExtractionStateToMessage(botMsg, data);
|
||||
|
||||
} else if (
|
||||
eventName === 'message'
|
||||
|| eventName === 'agent_message'
|
||||
|
||||
Reference in new issue
Block a user