mirror of
https://gitlab.com/TECHNOFAB/go-copilot-proxy.git
synced 2025-12-11 22:10:06 +01:00
chore: initial commit
This commit is contained in:
commit
595200836c
16 changed files with 1571 additions and 0 deletions
34
internal/config/config.go
Normal file
34
internal/config/config.go
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue