Skip to content

Commit 9258106

Browse files
committed
Update with AgentConfig
1 parent f540c2e commit 9258106

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"dependencies": {
3737
"@codebuff/code-map": "workspace:*",
3838
"@codebuff/common": "workspace:*",
39-
"@codebuff/sdk": "^0.1.3",
39+
"@codebuff/sdk": "^0.1.4",
4040
"@types/diff": "5.2.1",
4141
"@types/micromatch": "^4.0.9",
4242
"@vscode/ripgrep": "1.15.9",

npm-app/src/index.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { type CostMode } from '@codebuff/common/constants'
77
import { AnalyticsEvent } from '@codebuff/common/constants/analytics-events'
88
import { Command, Option } from 'commander'
99
import { red } from 'picocolors'
10-
import { CodebuffClient } from '@codebuff/sdk'
10+
import { CodebuffClient, type AgentConfig } from '@codebuff/sdk'
1111

1212
import { displayLoadedAgents, loadLocalAgents } from './agents/load-agents'
1313
import { CLI } from './cli'
@@ -79,12 +79,26 @@ async function codebuff({
7979
console.log('client created')
8080
console.log('starting run')
8181

82+
const agentConfig: AgentConfig = {
83+
id: 'my-awesome-agent',
84+
displayName: 'My awesome agent',
85+
model: 'openai/gpt-5',
86+
instructionsPrompt: 'Do something awesome',
87+
}
8288
const run = await client.run({
8389
agent: agent ?? 'base',
8490
prompt: initialInput ?? 'hi',
8591
handleEvent: (event) => {
8692
console.log('event:', event)
8793
},
94+
agentConfigs: [
95+
{
96+
id: 'my-awesome-agent',
97+
displayName: 'My awesome agent',
98+
model: 'openai/gpt-5',
99+
instructionsPrompt: 'Do something awesome',
100+
},
101+
],
88102
})
89103

90104
console.log('run1 complete')

0 commit comments

Comments
 (0)