Skip to content

Commit

Permalink
fix: a tool message should count as the start of a thread (Chainlit#1680
Browse files Browse the repository at this point in the history
)
  • Loading branch information
willydouhard authored Jan 11, 2025
1 parent 1ec7198 commit 142cb8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function cn(...inputs: ClassValue[]) {
}

export const hasMessage = (messages: IStep[]): boolean => {
const validTypes = ['user_message', 'assistant_message'];
const validTypes = ['user_message', 'assistant_message', 'tool'];
return messages.some(
(message) =>
validTypes.includes(message.type) || hasMessage(message.steps || [])
Expand Down

0 comments on commit 142cb8e

Please sign in to comment.