diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index 5d3f5bd99..3b78e8033 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -121,7 +121,8 @@ export const PromptInput: Component = (props) => { let slashPopoverRef!: HTMLDivElement const mirror = { input: false } - const inset = 44 + const inset = 52 + const space = `${inset}px` const scrollCursorIntoView = () => { const container = scrollRef @@ -156,8 +157,11 @@ export const PromptInput: Component = (props) => { } } - const queueScroll = () => { - requestAnimationFrame(scrollCursorIntoView) + const queueScroll = (count = 2) => { + requestAnimationFrame(() => { + scrollCursorIntoView() + if (count > 1) queueScroll(count - 1) + }) } const activeFileTab = createSessionTabs({ @@ -1266,7 +1270,11 @@ export const PromptInput: Component = (props) => { editorRef?.focus() }} > -
(scrollRef = el)}> +
(scrollRef = el)} + style={{ "scroll-padding-bottom": space }} + >
{ @@ -1288,22 +1296,34 @@ export const PromptInput: Component = (props) => { onKeyDown={handleKeyDown} classList={{ "select-text": true, - "w-full pl-3 pr-2 pt-2 pb-11 text-14-regular text-text-strong focus:outline-none whitespace-pre-wrap": true, + "w-full pl-3 pr-2 pt-2 text-14-regular text-text-strong focus:outline-none whitespace-pre-wrap": true, "[&_[data-type=file]]:text-syntax-property": true, "[&_[data-type=agent]]:text-syntax-type": true, "font-mono!": store.mode === "shell", }} + style={{ "padding-bottom": space }} />
{placeholder()}
+