fix: thread is broken after deleted first generated message (#1061)
This commit is contained in:
parent
54f916d3fe
commit
80f953ba1b
@ -125,7 +125,7 @@ export default class JSONConversationalExtension
|
||||
await fs.writeFile(
|
||||
threadMessagePath,
|
||||
messages.map((msg) => JSON.stringify(msg)).join('\n') +
|
||||
(messages.length > 1 ? '\n' : '')
|
||||
(messages.length ? '\n' : '')
|
||||
)
|
||||
Promise.resolve()
|
||||
} catch (err) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user