codexagent

package
v0.9.66 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLocalContextWindow          int64 = 8192
	DefaultRemoteContextWindowFallback int64 = 200000
)
View Source
const (
	ProviderID = "csghub_lite"
)

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() (string, error)

func ConfigPath

func ConfigPath() (string, error)

ConfigPath returns the path to Codex config.toml.

func ContextWindowForModel

func ContextWindowForModel(item api.ModelInfo, localFallback, remoteFallback int64) int64

func IsManagedConfig added in v0.9.25

func IsManagedConfig() bool

IsManagedConfig reports whether the live Codex config currently selects the provider owned by csghub-lite.

func IsManagedConfigData added in v0.9.25

func IsManagedConfigData(data []byte) bool

func LookupContextWindow

func LookupContextWindow(modelIDs ...string) (int64, bool)

func MatchesManagedProviderConfigData added in v0.9.34

func MatchesManagedProviderConfigData(data []byte, serverURL, apiKey string) bool

MatchesManagedProviderConfigData reports whether the Codex fields owned by csghub-lite still point at the expected local provider. Unrelated Codex settings are intentionally ignored because Codex updates them independently.

func RemoteDefaultContextWindow

func RemoteDefaultContextWindow(fallback int64) int64

func RemoveManagedConfig added in v0.9.25

func RemoveManagedConfig() error

RemoveManagedConfig removes only fields owned by legacy csghub-lite integrations. It is used when no pre-switch snapshot exists.

func RestoreNativeConfigData added in v0.9.34

func RestoreNativeConfigData(currentData, originalData []byte, originalExisted bool) error

RestoreNativeConfigData restores only the Codex fields managed by csghub-lite. Settings that Codex or the user changed after enabling OpenCSG remain untouched.

func SyncConfig

func SyncConfig(serverURL, apiKey, selectedModelID string, models []api.ModelInfo) error

SyncConfig writes Codex configuration to ~/.codex/config.toml so subsequent launches use csghub-lite as the model provider.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL