fix: delete first message then regenerate again will break the thread (#1015)
This commit is contained in:
parent
305d0427a4
commit
bcc9bd6997
@ -124,7 +124,8 @@ export default class JSONConversationalExtension
|
||||
await fs.mkdir(threadDirPath)
|
||||
await fs.writeFile(
|
||||
threadMessagePath,
|
||||
messages.map((msg) => JSON.stringify(msg)).join('\n') + '\n'
|
||||
messages.map((msg) => JSON.stringify(msg)).join('\n') +
|
||||
(messages.length > 1 ? '\n' : '')
|
||||
)
|
||||
Promise.resolve()
|
||||
} catch (err) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user