Skip to content

Commit d21043e

Browse files
committed
prettier error message for importing agents
1 parent aac2a86 commit d21043e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

npm-app/src/agents/load-agents.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as fs from 'fs'
22
import * as path from 'path'
33

4-
import { getErrorObject } from '@codebuff/common/util/error'
54
import { cyan, green } from 'picocolors'
65

76
import { getAllTsFiles, getAgentsDirectory } from './agent-utils'
@@ -35,7 +34,9 @@ export async function loadLocalAgents({
3534
agentModule = await require(fullPath)
3635
} catch (error: any) {
3736
if (verbose) {
38-
console.error('Error importing agent:', getErrorObject(error))
37+
console.error(
38+
`Error importing agent: ${error.name} - ${error.message}\n${error.stack}`,
39+
)
3940
}
4041
continue
4142
}

0 commit comments

Comments
 (0)