Skip to main content

Module settings

Module settings 

Source
Expand description

~/.rpi/agent/settings.json — saved user defaults. Mirrors the slice of pi’s Settings interface (packages/coding-agent/src/core/settings-manager.ts) that rpi honors: defaultProvider / defaultModel / defaultThinkingLevel (consumed by provider::resolve as pi’s findInitialModel step 3 — the saved default, when authed, wins over the built-in fallback), theme, packages, and configurable resource directories.

pi’s Settings carries ~40 fields; rpi reads the fields it uses and drops the rest (serde default ignores unknown fields), so a copied pi settings.json parses clean.

Structs§

BranchSummarySettings
branchSummary — upstream’s BranchSummarySettings.
CompactionSettingsJson
compaction — upstream’s CompactionSettings.
RetrySettings
retry — upstream’s RetrySettings. provider is parsed but unused: it configures the provider SDK’s own retry loop, which rpi does not run.
Settings
The honored subset of pi’s Settings. Unknown fields are ignored.
TerminalSettings
upstream’s terminal settings block (TerminalSettings). Only the fields rpi can honor are modeled; unknown keys are ignored.

Enums§

QueueModeSetting
steeringMode / followUpMode — upstream’s queue drain modes.

Functions§

load_active_project_settings
Load the active project settings while preserving parse/read failures for callers that must fail closed, such as package install/update preflight.
load_effective_model_settings
Load model-selection settings with upstream’s global -> trusted-project precedence. Only fields consumed during provider resolution are overlaid; package and resource loading keeps its own scope-aware merge semantics.
load_project_settings
Load the single active project settings document. .rpi/settings.json is the only project settings file rpi reads.
load_project_settings_for_write
Load the project settings document that rpi may safely update.
load_project_settings_with_paths
Load the active project settings together with its source path.
load_settings
Load ~/.rpi/agent/settings.json. Missing file ⇒ Settings::default() (not an error). Malformed JSON ⇒ ConfigError::Json. Tolerates // line comments (a copied pi settings.json may contain them).
resolve_configured_paths
Resolve a configured path relative to its settings owner. Absolute paths are preserved; empty entries are ignored.
save_project_settings
Persist project-scoped settings under .rpi/settings.json.
save_settings
Persist the honored settings back to ~/.rpi/agent/settings.json. Unknown pi fields (which Settings doesn’t model) are preserved: the current file is read as raw JSON, the known fields are overlaid, and the merged object is written — so a copied pi settings.json survives edits without losing pi-only keys. // comments are accepted using the same parser as load_settings. Missing file ⇒ a fresh object. Existing files that cannot be parsed safely are left untouched and reported as errors.