Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

608 B
Raw Blame
import { BRIDGE_EXTERNAL_NAVIGATION_GRANT } from '../mobile-web-shell/cancelled-navigation-target'
import { usePageBridgeClient } from '../transport/client-context.web'

// Older shells lack externalNavigation and cancel link taps silently; hide links while keeping the artifact and Source toggle usable (ruling 37.2).
// Read during render: init precedes mount and grants remain fixed for the document lifetime.
export function useHtmlPreviewLinkGrant(): boolean {
  const client = usePageBridgeClient()
  return client.getShellSession()?.grants.native.includes(BRIDGE_EXTERNAL_NAVIGATION_GRANT) === true
}