Skip to content

Commit 3a02b50

Browse files
hiSandog陈家名陈家名jahooma
authored
fix: improve environment validation error messages (#461)
Co-authored-by: 陈家名 <chenjiaming@chenjiamingdeMacBook-Pro.local> Co-authored-by: 陈家名 <chenjiaming@icloud.com> Co-authored-by: James Grugett <jahooma@gmail.com>
1 parent cbd8af2 commit 3a02b50

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,19 @@ Learn more about the SDK [here](https://www.npmjs.com/package/@codebuff/sdk).
157157

158158
**SDK**: Build Codebuff into your applications. Create custom tools, integrate with CI/CD, or embed coding assistance into your products.
159159

160+
## Advanced Usage
161+
162+
### Custom Agent Workflows
163+
164+
Create your own agents with specialized workflows using the `/init` command:
165+
166+
```bash
167+
codebuff
168+
/init
169+
```
170+
171+
This creates a custom agent structure in `.agents/` that you can customize.
172+
160173
## Contributing to Codebuff
161174

162175
We ❤️ contributions from the community - whether you're fixing bugs, tweaking our agents, or improving documentation.

common/src/env.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { clientEnvSchema, clientProcessEnv } from './env-schema'
22

33
const parsedEnv = clientEnvSchema.safeParse(clientProcessEnv)
44
if (!parsedEnv.success) {
5-
throw parsedEnv.error
5+
console.error('Environment validation failed:', parsedEnv.error.errors)
6+
throw new Error(`Invalid environment configuration: ${parsedEnv.error.message}`)
67
}
78

89
export const env = parsedEnv.data

0 commit comments

Comments
 (0)