feat(ui): add runtime logger and replace console usage

This commit is contained in:
Shantur Rathore
2025-12-05 15:07:49 +00:00
parent 49143bd049
commit 971abe24d7
44 changed files with 406 additions and 138 deletions

View File

@@ -4,6 +4,9 @@ import { useConfig } from "../stores/preferences"
import { serverApi } from "../lib/api-client"
import FileSystemBrowserDialog from "./filesystem-browser-dialog"
import { openNativeFileDialog, supportsNativeDialogs } from "../lib/native/native-functions"
import { getLogger } from "../lib/logger"
const log = getLogger("actions")
interface BinaryOption {
path: string
@@ -83,7 +86,7 @@ const OpenCodeBinarySelector: Component<OpenCodeBinarySelectorProps> = (props) =
setTimeout(() => {
pathsToValidate.forEach((path) => {
validateBinary(path).catch(console.error)
validateBinary(path).catch((error) => log.error("Failed to validate binary", { path, error }))
})
}, 0)
})