MCPcopy Index your code
hub / github.com/anomalyco/opencode / activeKeyLabel

Function activeKeyLabel

packages/tui/src/feature-plugins/system/which-key.tsx:114–119  ·  view source on GitHub ↗
(active: ActiveKey<Renderable, KeyEvent>)

Source from the content-addressed store, hash-verified

112}
113
114function activeKeyLabel(active: ActiveKey<Renderable, KeyEvent>) {
115 if (active.continues) return text(active.tokenName) ?? text(active.display) ?? UNKNOWN
116 return (
117 text(active.commandAttrs?.title) ?? text(active.bindingAttrs?.desc) ?? text(active.commandAttrs?.desc) ?? UNKNOWN
118 )
119}
120
121function activeKeyGroup(active: ActiveKey<Renderable, KeyEvent>) {
122 if (active.continues) return "System"

Callers 1

activeKeyEntryFunction · 0.85

Calls 1

textFunction · 0.70

Tested by

no test coverage detected