mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
trim text
This commit is contained in:
parent
89e265195d
commit
2fad551144
1 changed files with 2 additions and 2 deletions
|
|
@ -186,7 +186,7 @@ export async function toYunzai (e, contents) {
|
|||
for (let content of contents) {
|
||||
switch (content.type) {
|
||||
case 'text': {
|
||||
msgs.push((/** @type {import('chaite').TextContent} **/ content).text)
|
||||
msgs.push((/** @type {import('chaite').TextContent} **/ content).text?.trim() || '')
|
||||
break
|
||||
}
|
||||
case 'image': {
|
||||
|
|
@ -208,6 +208,6 @@ export async function toYunzai (e, contents) {
|
|||
}
|
||||
}
|
||||
return {
|
||||
msgs, forward
|
||||
msgs: msgs.filter(i => !!i), forward
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue