feat(tui): add skillsHub overlay state wiring
Extend OverlayState with a skillsHub flag, fold it into $isBlocked, and teach Ctrl+C to close the overlay so later PRs can render the component behind this slot.
This commit is contained in:
@ -57,6 +57,7 @@ export interface OverlayState {
|
||||
pager: null | PagerState
|
||||
picker: boolean
|
||||
secret: null | SecretReq
|
||||
skillsHub: boolean
|
||||
sudo: null | SudoReq
|
||||
}
|
||||
|
||||
|
||||
@ -9,13 +9,16 @@ const buildOverlayState = (): OverlayState => ({
|
||||
pager: null,
|
||||
picker: false,
|
||||
secret: null,
|
||||
skillsHub: false,
|
||||
sudo: null
|
||||
})
|
||||
|
||||
export const $overlayState = atom<OverlayState>(buildOverlayState())
|
||||
|
||||
export const $isBlocked = computed($overlayState, ({ approval, clarify, modelPicker, pager, picker, secret, sudo }) =>
|
||||
Boolean(approval || clarify || modelPicker || pager || picker || secret || sudo)
|
||||
export const $isBlocked = computed(
|
||||
$overlayState,
|
||||
({ approval, clarify, modelPicker, pager, picker, secret, skillsHub, sudo }) =>
|
||||
Boolean(approval || clarify || modelPicker || pager || picker || secret || skillsHub || sudo)
|
||||
)
|
||||
|
||||
export const getOverlayState = () => $overlayState.get()
|
||||
|
||||
@ -63,6 +63,10 @@ export function useInputHandlers(ctx: InputHandlerContext): InputHandlerResult {
|
||||
return patchOverlayState({ modelPicker: false })
|
||||
}
|
||||
|
||||
if (overlay.skillsHub) {
|
||||
return patchOverlayState({ skillsHub: false })
|
||||
}
|
||||
|
||||
if (overlay.picker) {
|
||||
return patchOverlayState({ picker: false })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user