@@ -2,17 +2,18 @@ import consola from "consola"
22import fs from "node:fs"
33import { FetchError } from "ofetch"
44
5- import { ENV } from "~/config/env"
5+ import { CONFIG } from "~/config/config"
6+ import { PATHS } from "~/config/paths"
67import { getGitHubUser } from "~/services/github/get-user/service"
78
89import type { parseCli } from "./cli"
910
10- import { PATHS } from "../config/paths"
1111import { TOKENS } from "../config/tokens"
1212import { getModels } from "../services/copilot/get-models/service"
1313import { getCopilotToken } from "../services/copilot/get-token/copilot-token"
1414import { getGitHubToken } from "../services/github/get-token/service"
1515import { CACHE } from "./cache"
16+ import { initializeLogger } from "./logger"
1617
1718interface InitStep {
1819 name : string
@@ -23,7 +24,7 @@ const initSteps: Array<InitStep> = [
2324 {
2425 name : "Emulation check" ,
2526 run : ( ) => {
26- if ( ENV . EMULATE_STREAMING ) {
27+ if ( CONFIG . EMULATE_STREAMING ) {
2728 consola . box ( "Streaming emulation is enabled." )
2829 }
2930 } ,
@@ -108,7 +109,11 @@ async function logUser() {
108109export async function initializeApp (
109110 options : Awaited < ReturnType < typeof parseCli > > ,
110111) {
111- ENV . EMULATE_STREAMING = options [ "emulate-streaming" ]
112+ CONFIG . EMULATE_STREAMING = options [ "emulate-streaming" ]
113+ CONFIG . LOGGING_ENABLED = options . logs
114+
115+ // Initialize logger if enabled
116+ initializeLogger ( )
112117
113118 await initialize ( )
114119
0 commit comments