mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-09 02:33:42 +08:00
fix markdown formula parse plugin
This commit is contained in:
@@ -503,8 +503,7 @@ const removeChat = function (chat) {
|
||||
|
||||
}
|
||||
|
||||
const latexPlugin = require('markdown-it-latex2img')
|
||||
const mathjaxPlugin = require('markdown-it-mathjax')
|
||||
const mathjaxPlugin = require('markdown-it-mathjax3')
|
||||
const md = require('markdown-it')({
|
||||
breaks: true,
|
||||
html: true,
|
||||
@@ -529,7 +528,6 @@ const md = require('markdown-it')({
|
||||
return `<pre class="code-container"><code class="language-${lang} hljs">${preCode}</code>${copyBtn}</pre>`
|
||||
}
|
||||
});
|
||||
md.use(latexPlugin)
|
||||
md.use(mathjaxPlugin)
|
||||
|
||||
// 创建 socket 连接
|
||||
|
||||
@@ -163,11 +163,8 @@
|
||||
:model="item.model"
|
||||
:content="item.content"/>
|
||||
<chat-reply v-else-if="item.type==='reply'"
|
||||
:icon="item.icon"
|
||||
:org-content="item.orgContent"
|
||||
:created-at="dateFormat(item['created_at'])"
|
||||
:tokens="item['tokens']"
|
||||
:content="item.content"/>
|
||||
:read-only="true"
|
||||
:data="item"/>
|
||||
</div>
|
||||
</div><!-- end chat box -->
|
||||
</el-dialog>
|
||||
@@ -291,8 +288,7 @@ const removeMessage = function (row) {
|
||||
})
|
||||
}
|
||||
|
||||
const latexPlugin = require('markdown-it-latex2img')
|
||||
const mathjaxPlugin = require('markdown-it-mathjax')
|
||||
const mathjaxPlugin = require('markdown-it-mathjax3')
|
||||
const md = require('markdown-it')({
|
||||
breaks: true,
|
||||
html: true,
|
||||
@@ -312,7 +308,6 @@ const md = require('markdown-it')({
|
||||
return `<pre class="code-container"><code class="language-${lang} hljs">${preCode}</code></pre>`
|
||||
}
|
||||
});
|
||||
md.use(latexPlugin)
|
||||
md.use(mathjaxPlugin)
|
||||
|
||||
const showContentDialog = ref(false)
|
||||
|
||||
@@ -225,18 +225,6 @@ const newChat = (item) => {
|
||||
}
|
||||
showPicker.value = false
|
||||
const options = item.selectedOptions
|
||||
// setChatConfig({
|
||||
// role: {
|
||||
// id: options[0].value,
|
||||
// name: options[0].text,
|
||||
// icon: options[0].icon,
|
||||
// helloMsg: options[0].helloMsg
|
||||
// },
|
||||
// model: options[1].value,
|
||||
// modelValue: getModelValue(options[1].value),
|
||||
// title: '新建会话',
|
||||
// chatId: 0
|
||||
// })
|
||||
router.push({
|
||||
name: "mobile-chat-session",
|
||||
params: {role_id: options[0].value, model_id: options[1].value, title: '新建会话', chat_id: 0}
|
||||
@@ -244,25 +232,6 @@ const newChat = (item) => {
|
||||
}
|
||||
|
||||
const changeChat = (chat) => {
|
||||
// let role = {}
|
||||
// for (let i = 0; i < roles.value.length; i++) {
|
||||
// if (roles.value[i].value === chat.role_id) {
|
||||
// role = roles.value[i]
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
// setChatConfig({
|
||||
// role: {
|
||||
// id: chat.role_id,
|
||||
// name: role.text,
|
||||
// icon: role.icon
|
||||
// },
|
||||
// model: chat.model_id,
|
||||
// modelValue: getModelValue(chat.model_id),
|
||||
// title: chat.title,
|
||||
// chatId: chat.chat_id,
|
||||
// helloMsg: chat.hello_msg,
|
||||
// })
|
||||
router.push(`/mobile/chat/session?chat_id=${chat.chat_id}`)
|
||||
}
|
||||
|
||||
|
||||
@@ -249,8 +249,7 @@ const loading = ref(false)
|
||||
const finished = ref(false)
|
||||
const error = ref(false)
|
||||
|
||||
const latexPlugin = require('markdown-it-latex2img')
|
||||
const mathjaxPlugin = require('markdown-it-mathjax')
|
||||
const mathjaxPlugin = require('markdown-it-mathjax3')
|
||||
const md = require('markdown-it')({
|
||||
breaks: true,
|
||||
html: true,
|
||||
@@ -275,7 +274,6 @@ const md = require('markdown-it')({
|
||||
return `<pre class="code-container"><code class="language-${lang} hljs">${preCode}</code>${copyBtn}</pre>`
|
||||
}
|
||||
});
|
||||
md.use(latexPlugin)
|
||||
md.use(mathjaxPlugin)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user