fix(AgentMessageComponent): 修复未处理消息内容前后空格的问题
This commit is contained in:
parent
53b8710a78
commit
a7a2832e55
@ -17,7 +17,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 消息内容 -->
|
<!-- 消息内容 -->
|
||||||
<!-- <div v-else-if="message.content" v-html="renderMarkdown(message)" class="message-md"></div> -->
|
|
||||||
<MdPreview v-if="parsedData.content" ref="editorRef"
|
<MdPreview v-if="parsedData.content" ref="editorRef"
|
||||||
editorId="preview-only"
|
editorId="preview-only"
|
||||||
previewTheme="github"
|
previewTheme="github"
|
||||||
@ -146,7 +145,7 @@ const getToolNameByToolCall = (toolCall) => {
|
|||||||
|
|
||||||
const parsedData = computed(() => {
|
const parsedData = computed(() => {
|
||||||
// Start with default values from the prop to avoid mutation.
|
// Start with default values from the prop to avoid mutation.
|
||||||
let content = props.message.content || '';
|
let content = props.message.content.trim() || '';
|
||||||
let reasoning_content = props.message.additional_kwargs?.reasoning_content || '';
|
let reasoning_content = props.message.additional_kwargs?.reasoning_content || '';
|
||||||
|
|
||||||
// Regex to find <think>...</think> or an unclosed <think>... at the end of the string.
|
// Regex to find <think>...</think> or an unclosed <think>... at the end of the string.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user