Documentation
¶
Index ¶
- func FindCodexExecutable() string
- type EffectiveModelConfig
- type LocalReader
- func (r LocalReader) ModelConfig(ctx context.Context) (EffectiveModelConfig, error)
- func (r LocalReader) ModelConfigInputs() string
- func (r LocalReader) TaskTitleInputs() (string, error)
- func (r LocalReader) TaskTitles(ctx context.Context, taskIDs []string) (map[string]string, error)
- func (r LocalReader) UpdatedThreadRollouts(ctx context.Context, sinceMS int64) (string, []ThreadRollout, error)
- type ThreadRollout
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindCodexExecutable ¶
func FindCodexExecutable() string
FindCodexExecutable prefers the client bundled with the desktop app, so Codex Switch speaks the same client version as the app it serves.
Types ¶
type EffectiveModelConfig ¶
type LocalReader ¶
func DefaultReader ¶
func DefaultReader() (*LocalReader, error)
func (LocalReader) ModelConfig ¶
func (r LocalReader) ModelConfig(ctx context.Context) (EffectiveModelConfig, error)
ModelConfig reads Codex's effective, layered model configuration with the official config/read call. ChatGPT.app owns its app-server over private stdio, so this starts a one-shot app-server with no listener, performs one read and stops it. An absent provider means the built-in OpenAI provider; a nil URL means that provider uses its standard endpoint.
func (LocalReader) ModelConfigInputs ¶ added in v0.1.1
func (r LocalReader) ModelConfigInputs() string
ModelConfigInputs identifies every file Codex layers its effective config from, and the Codex executable, by inode, size and modification time. The effective config can change only when this does, so a caller starts an app-server to read it again only then. An absent file counts as an input: creating one changes the identity.
func (LocalReader) TaskTitleInputs ¶ added in v0.1.1
func (r LocalReader) TaskTitleInputs() (string, error)
TaskTitleInputs identifies Codex's thread database and its write-ahead log, where a new or renamed task lands first. Titles can change only when this does.
func (LocalReader) TaskTitles ¶
TaskTitles names the requested tasks from the current Codex home. A task takes the name Codex gave it. A task Codex did not name, such as a codex exec run, is named by how it was started and its project, for example "codex exec · codex-switch". Codex's stored title is the prompt's first line for those runs, so it is never shown.
func (LocalReader) UpdatedThreadRollouts ¶ added in v0.1.2
func (r LocalReader) UpdatedThreadRollouts(ctx context.Context, sinceMS int64) (string, []ThreadRollout, error)