Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,15 @@ export function ChatView({ bot }: { bot: Bot }) {
</button>
)}

{/* keyed by bot: a draft belongs to the conversation it was typed in,
so switching bots starts from an empty composer instead of carrying
the previous bot's half-written message over */}
<Composer
key={bot.id}
bot={bot}
onEditLast={lastUserMessage ? () => setEditingId(lastUserMessage.id) : undefined}
/>

</main>
);
}
Loading