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

Function createRunConfig

cli/src/utils/create-run-config.ts:96–128  ·  view source on GitHub ↗
(params: CreateRunConfigParams)

Source from the content-addressed store, hash-verified

94}
95
96export const createRunConfig = (params: CreateRunConfigParams) => {
97 const {
98 logger,
99 agent,
100 prompt,
101 content,
102 previousRunState,
103 agentDefinitions,
104 eventHandlerState,
105 costMode,
106 extraCodebuffMetadata,
107 } = params
108
109 return {
110 logger,
111 agent,
112 prompt,
113 content,
114 previousRun: previousRunState ?? undefined,
115 agentDefinitions,
116 maxAgentSteps: MAX_AGENT_STEPS_DEFAULT,
117 handleStreamChunk: createStreamChunkHandler(eventHandlerState),
118 handleEvent: createEventHandler(eventHandlerState),
119 signal: params.signal,
120 costMode,
121 extraCodebuffMetadata,
122 fileFilter: ((filePath: string) => {
123 if (isSensitiveFile(filePath)) return { status: 'blocked' }
124 if (isEnvTemplateFile(filePath)) return { status: 'allow-example' }
125 return { status: 'allow' }
126 }) satisfies FileFilter,
127 }
128}

Callers 1

useSendMessageFunction · 0.90

Calls 4

createStreamChunkHandlerFunction · 0.90
createEventHandlerFunction · 0.90
isSensitiveFileFunction · 0.85
isEnvTemplateFileFunction · 0.85

Tested by

no test coverage detected