MCPcopy
hub / github.com/anomalyco/opencode / Harness

Function Harness

packages/opencode/test/cli/run/footer.view.test.tsx:179–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177 let offKeymap: (() => void) | undefined
178
179 function Harness() {
180 const renderer = useRenderer()
181 const keymap = createDefaultOpenTuiKeymap(renderer)
182 offKeymap = registerOpencodeKeymap(keymap, renderer, config)
183
184 return (
185 <OpencodeKeymapProvider keymap={keymap}>
186 <RunFooterView
187 directory="/tmp"
188 findFiles={async () => []}
189 agents={() => []}
190 resources={() => []}
191 commands={() => input.commands ?? []}
192 providers={() => input.providers}
193 currentModel={() => input.currentModel}
194 variants={() => []}
195 currentVariant={() => input.currentVariant}
196 state={state}
197 view={view}
198 subagent={subagents}
199 theme={input.theme ?? (() => RUN_THEME_FALLBACK)}
200 tuiConfig={config}
201 backgroundSubagents={input.backgroundSubagents ?? true}
202 agent="opencode"
203 onSubmit={input.onSubmit ?? (() => true)}
204 onPermissionReply={() => {}}
205 onQuestionReply={() => {}}
206 onQuestionReject={() => {}}
207 onCycle={input.onCycle ?? (() => {})}
208 onInterrupt={() => false}
209 onEditorOpen={async () => undefined}
210 onInputClear={() => {}}
211 onExit={() => {}}
212 onModelSelect={() => {}}
213 onVariantSelect={() => {}}
214 onRows={() => {}}
215 onLayout={() => {}}
216 onStatus={() => {}}
217 onQueuedRemove={async () => true}
218 />
219 </OpencodeKeymapProvider>
220 )
221 }
222
223 const app = await testRender(
224 () => (

Callers

nothing calls this directly

Calls 2

registerOpencodeKeymapFunction · 0.90
pushMethod · 0.80

Tested by

no test coverage detected