Merge pull request #76 from cgoinglove/main

fix: improve chat UI behavior and message display
This commit is contained in:
Brace Sproul
2025-04-02 13:50:42 -07:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -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");

View File

@@ -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>
)} )}