()
| 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 | () => ( |
nothing calls this directly
no test coverage detected