mirror of
https://gitlab.com/TECHNOFAB/go-copilot-proxy.git
synced 2025-12-11 22:10:06 +01:00
34 lines
892 B
Go
34 lines
892 B
Go
package config
|
|
|
|
import (
|
|
"os"
|
|
"time"
|
|
|
|
"github.com/rs/zerolog"
|
|
"github.com/rs/zerolog/log"
|
|
)
|
|
|
|
const (
|
|
AuthURL = "https://api.github.com/copilot_internal/v2/token"
|
|
StaleLockTimeout = 5 * time.Minute
|
|
StaleLockCheckInterval = 1 * time.Minute
|
|
TokenRefreshBuffer = 2 * time.Minute
|
|
RetryInterval = 1 * time.Minute
|
|
|
|
GHDeviceCodeURL = "https://github.com/login/device/code"
|
|
GHOauthTokenURL = "https://github.com/login/oauth/access_token"
|
|
GHClientID = "Iv1.b507a08c87ecfe98"
|
|
GHScope = "read:user"
|
|
)
|
|
|
|
const (
|
|
UserAgent = "GitHubCopilotChat/0.26.7"
|
|
EditorVersion = "vscode/1.99.3"
|
|
EditorPluginVersion = "copilot-chat/0.26.7"
|
|
CopilotIntegrationID = "vscode-chat"
|
|
)
|
|
|
|
func InitLogging() {
|
|
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.RFC3339})
|
|
zerolog.SetGlobalLevel(zerolog.InfoLevel)
|
|
}
|