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

Function config

packages/opencode/test/cli/run/runtime.boot.test.ts:59–90  ·  view source on GitHub ↗
(input?: {
  leader?: string
  leaderTimeout?: number
  diff_style?: "auto" | "stacked"
  bindings?: Partial<{
    commandList: string[]
    variantCycle: string[]
    interrupt: string[]
    historyPrevious: string[]
    historyNext: string[]
    inputClear: string[]
    inputSubmit: string[]
    inputNewline: string[]
  }>
})

Source from the content-addressed store, hash-verified

57}
58
59function config(input?: {
60 leader?: string
61 leaderTimeout?: number
62 diff_style?: "auto" | "stacked"
63 bindings?: Partial<{
64 commandList: string[]
65 variantCycle: string[]
66 interrupt: string[]
67 historyPrevious: string[]
68 historyNext: string[]
69 inputClear: string[]
70 inputSubmit: string[]
71 inputNewline: string[]
72 }>
73}): Resolved {
74 const bind = input?.bindings
75 return createTuiResolvedConfig({
76 diff_style: input?.diff_style,
77 leader_timeout: input?.leaderTimeout,
78 keybinds: {
79 ...(input?.leader && { leader: input.leader }),
80 ...(bind?.commandList && { command_list: bind.commandList }),
81 ...(bind?.variantCycle && { variant_cycle: bind.variantCycle }),
82 ...(bind?.interrupt && { session_interrupt: bind.interrupt }),
83 ...(bind?.historyPrevious && { history_previous: bind.historyPrevious }),
84 ...(bind?.historyNext && { history_next: bind.historyNext }),
85 ...(bind?.inputClear && { input_clear: bind.inputClear }),
86 ...(bind?.inputSubmit && { input_submit: bind.inputSubmit }),
87 ...(bind?.inputNewline && { input_newline: bind.inputNewline }),
88 },
89 })
90}
91
92describe("run runtime boot", () => {
93 afterEach(() => {

Callers 1

Calls 1

createTuiResolvedConfigFunction · 0.90

Tested by

no test coverage detected