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

Function commandShortcut

packages/tui/src/feature-plugins/system/which-key.tsx:158–164  ·  view source on GitHub ↗
(api: TuiPluginApi, name: string)

Source from the content-addressed store, hash-verified

156}
157
158function commandShortcut(api: TuiPluginApi, name: string) {
159 return useKeymapSelector((keymap) =>
160 api.keys.formatSequence(
161 keymap.getCommandBindings({ visibility: "registered", commands: [name] }).get(name)?.[0]?.sequence,
162 ),
163 )
164}
165
166function layout(value: unknown): Layout {
167 if (value === "overlay") return "overlay"

Callers 3

DialogHelpFunction · 0.85
HomeHintFunction · 0.85
WhichKeyPanelFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected