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

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing * @Author: ZhaoYing
* @Date: 2026-02-03 17:09:03 * @Date: 2026-02-03 17:09:03
* @Last Modified by: ZhaoYing * @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 * Memory Conversation Page
@@ -78,7 +78,7 @@ interface DataItem {
id: string; id: string;
question: string; question: string;
type: string; type: string;
reason: string; reason?: string;
} }
/** /**
* Log item for conversation analysis * Log item for conversation analysis
@@ -88,13 +88,15 @@ export interface LogItem {
title: string; title: string;
data?: DataItem[] | AnyObject; data?: DataItem[] | AnyObject;
raw_results?: string | Record<string, AnyObject>; raw_results?: string | Record<string, AnyObject>;
raw_result?: Array<AnyObject>;
summary?: string; summary?: string;
query?: string; query?: string;
reason?: string; reason?: string;
result?: string; result?: string;
original_query: string; original_query?: string;
index?: number; index?: number;
result_count?: number; result_count?: number;
total?: number;
} }
/** /**
@@ -242,7 +244,6 @@ const MemoryConversation: FC = () => {
<ContentWrapper key={vo.id}> <ContentWrapper key={vo.id}>
<> <>
<div className="rb:font-medium rb:text-[#212332]">{vo.id}. {vo.question}</div> <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> </ContentWrapper>
))} ))}
@@ -260,25 +261,9 @@ const MemoryConversation: FC = () => {
</ContentWrapper> </ContentWrapper>
))} ))}
</Flex> </Flex>
: log.type === 'search_result' && log.raw_results && typeof log.raw_results !== 'string' : log.type === 'search_result' && log.result
? <ContentWrapper> ? <ContentWrapper>
<div className="rb:font-medium rb:text-[#212332] rb:mb-2">{log.query}</div> <Markdown content={log.result} />
{(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>
</>}
</ContentWrapper> </ContentWrapper>
: log.type === 'retrieval_summary' && log.summary : log.type === 'retrieval_summary' && log.summary
? <ContentWrapper> ? <ContentWrapper>