mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-06 00:12:11 +00:00
chore: permissions ux
This commit is contained in:
parent
2e972b3fdc
commit
1b5bf32ce5
4 changed files with 56 additions and 10 deletions
|
|
@ -328,6 +328,12 @@ export function SessionTurn(
|
|||
}
|
||||
})
|
||||
|
||||
createEffect(() => {
|
||||
if (permissionParts().length > 0) {
|
||||
autoScroll.forceScrollToBottom()
|
||||
}
|
||||
})
|
||||
|
||||
createEffect(() => {
|
||||
if (working() || !isLastUserMessage()) return
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@ export type ToastVariant = "default" | "success" | "error" | "loading"
|
|||
export interface ToastAction {
|
||||
label: string
|
||||
onClick: "dismiss" | (() => void)
|
||||
dismissAfter?: boolean
|
||||
}
|
||||
|
||||
export interface ToastOptions {
|
||||
|
|
@ -132,10 +131,8 @@ export function showToast(options: ToastOptions | string) {
|
|||
onClick={() => {
|
||||
if (typeof action.onClick === "function") {
|
||||
action.onClick()
|
||||
if (action.dismissAfter) toaster.dismiss(props.toastId)
|
||||
} else {
|
||||
toaster.dismiss(props.toastId)
|
||||
}
|
||||
toaster.dismiss(props.toastId)
|
||||
}}
|
||||
>
|
||||
{action.label}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue