Merge pull request #944 from SuanmoSuanyangTechnology/fix/v0.3.1_zy

Fix/v0.3.1 zy
This commit is contained in:
yingzhao
2026-04-20 17:05:32 +08:00
committed by GitHub
2 changed files with 15 additions and 24 deletions

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-28 14:08:14
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-04-13 18:17:32
* @Last Modified time: 2026-04-20 16:52:32
*/
/**
* UploadModal Component
@@ -16,6 +16,7 @@
import { forwardRef, useImperativeHandle, useState, useMemo } from 'react';
import { Form, Steps, Flex, Alert, Button, Result, message } from 'antd';
import { useTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';
import type { Application, UploadModalRef } from '../types'
import RbModal from '@/components/RbModal'
@@ -51,6 +52,7 @@ const UploadModal = forwardRef<UploadModalRef, UploadModalProps>(({
id
}, ref) => {
const { t } = useTranslation();
const navigate = useNavigate();
// State management
const [visible, setVisible] = useState(false); // Modal visibility
@@ -146,6 +148,10 @@ const UploadModal = forwardRef<UploadModalRef, UploadModalProps>(({
window.open(`/#/application/config/${appId}`, '_blank');
}
break;
case 'list':
if (id) {
navigate('/application')
}
}
}, 100)
};

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-03 17:09:03
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-31 12:21:56
* @Last Modified time: 2026-04-20 16:59:25
*/
/**
* Memory Conversation Page
@@ -78,8 +78,8 @@ interface DataItem {
id: string;
question: string;
type: string;
reason: string;
}
reason?: string;
}
/**
* Log item for conversation analysis
*/
@@ -88,13 +88,15 @@ export interface LogItem {
title: string;
data?: DataItem[] | AnyObject;
raw_results?: string | Record<string, AnyObject>;
raw_result?: Array<AnyObject>;
summary?: string;
query?: string;
reason?: string;
result?: string;
original_query: string;
original_query?: string;
index?: number;
result_count?: number;
total?: number;
}
/**
@@ -242,7 +244,6 @@ const MemoryConversation: FC = () => {
<ContentWrapper key={vo.id}>
<>
<div className="rb:font-medium rb:text-[#212332]">{vo.id}. {vo.question}</div>
<div className="rb:mt-2 rb:text-[#5B6167]">{vo.reason}</div>
</>
</ContentWrapper>
))}
@@ -260,25 +261,9 @@ const MemoryConversation: FC = () => {
</ContentWrapper>
))}
</Flex>
: log.type === 'search_result' && log.raw_results && typeof log.raw_results !== 'string'
: log.type === 'search_result' && log.result
? <ContentWrapper>
<div className="rb:font-medium rb:text-[#212332] rb:mb-2">{log.query}</div>
{(log.raw_results.reranked_results as AnyObject)?.communities?.length > 0 && <>
<div className="rb:font-medium rb:text-[#212332]">{t('memoryConversation.communities')}</div>
<ul className='rb:mt-2 rb:text-[#5B6167] rb:list-disc rb:pl-4'>
{((log.raw_results.reranked_results as AnyObject)?.communities as { content: string }[]).map((item, index: number) => (
<li key={index}>{item.content}</li>
))}
</ul>
</>}
{(log.raw_results.reranked_results as AnyObject)?.summaries?.length > 0 && <>
<div className="rb:font-medium rb:text-[#212332]">{t('memoryConversation.summaries')}</div>
<ul className='rb:mt-2 rb:text-[#5B6167] rb:list-disc rb:pl-4'>
{((log.raw_results.reranked_results as AnyObject)?.summaries as { content: string }[]).map((item, index: number) => (
<li key={index}>{item.content}</li>
))}
</ul>
</>}
<Markdown content={log.result} />
</ContentWrapper>
: log.type === 'retrieval_summary' && log.summary
? <ContentWrapper>