refactor(core): replace legacy logger with Effect logging (#31310)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
export * as ConfigCommand from "./command"
|
||||
|
||||
import path from "path"
|
||||
import * as Log from "@opencode-ai/core/util/log"
|
||||
import { Cause, Exit, Schema } from "effect"
|
||||
import { Glob } from "@opencode-ai/core/util/glob"
|
||||
import { ConfigCommandV1 } from "@opencode-ai/core/v1/config/command"
|
||||
@@ -9,8 +8,6 @@ import { configEntryNameFromPath } from "./entry-name"
|
||||
import { InvalidError } from "@opencode-ai/core/v1/config/error"
|
||||
import * as ConfigMarkdown from "./markdown"
|
||||
|
||||
const log = Log.create({ service: "config" })
|
||||
|
||||
const decodeInfo = Schema.decodeUnknownExit(ConfigCommandV1.Info)
|
||||
|
||||
export async function load(dir: string) {
|
||||
@@ -21,10 +18,7 @@ export async function load(dir: string) {
|
||||
dot: true,
|
||||
symlink: true,
|
||||
})) {
|
||||
const md = await ConfigMarkdown.parse(item).catch((err) => {
|
||||
log.error("failed to load command", { command: item, err })
|
||||
return undefined
|
||||
})
|
||||
const md = await ConfigMarkdown.parse(item).catch(() => undefined)
|
||||
if (!md) continue
|
||||
|
||||
const name = configEntryNameFromPath(path.relative(dir, item), ["command/", "commands/"])
|
||||
|
||||
Reference in New Issue
Block a user