refactor(core): replace legacy logger with Effect logging (#31310)
This commit is contained in:
@@ -2,12 +2,6 @@ import yargs from "yargs"
|
||||
import { TuiThreadCommand } from "./cli/cmd/tui"
|
||||
import { InstallationVersion } from "@opencode-ai/core/installation/version"
|
||||
import { hideBin } from "yargs/helpers"
|
||||
import { Log } from "./node"
|
||||
|
||||
Log.init({
|
||||
print: false,
|
||||
})
|
||||
|
||||
const cli = yargs(hideBin(process.argv))
|
||||
.parserConfiguration({ "populate--": true })
|
||||
.scriptName("opencode")
|
||||
@@ -29,5 +23,9 @@ const cli = yargs(hideBin(process.argv))
|
||||
describe: "run without external plugins",
|
||||
type: "boolean",
|
||||
})
|
||||
.middleware((opts) => {
|
||||
if (opts.printLogs) process.env.OPENCODE_PRINT_LOGS = "1"
|
||||
if (opts.logLevel) process.env.OPENCODE_LOG_LEVEL = opts.logLevel
|
||||
})
|
||||
.command(TuiThreadCommand)
|
||||
.parse()
|
||||
|
||||
Reference in New Issue
Block a user