|
|
@@ -8,7 +8,7 @@ import React, {
|
|
|
Fragment,
|
|
|
RefObject,
|
|
|
} from "react";
|
|
|
-import { HomeOutlined, MenuOutlined,FormOutlined } from '@ant-design/icons';
|
|
|
+import { HomeOutlined, MenuOutlined, FormOutlined } from '@ant-design/icons';
|
|
|
import SendWhiteIcon from "../icons/send-white.svg";
|
|
|
import BrainIcon from "../icons/brain.svg";
|
|
|
import RenameIcon from "../icons/rename.svg";
|
|
|
@@ -678,8 +678,8 @@ export function ChatActions(props: {
|
|
|
setGuessList([]);
|
|
|
}
|
|
|
}, [props.isClickStop])
|
|
|
-
|
|
|
- const [activeKey, setActiveKey]= useState('0'); // 控制手风琴是否展示
|
|
|
+
|
|
|
+ const [activeKey, setActiveKey] = useState('0'); // 控制手风琴是否展示
|
|
|
|
|
|
return (
|
|
|
<div className={styles["chat-input-actions"]}>
|
|
|
@@ -688,53 +688,53 @@ export function ChatActions(props: {
|
|
|
<Collapse
|
|
|
accordion={true}
|
|
|
activeKey={activeKey}
|
|
|
- onChange={(key)=>{setActiveKey(key[0])}}
|
|
|
+ onChange={(key) => { setActiveKey(key[0]) }}
|
|
|
bordered={false}
|
|
|
- style={{ width: '100%',backgroundColor:'#fff' }}
|
|
|
+ style={{ width: '100%', backgroundColor: '#fff' }}
|
|
|
expandIconPosition="end"
|
|
|
items={[
|
|
|
{
|
|
|
key: '1',
|
|
|
- label:<span style={{ color: '#8096ca' }}>你还可以尝试提问:</span>,
|
|
|
+ label: <span style={{ color: '#8096ca' }}>你还可以尝试提问:</span>,
|
|
|
children: <div style={{ color: '#8096ca', fontSize: 13, overflowX: 'auto' }}>
|
|
|
- {/* <div>
|
|
|
+ {/* <div>
|
|
|
你还可以尝试提问:
|
|
|
</div> */}
|
|
|
-
|
|
|
- {
|
|
|
- guessList.length === 0 ?
|
|
|
- <Space style={{ margin: '10px 0' }}>
|
|
|
- <Skeleton.Button size="small" active={true} />
|
|
|
- <Skeleton.Button size="small" active={true} />
|
|
|
- <Skeleton.Button size="small" active={true} />
|
|
|
- </Space>
|
|
|
- :
|
|
|
- <div style={{ display: 'flex', margin: '10px 0', overflowX: 'auto' }}>
|
|
|
- {
|
|
|
- guessList.map((item, index) => {
|
|
|
- return (
|
|
|
- <div
|
|
|
- style={{
|
|
|
- padding: '5px 10px',
|
|
|
- background: '#f2f4f8',
|
|
|
- borderRadius: 5,
|
|
|
- margin: '0 10px 10px 0',
|
|
|
- cursor: 'pointer',
|
|
|
- }}
|
|
|
- onClick={() => {
|
|
|
- props.setUserInput(item);
|
|
|
- props.doSubmit(item)
|
|
|
- setActiveKey('')
|
|
|
- }}
|
|
|
- key={index}
|
|
|
- >
|
|
|
- {item}
|
|
|
- </div>
|
|
|
- )
|
|
|
- })
|
|
|
- }
|
|
|
- </div>
|
|
|
- }
|
|
|
+
|
|
|
+ {
|
|
|
+ guessList.length === 0 ?
|
|
|
+ <Space style={{ margin: '10px 0' }}>
|
|
|
+ <Skeleton.Button size="small" active={true} />
|
|
|
+ <Skeleton.Button size="small" active={true} />
|
|
|
+ <Skeleton.Button size="small" active={true} />
|
|
|
+ </Space>
|
|
|
+ :
|
|
|
+ <div style={{ display: 'flex', margin: '10px 0', overflowX: 'auto' }}>
|
|
|
+ {
|
|
|
+ guessList.map((item, index) => {
|
|
|
+ return (
|
|
|
+ <div
|
|
|
+ style={{
|
|
|
+ padding: '5px 10px',
|
|
|
+ background: '#f2f4f8',
|
|
|
+ borderRadius: 5,
|
|
|
+ margin: '0 10px 10px 0',
|
|
|
+ cursor: 'pointer',
|
|
|
+ }}
|
|
|
+ onClick={() => {
|
|
|
+ props.setUserInput(item);
|
|
|
+ props.doSubmit(item)
|
|
|
+ setActiveKey('')
|
|
|
+ }}
|
|
|
+ key={index}
|
|
|
+ >
|
|
|
+ {item}
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+ }
|
|
|
</div>
|
|
|
}
|
|
|
]}
|
|
|
@@ -1139,7 +1139,7 @@ function _Chat() {
|
|
|
let url = null;
|
|
|
if (selectedFruit === 'LOCAL') {
|
|
|
url = '/deepseek/api/free//presets';
|
|
|
- }
|
|
|
+ }
|
|
|
// else {
|
|
|
// url = '/bigmodel/api/presets';
|
|
|
// }
|
|
|
@@ -1174,7 +1174,8 @@ function _Chat() {
|
|
|
if (chatMode) {
|
|
|
setSelectedFruit(chatMode as "ONLINE" | "LOCAL");
|
|
|
// const appId = params.get('appId');
|
|
|
- const appId = '2924812721300312064';
|
|
|
+ // const appId = '2924812721300312064'; // 测试ID
|
|
|
+ const appId = '2959949063168331776'; // 生产ID
|
|
|
if (appId) {
|
|
|
setAppValue(appId);
|
|
|
globalStore.setSelectedAppId(appId);
|
|
|
@@ -1776,9 +1777,9 @@ function _Chat() {
|
|
|
const [pageLoading, setPageLoading] = useState(false);
|
|
|
const [list, setList] = useState([]);
|
|
|
|
|
|
-/**
|
|
|
-* 初始化函数,用于加载页面数据
|
|
|
-*/
|
|
|
+ /**
|
|
|
+ * 初始化函数,用于加载页面数据
|
|
|
+ */
|
|
|
const init = async () => {
|
|
|
setPageLoading(true);
|
|
|
try {
|
|
|
@@ -1865,14 +1866,23 @@ function _Chat() {
|
|
|
<div style={{ display: 'flex', alignItems: 'center' }}
|
|
|
className={`window-header-title ${styles["chat-body-title"]}`}>
|
|
|
{
|
|
|
- <div style={{ marginRight: 10 }}>
|
|
|
- <Button
|
|
|
- type='text'
|
|
|
- icon={<MenuOutlined />}
|
|
|
- onClick={() => {
|
|
|
- globalStore.setShowMenu(!globalStore.showMenu);
|
|
|
- }}
|
|
|
- />
|
|
|
+ <div style={{ display: 'flex', alignItems: 'center' }}
|
|
|
+ className={`window-header-title ${styles["chat-body-title"]}`}>
|
|
|
+ <div>
|
|
|
+ <img style={{ marginTop: '10%', marginRight: '10px', height: 42 }} src={faviconSrc.src} />
|
|
|
+ {/* <Favicon className="window-header-icon" /> */}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div
|
|
|
+ className={`window-header-main-title ${styles["chat-body-main-title"]}`}
|
|
|
+ // onClickCapture={() => setIsEditingMessage(true)}
|
|
|
+ >
|
|
|
+ 建科·小智
|
|
|
+ </div>
|
|
|
+ <div className={`window-header-sub-title ${styles["chat-body-main-title"]}`}>
|
|
|
+ {Locale.Chat.SubTitle(session.messages.length)}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
}
|
|
|
{/* 获取应用列表头部展示在页面最上面 */}
|
|
|
@@ -1928,12 +1938,12 @@ function _Chat() {
|
|
|
}
|
|
|
</div>
|
|
|
<div className="window-actions">
|
|
|
- <div className="window-action-button" onClick={()=>{
|
|
|
- localStorage.clear();
|
|
|
- window.location.reload();
|
|
|
+ <div className="window-action-button" onClick={() => {
|
|
|
+ localStorage.clear();
|
|
|
+ window.location.reload();
|
|
|
}}>
|
|
|
<IconButton text='新聊天' icon={<FormOutlined />} />
|
|
|
-
|
|
|
+
|
|
|
</div>
|
|
|
{/* {showMaxIcon && (
|
|
|
<div className="window-action-button">
|
|
|
@@ -2219,36 +2229,39 @@ function _Chat() {
|
|
|
<p style={{ textAlign: 'center' }}>
|
|
|
{getDesc()}
|
|
|
</p>
|
|
|
- <p>我猜您可能想问:</p>
|
|
|
- {
|
|
|
- questionList.map((item, index) => {
|
|
|
- return (
|
|
|
- <div
|
|
|
- style={{
|
|
|
- padding: '10px',
|
|
|
- marginBottom: '10px',
|
|
|
- border: '1px solid #e6e8f1',
|
|
|
- borderRadius: '10px',
|
|
|
- fontSize: '16px',
|
|
|
- display: 'flex',
|
|
|
- justifyContent: 'space-between',
|
|
|
- alignItems: 'center',
|
|
|
- cursor: 'pointer'
|
|
|
- }}
|
|
|
- onClick={() => {
|
|
|
- setUserInput(item)
|
|
|
- doSubmit(item)
|
|
|
- }}
|
|
|
- key={index}
|
|
|
- >
|
|
|
- <div>
|
|
|
- {item}
|
|
|
+ <div style={{ background: '#fff', padding: 10, borderRadius: 10, boxShadow: '0 2px 8px rgba(0,0,0,.1)' }}>
|
|
|
+ <p>我猜您可能想问:</p>
|
|
|
+ {
|
|
|
+ questionList.map((item, index) => {
|
|
|
+ return (
|
|
|
+ <div
|
|
|
+ style={{
|
|
|
+ padding: '10px',
|
|
|
+ marginBottom: '10px',
|
|
|
+ border: '1px solid #e6e8f1',
|
|
|
+ borderRadius: '10px',
|
|
|
+ fontSize: '16px',
|
|
|
+ display: 'flex',
|
|
|
+ justifyContent: 'space-between',
|
|
|
+ alignItems: 'center',
|
|
|
+ cursor: 'pointer'
|
|
|
+ }}
|
|
|
+ onClick={() => {
|
|
|
+ setUserInput(item)
|
|
|
+ doSubmit(item)
|
|
|
+ }}
|
|
|
+ key={index}
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ {item}
|
|
|
+ </div>
|
|
|
+ <RightOutlined />
|
|
|
</div>
|
|
|
- <RightOutlined />
|
|
|
- </div>
|
|
|
- )
|
|
|
- })
|
|
|
- }
|
|
|
+ )
|
|
|
+ })
|
|
|
+ }
|
|
|
+ </div>
|
|
|
+
|
|
|
</div>
|
|
|
</>
|
|
|
}
|
|
|
@@ -2344,7 +2357,7 @@ function _Chat() {
|
|
|
/>
|
|
|
</label>
|
|
|
</div>
|
|
|
- <div style={{ paddingBottom: 12, textAlign: 'center', background:'rgba(155, 155, 255, .2)',backdropFilter: 'blur(1px)', color: '#000', fontSize: 12 }}>
|
|
|
+ <div style={{ paddingBottom: 12, textAlign: 'center', background: 'rgba(155, 155, 255, .2)', backdropFilter: 'blur(1px)', color: '#000', fontSize: 12 }}>
|
|
|
内容由AI生成,仅供参考
|
|
|
</div>
|
|
|
{showExport && (
|