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

Function activeKeyEntry

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

Source from the content-addressed store, hash-verified

124}
125
126function activeKeyEntry(api: TuiPluginApi, active: ActiveKey<Renderable, KeyEvent>): Entry {
127 const key = api.keys.formatSequence([
128 {
129 stroke: active.stroke,
130 display: active.display,
131 tokenName: active.tokenName,
132 },
133 ])
134 const label = activeKeyLabel(active)
135 return {
136 type: "entry",
137 key,
138 label: active.continues ? `+${label}` : label,
139 group: activeKeyGroup(active),
140 continues: active.continues,
141 }
142}
143
144function grouped(entries: Entry[]): Group[] {
145 const map = new Map<string, Entry[]>()

Callers 1

WhichKeyPanelFunction · 0.85

Calls 2

activeKeyLabelFunction · 0.85
activeKeyGroupFunction · 0.85

Tested by

no test coverage detected