MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / dispatchAction

Function dispatchAction

cli/src/hooks/use-chat-keyboard.ts:113–272  ·  view source on GitHub ↗
(
  action: ChatKeyboardAction,
  handlers: ChatKeyboardHandlers,
)

Source from the content-addressed store, hash-verified

111}
112
113function dispatchAction(
114 action: ChatKeyboardAction,
115 handlers: ChatKeyboardHandlers,
116): boolean {
117 switch (action.type) {
118 case 'exit-input-mode':
119 handlers.onExitInputMode()
120 return true
121 case 'exit-feedback-mode':
122 handlers.onExitFeedbackMode()
123 return true
124 case 'clear-feedback-input':
125 handlers.onClearFeedbackInput()
126 return true
127 case 'clear-input':
128 handlers.onClearInput()
129 return true
130 case 'backspace-exit-mode':
131 handlers.onBackspaceExitMode()
132 return true
133 case 'interrupt-stream':
134 handlers.onInterruptStream()
135 return true
136 case 'slash-menu-down':
137 handlers.onSlashMenuDown()
138 return true
139 case 'slash-menu-up':
140 handlers.onSlashMenuUp()
141 return true
142 case 'slash-menu-tab':
143 handlers.onSlashMenuTab()
144 return true
145 case 'slash-menu-shift-tab':
146 handlers.onSlashMenuShiftTab()
147 return true
148 case 'slash-menu-select':
149 handlers.onSlashMenuSelect()
150 return true
151 case 'slash-menu-complete':
152 handlers.onSlashMenuComplete()
153 return true
154 case 'mention-menu-down':
155 handlers.onMentionMenuDown()
156 return true
157 case 'mention-menu-up':
158 handlers.onMentionMenuUp()
159 return true
160 case 'mention-menu-tab':
161 handlers.onMentionMenuTab()
162 return true
163 case 'mention-menu-shift-tab':
164 handlers.onMentionMenuShiftTab()
165 return true
166 case 'mention-menu-select':
167 handlers.onMentionMenuSelect()
168 return true
169 case 'mention-menu-complete':
170 handlers.onMentionMenuComplete()

Callers 1

useChatKeyboardFunction · 0.85

Calls 7

getProjectRootFunction · 0.90
readClipboardFilePathFunction · 0.90
isImageFileFunction · 0.90
readClipboardTextFunction · 0.90
getImageFilePathFromTextFunction · 0.90
hasClipboardImageFunction · 0.90
assertNeverFunction · 0.85

Tested by

no test coverage detected