feat(shipping-notice): 新增货代客户管理功能,支持客户导入、识别证据管理与客户确认
This commit is contained in:
1 parent
b595e157e9
commit
4fbaed2b4c
176 files changed
+14011
-994
No files matched your search
@@ -338,10 +338,18 @@ function enhanceAssetHistoryTableLinks(html: string): string {
|
||||
export function createChatPageMarkdownApi(ctx: ChatPageMarkdownContext) {
|
||||
const message = useMessage();
|
||||
|
||||
/**
|
||||
* 判断消息是否具备可展示内容。
|
||||
* 核心逻辑:订单识别状态本身就是用户可见反馈,即使 Dify 正文尚未到达也必须渲染;
|
||||
* 其余消息继续沿用正文、链接、引用源和结构化消息的既有判断。
|
||||
* @param msgItem - 当前聊天消息。
|
||||
* @returns 消息是否应进入聊天列表渲染。
|
||||
*/
|
||||
const shouldRenderMessage = (msgItem: ChatMessage): boolean => {
|
||||
if (msgItem?.role === 'user') return true;
|
||||
if (msgItem?.type === 'shipping-parse-review') return false;
|
||||
if (msgItem?.type === 'leave-form' || msgItem?.type === 'leave-confirmation' || msgItem?.type === 'leave-result') return true;
|
||||
if (msgItem?.shipping_order_extraction_state) return true;
|
||||
const content = (msgItem?.content || '').trim();
|
||||
if (content) return true;
|
||||
if (ctx.getMessageLinks(msgItem as unknown as Record<string, unknown>).length > 0) return true;
|
||||
@@ -356,6 +364,7 @@ export function createChatPageMarkdownApi(ctx: ChatPageMarkdownContext) {
|
||||
*/
|
||||
const hasMeaningfulAssistantReply = (msgItem: ChatMessage): boolean => {
|
||||
if (msgItem?.role !== 'assistant') return false;
|
||||
if (msgItem?.shipping_order_extraction_state) return true;
|
||||
if (msgItem?.type === 'leave-form'
|
||||
|| msgItem?.type === 'leave-confirmation'
|
||||
|| msgItem?.type === 'leave-result'
|
||||
|
||||
Reference in new issue
Block a user