Files
orca/src/main/runtime/rpc/worktree-visibility-client-capability.ts
T
Brennan Benson 83e2123582 Add global worktree visibility source defaults (#14276)
* Add global external worktree visibility defaults

* Expand global worktree visibility source defaults

* Fix host-scoped visibility settings races

* Fix global worktree visibility integration

* Enable source visibility defaults on mobile

* Polish external worktree settings navigation

* Clarify inherited worktree visibility settings

* feat(sidebar): replace the inherited-visibility switch with a Show/Hide picker

Each source row now shows a two-segment Show / Hide control preselected to the
global setting, and explains itself only where the project actually disagrees:
an "Overriding global setting: <value>" card names the value being ignored.
Picking the segment global already holds drops the override instead of pinning
a duplicate, so the same control both overrides and reverts, retiring the
separate "Use global" link. The dialog footer now lists every inheritable
source with its global value.

* fix(sidebar): preserve reset for matching visibility overrides
2026-08-14 12:15:58 -07:00

14 lines
478 B
TypeScript

import { WORKTREE_VISIBILITY_SOURCE_DEFAULTS_RUNTIME_CAPABILITY } from '../../../shared/protocol-version'
import type { RpcContext } from './core'
export function supportsWorktreeVisibilitySourceDefaults(
context: Pick<RpcContext, 'clientCapabilities'>,
requestSupport = false
): boolean {
return (
requestSupport ||
context.clientCapabilities === undefined ||
context.clientCapabilities.includes(WORKTREE_VISIBILITY_SOURCE_DEFAULTS_RUNTIME_CAPABILITY)
)
}