mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
chore: cleanup
This commit is contained in:
parent
df2713a6c2
commit
5eaa8e1bf4
1 changed files with 13 additions and 0 deletions
|
|
@ -233,6 +233,19 @@ export default function Page() {
|
|||
if (document.activeElement?.dataset?.component === "terminal") return
|
||||
if (dialog.stack.length > 0) return
|
||||
|
||||
if (event.key === "PageUp" || event.key === "PageDown") {
|
||||
const scrollContainer = document.querySelector('[data-slot="session-turn-content"]') as HTMLElement
|
||||
if (scrollContainer) {
|
||||
event.preventDefault()
|
||||
const scrollAmount = scrollContainer.clientHeight * 0.8
|
||||
scrollContainer.scrollBy({
|
||||
top: event.key === "PageUp" ? -scrollAmount : scrollAmount,
|
||||
behavior: "instant",
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
const focused = document.activeElement === inputRef
|
||||
if (focused) {
|
||||
if (event.key === "Escape") inputRef?.blur()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue