Skip to content

Commit

Permalink
fix: thread is broken after deleted first generated message (janhq#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-menlo authored Dec 18, 2023
1 parent 54f916d commit 80f953b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/conversational-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 80f953b

Please sign in to comment.