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}
|
value={input}
|
||||||
onChange={(e) => setInput(e.target.value)}
|
onChange={(e) => setInput(e.target.value)}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === "Enter" && !e.shiftKey && !e.metaKey) {
|
if (
|
||||||
|
e.key === "Enter" &&
|
||||||
|
!e.shiftKey &&
|
||||||
|
!e.metaKey &&
|
||||||
|
!e.nativeEvent.isComposing
|
||||||
|
) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const el = e.target as HTMLElement | undefined;
|
const el = e.target as HTMLElement | undefined;
|
||||||
const form = el?.closest("form");
|
const form = el?.closest("form");
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export function HumanMessage({
|
|||||||
onSubmit={handleSubmitEdit}
|
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}
|
{contentString}
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user