1
This commit is contained in:
@@ -8,12 +8,12 @@
|
|||||||
<link rel="icon" href="/favicon.ico" />
|
<link rel="icon" href="/favicon.ico" />
|
||||||
<script src="/node_modules/ace-builds/src-min-noconflict/ace.js" type="text/javascript"></script>
|
<script src="/node_modules/ace-builds/src-min-noconflict/ace.js" type="text/javascript"></script>
|
||||||
<title>NPCs</title>
|
<title>NPCs</title>
|
||||||
<script type="module" crossorigin src="/assets/index-7689cf6c.js"></script>
|
<script type="module" crossorigin src="/assets/index-43ef01ab.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/assets/acebuilds-fbc0ccc6.js">
|
<link rel="modulepreload" crossorigin href="/assets/acebuilds-fbc0ccc6.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/reactflow-c250d835.js">
|
<link rel="modulepreload" crossorigin href="/assets/reactflow-c250d835.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/reactdrop-be699031.js">
|
<link rel="modulepreload" crossorigin href="/assets/reactdrop-be699031.js">
|
||||||
<link rel="modulepreload" crossorigin href="/assets/pdfjs-36654f0a.js">
|
<link rel="modulepreload" crossorigin href="/assets/pdfjs-36654f0a.js">
|
||||||
<link rel="stylesheet" href="/assets/index-9b55ebe4.css">
|
<link rel="stylesheet" href="/assets/index-1055532c.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id='body' style="width: 100%; height:100%">
|
<body id='body' style="width: 100%; height:100%">
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ export default function ChatInput({ clear, form, questions, inputForm, wsUrl, on
|
|||||||
createWsMsg(data)
|
createWsMsg(data)
|
||||||
} else if (data.type === 'stream') {
|
} else if (data.type === 'stream') {
|
||||||
updateCurrentMessage({
|
updateCurrentMessage({
|
||||||
|
flow_id: data.flow_id,
|
||||||
chat_id: data.chat_id,
|
chat_id: data.chat_id,
|
||||||
message: data.message,
|
message: data.message,
|
||||||
thought: data.intermediate_steps
|
thought: data.intermediate_steps
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export default function MessageBs({ data, onUnlike = () => { }, flow_type, onSou
|
|||||||
const handleCopyMessage = () => {
|
const handleCopyMessage = () => {
|
||||||
copyText(messageRef.current)
|
copyText(messageRef.current)
|
||||||
}
|
}
|
||||||
|
// console.log(data)
|
||||||
const chatId = useMessageStore(state => state.chatId)
|
const chatId = useMessageStore(state => state.chatId)
|
||||||
return <div className="flex w-full py-1">
|
return <div className="flex w-full py-1">
|
||||||
<div className="w-[100%]">
|
<div className="w-[100%]">
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export default function MessagePanne({ useName, guideWord, loadMore, flow_type }
|
|||||||
} else if (msg.thought) {
|
} else if (msg.thought) {
|
||||||
type = 'system'
|
type = 'system'
|
||||||
}
|
}
|
||||||
console.log(type)
|
// console.log(type)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'user':
|
case 'user':
|
||||||
return <MessageUser key={msg.id} useName={useName} data={msg} />;
|
return <MessageUser key={msg.id} useName={useName} data={msg} />;
|
||||||
@@ -88,8 +88,8 @@ export default function MessagePanne({ useName, guideWord, loadMore, flow_type }
|
|||||||
onSource={(data) => { sourceRef.current?.openModal(data) }}
|
onSource={(data) => { sourceRef.current?.openModal(data) }}
|
||||||
/>;
|
/>;
|
||||||
case 'system':
|
case 'system':
|
||||||
// return <MessageSystem key={msg.id} data={msg} />;
|
return <MessageSystem key={msg.id} data={msg} />;
|
||||||
return <RunLog key={msg.id} data={msg} />;
|
// return <RunLog key={msg.id} data={msg} />;
|
||||||
case 'separator':
|
case 'separator':
|
||||||
return <Separator key={msg.id} text={msg.message || t('chat.roundOver')} />;
|
return <Separator key={msg.id} text={msg.message || t('chat.roundOver')} />;
|
||||||
case 'file':
|
case 'file':
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ export const useMessageStore = create<State & Actions>((set, get) => ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
messages[currentMessageIndex] = newCurrentMessage
|
messages[currentMessageIndex] = newCurrentMessage
|
||||||
console.log(messages,currentMessageIndex,newCurrentMessage)
|
// console.log(messages,currentMessageIndex,newCurrentMessage)
|
||||||
// 会话特殊处理,兼容后端的缺陷
|
// 会话特殊处理,兼容后端的缺陷
|
||||||
if (!isRunLog) {
|
if (!isRunLog) {
|
||||||
// start - end 之间没有内容删除load
|
// start - end 之间没有内容删除load
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default function Word({ data }) {
|
|||||||
// 文档地址,绝对路径
|
// 文档地址,绝对路径
|
||||||
url: data.path,
|
url: data.path,
|
||||||
// 文档标题
|
// 文档标题
|
||||||
title: 'bisheng.docx',
|
title: 'NPChat.docx',
|
||||||
permissions: {
|
permissions: {
|
||||||
changeHistory: true,
|
changeHistory: true,
|
||||||
comment: true,
|
comment: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user