refactor(core): replace legacy logger with Effect logging (#31310)

This commit is contained in:
Dax
2026-06-08 15:41:56 -04:00
committed by GitHub
parent 0a7cb20e66
commit c06ad7c881
152 changed files with 698 additions and 2243 deletions
+1 -7
View File
@@ -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/"])