diff --git a/ui/src/ui/views/chat.ts b/ui/src/ui/views/chat.ts index a9b4da572b..f5fb6e80bb 100644 --- a/ui/src/ui/views/chat.ts +++ b/ui/src/ui/views/chat.ts @@ -1,4 +1,5 @@ import { html, nothing } from "lit"; +import { ref } from "lit/directives/ref.js"; import { repeat } from "lit/directives/repeat.js"; import type { SessionsListResult } from "../types"; import type { ChatAttachment, ChatQueueItem } from "../ui-types"; @@ -71,6 +72,11 @@ export type ChatProps = { const COMPACTION_TOAST_DURATION_MS = 5000; +function adjustTextareaHeight(el: HTMLTextAreaElement) { + el.style.height = "auto"; + el.style.height = `${el.scrollHeight}px`; +} + function renderCompactionIndicator(status: CompactionIndicatorStatus | null | undefined) { if (!status) return nothing; @@ -327,6 +333,7 @@ export function renderChat(props: ChatProps) {