fix(tui): resize textarea if text inserted via appendPrompt TUI API (#5983)
This commit is contained in:
parent
35e6fc42b0
commit
10745d5bef
1 changed files with 5 additions and 0 deletions
|
|
@ -310,6 +310,11 @@ export function Prompt(props: PromptProps) {
|
||||||
|
|
||||||
sdk.event.on(TuiEvent.PromptAppend.type, (evt) => {
|
sdk.event.on(TuiEvent.PromptAppend.type, (evt) => {
|
||||||
input.insertText(evt.properties.text)
|
input.insertText(evt.properties.text)
|
||||||
|
setTimeout(() => {
|
||||||
|
input.getLayoutNode().markDirty()
|
||||||
|
input.gotoBufferEnd()
|
||||||
|
renderer.requestRender()
|
||||||
|
}, 0)
|
||||||
})
|
})
|
||||||
|
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue