Merge pull request #76 from cgoinglove/main
fix: improve chat UI behavior and message display
This commit is contained in:
@@ -377,7 +377,12 @@ export function Thread() {
|
||||
value={input}
|
||||
onChange={(e) => setInput(e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter" && !e.shiftKey && !e.metaKey) {
|
||||
if (
|
||||
e.key === "Enter" &&
|
||||
!e.shiftKey &&
|
||||
!e.metaKey &&
|
||||
!e.nativeEvent.isComposing
|
||||
) {
|
||||
e.preventDefault();
|
||||
const el = e.target as HTMLElement | undefined;
|
||||
const form = el?.closest("form");
|
||||
|
||||
@@ -84,7 +84,7 @@ export function HumanMessage({
|
||||
onSubmit={handleSubmitEdit}
|
||||
/>
|
||||
) : (
|
||||
<p className="text-right px-4 py-2 rounded-3xl bg-muted">
|
||||
<p className="text-right px-4 py-2 rounded-3xl bg-muted w-fit ml-auto">
|
||||
{contentString}
|
||||
</p>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user