core: cleaner error output and more flexible custom tool directories
- Removed debug console.log when dependency installation fails so users see clean warning messages instead of raw error dumps - Fixed database connection cleanup to prevent resource leaks between sessions - Added support for loading custom tools from both .opencode/tool (singular) and .opencode/tools (plural) directories, matching common naming conventions
This commit is contained in:
@@ -288,7 +288,6 @@ export namespace Config {
|
||||
// Install any additional dependencies defined in the package.json
|
||||
// This allows local plugins and custom tools to use external packages
|
||||
await Npm.install(dir).catch((err: any) => {
|
||||
console.log(err)
|
||||
log.warn("failed to install dependencies", { dir, error: err.message })
|
||||
})
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ export namespace Database {
|
||||
|
||||
export function close() {
|
||||
Client().$client.close()
|
||||
Client.reset()
|
||||
}
|
||||
|
||||
export type TxOrDb = Transaction | Client
|
||||
|
||||
Reference in New Issue
Block a user