Documentation
¶
Overview ¶
Package settings loads and validates user configuration for jungi.
Layers ¶
Configuration is composed from two layers, applied in order:
- User-level settings: ~/.config/jungi/settings.toml — loaded once at startup and shared across all sessions in the process.
- Project-level settings: <repo>/.jungi/settings.toml — loaded fresh for every new, cleared, or compacted session and merged on top of the user settings so repo-specific overrides take effect automatically.
The merge is deep: scalar and pointer fields in the project file override only when set; the [hooks] and [lsp.servers] maps are merged key-by-key so that changing one entry does not wipe sibling entries. See Merge and LoadProject for the merge semantics.
Loading ¶
Both files are optional. If a file does not exist, Load or LoadProject returns defaults (for user settings) or a zero value (for project settings) with no error — a missing file is not an error condition. If a file exists but cannot be parsed, an error is returned so the caller can surface the problem (user settings) or log a warning and proceed without project overrides (project settings).
Unrecognised keys in either file are ignored, and any field that is absent takes its default value, so partial files are fully supported.
Example settings.toml:
# Provider-prefixed model used for the main chat session (/new). [new] model = "anthropic__claude-sonnet-5" # Optional: reasoning-effort level for the main chat session. Valid # values: minimal, low, medium, high, xhigh, max. Omit (or leave empty) # to disable reasoning entirely. reasoning_effort = "high" # Optional: per-language LSP server overrides. The harness ships # a multi-language registry (gopls enabled by default, others # disabled). A [lsp.servers.<name>] table overrides individual # fields without re-specifying the whole entry. # # The `command` value supports shell-style expansion at startup: # $(cmd) command substitution via /bin/sh # $VAR env var expansion # ~/... home directory expansion # So e.g. command = "$(asdf which gopls)" is fine for asdf users. # # All built-in servers are disabled by default. Enable the ones # you need: [lsp.servers.gopls] enabled = true warmup = true [lsp.servers.rust-analyzer] enabled = true # Built-in hooks are disabled by default. Opt in by naming them under # [hooks.<name>] with enabled = true: [hooks.notify] enabled = true [hooks.github-pr] enabled = true draft = true # Optional: per-command model and reasoning-effort configuration applied # when the /plan, /execute, and /review slash commands are invoked. An # omitted `reasoning_effort` disables reasoning for that command. [plan] model = "anthropic__claude-opus-4-8" reasoning_effort = "high" # Optional: model override for the research subagent spawned by /plan. # Falls back to Haiku 4.5 when omitted. [plan.research_subagent] model = "anthropic__claude-sonnet-4-6" [execute] model = "anthropic__claude-sonnet-4-6" reasoning_effort = "medium" [review] model = "anthropic__claude-sonnet-4-6" reasoning_effort = "medium" # Optional: model override for the reviewer subagent spawned by /review # and review_ticket. Falls back to Haiku 4.5 when omitted. [review.reviewer_subagent] model = "anthropic__claude-sonnet-4-6" # Optional: connect to the jungi control remote messenger service so # inbound channel messages are injected as user turns and every user # and assistant turn is mirrored back over the same connection. # Disabled by default. [jungi_control] enabled = true url = "https://control.example.com" # Optional: enable the AI auto-approver for run_unsafe_shell commands, # which delegates the approve/deny decision to a model instead of # showing the manual confirmation overlay. Disabled by default. An # omitted model falls back to the auto-approver's built-in default # (Haiku 4.5). [auto_approve] enabled = true model = "anthropic__claude-haiku-4-5-20251001" # Optional: enable automatic session title generation after the second # complete turn. Disabled by default. An omitted model disables the # feature. reasoning_effort is optional. [session_title] enabled = true model = "anthropic__claude-haiku-4-5-20251001" reasoning_effort = "low"
Index ¶
- Constants
- func DefaultTemplate() []byte
- func ValidDataCollections() []string
- func ValidSorts() []string
- func Validate(s Settings) error
- type AutoApproveSettings
- type CommandConfig
- type CompactAutoSettings
- type CompactConfig
- type FeatureSet
- type HookEntry
- type HooksSettings
- type JungiControlSettings
- type LSPServerSettings
- type LSPSettings
- type ModelSetting
- func (m ModelSetting) Empty() bool
- func (m ModelSetting) Equal(other ModelSetting) bool
- func (m ModelSetting) Fallbacks() []string
- func (m ModelSetting) HasEmptyList() bool
- func (m ModelSetting) IDs() []string
- func (m ModelSetting) IsSet() bool
- func (m ModelSetting) Primary() string
- func (m *ModelSetting) UnmarshalTOML(data any) error
- type OpenRouterSettings
- type PlanConfig
- type ProviderSettings
- type ReviewConfig
- type SessionTitleSettings
- type Settings
- func (s Settings) ConfiguredModels() []model.ID
- func (s Settings) Features() FeatureSet
- func (s Settings) IsAutoApprove() bool
- func (s Settings) IsAutoCompact() bool
- func (s Settings) IsSessionTitle() bool
- func (s Settings) IsSkipWorktree() bool
- func (s Settings) SessionCreatingCommandModels() map[string]model.ID
- type SubagentConfig
Constants ¶
const ( DataCollectionAllow = "allow" DataCollectionDeny = "deny" SortPrice = "price" SortThroughput = "throughput" SortLatency = "latency" )
Valid [openrouter.provider] data_collection and sort values.
Variables ¶
This section is empty.
Functions ¶
func DefaultTemplate ¶ added in v0.2.0
func DefaultTemplate() []byte
DefaultTemplate returns the embedded default settings.toml content, used to scaffold a new user's configuration on first startup.
func ValidDataCollections ¶ added in v0.4.0
func ValidDataCollections() []string
ValidDataCollections returns the allowed data_collection values.
func ValidSorts ¶ added in v0.4.0
func ValidSorts() []string
ValidSorts returns the allowed sort values.
func Validate ¶
Validate checks that s carries only valid, provider-consistent values. It wraps the same validation Load applies when parsing a settings file, so callers that build or merge a Settings value programmatically (e.g. the session manager merging project-level overrides on top of user-level settings) can enforce the identical rules.
Types ¶
type AutoApproveSettings ¶
type AutoApproveSettings struct {
// Enabled controls whether the AI auto-approver is active for
// run_unsafe_shell commands. Defaults to false (nil = not set =
// disabled). Users must explicitly opt in with enabled = true.
Enabled *bool `toml:"enabled"`
// Model is the model identifier(s) used to evaluate auto-approval
// decisions. Empty falls back to the auto-approver's built-in default
// model (Haiku 4.5).
Model ModelSetting `toml:"model"`
}
AutoApproveSettings is the [auto_approve] table in settings.toml.
func (AutoApproveSettings) ModelID ¶ added in v0.4.0
func (a AutoApproveSettings) ModelID() model.ID
ModelID returns a.Model's primary model identifier as a model.ID value.
type CommandConfig ¶ added in v0.2.0
type CommandConfig struct {
// Model is the model identifier(s) to use for the command's session. Empty
// means the command has no model configured and is disabled.
Model ModelSetting `toml:"model"`
// ReasoningEffort is the reasoning-effort level (e.g. "minimal", "low",
// "medium", "high", "xhigh", "max"). Only meaningful alongside a Model
// in this section; empty (with a Model set) means reasoning is disabled.
ReasoningEffort string `toml:"reasoning_effort"`
}
CommandConfig holds the optional model and reasoning configuration for a slash command (/new, /plan, /execute, /review, /compact). An empty Model means "unset". Settings validation rejects reasoning_effort set without a Model in the same section, since a section with no model cannot express reasoning for one. reasoning_mode and reasoning_level are no longer accepted; a file that names either is rejected at decode.
func (CommandConfig) ModelID ¶ added in v0.2.0
func (c CommandConfig) ModelID() model.ID
ModelID returns c.Model's primary model identifier as a model.ID value, ready for use with the API client and model registry. Used uniformly across the command sections ([new], [plan], [execute], [review], [compact]).
type CompactAutoSettings ¶ added in v0.3.0
type CompactAutoSettings struct {
// Enabled controls whether idle autocompaction is active. Defaults to
// false (nil = not set = disabled). Users must explicitly opt in with
// enabled = true.
Enabled *bool `toml:"enabled"`
// IdleTimeout is a duration string (e.g. "50m") controlling how long
// the session may sit idle before autocompaction runs. Empty means
// unset. Ignored when Enabled is false.
IdleTimeout string `toml:"idle_timeout"`
}
CompactAutoSettings is the [compact.auto] table in settings.toml.
type CompactConfig ¶ added in v0.3.0
type CompactConfig struct {
CommandConfig
// Auto holds autocompaction gates: whether idle compaction is enabled
// and how long to wait after the last message.
Auto CompactAutoSettings `toml:"auto"`
}
CompactConfig holds the per-command model configuration for /compact and idle autocompaction, plus the nested [compact.auto] table.
type FeatureSet ¶ added in v0.2.0
type FeatureSet struct {
// New reports whether the main chat session (/new) has a configured
// model.
New bool
// Plan reports whether /plan has a configured model.
Plan bool
// Execute reports whether /execute has a configured model.
Execute bool
// Review reports whether /review has a configured model.
Review bool
// PlanResearchSubagent reports whether the research subagent spawned
// by /plan has a configured model.
PlanResearchSubagent bool
// ReviewReviewerSubagent reports whether the reviewer subagent spawned
// by /review and review_ticket has a configured model.
ReviewReviewerSubagent bool
// AutoApprove reports whether the AI auto-approver for
// run_unsafe_shell has a configured model.
AutoApprove bool
// Compact reports whether /compact and idle autocompaction have a
// configured model.
Compact bool
// SessionTitle reports whether automatic session title generation has a
// configured model.
SessionTitle bool
}
FeatureSet records which model-backed features a Settings value has configured. With no implicit model, a feature whose section carries no model is disabled: its slash command is hidden from the command palette and, for the plan/review subagents, its tool is withheld from the corresponding session. A single FeatureSet threads through both the idle command palette (computed from the startup-merged settings) and the per-session command palette (computed from a session's effective settings), so both consult the same eight slots.
type HookEntry ¶
type HookEntry struct {
// Enabled controls whether this hook fires. Defaults to false (nil =
// not set = disabled). Users must explicitly opt in with enabled = true.
Enabled *bool `toml:"enabled"`
// Events is the list of lifecycle events this hook should listen to.
// Used by the notify hook to restrict which events trigger a
// notification. An empty slice means all events the hook supports are
// active.
Events []string `toml:"events"`
// Draft, when non-nil and true, causes the github-pr hook to create
// draft pull requests instead of ready-for-review ones.
Draft *bool `toml:"draft"`
}
HookEntry holds the per-hook configuration for a single built-in hook.
type HooksSettings ¶
HooksSettings is the [hooks] table in settings.toml. Each map key is a built-in hook name; the value carries its configuration. A key that is absent means the hook is disabled.
type JungiControlSettings ¶
type JungiControlSettings struct {
// Enabled controls whether jungi connects to the jungi control service.
// Defaults to false (nil = not set = disabled). Users must explicitly
// opt in with enabled = true.
Enabled *bool `toml:"enabled"`
// URL is the base URL of the jungi control service, e.g.
// "https://control.example.com".
URL string `toml:"url"`
}
JungiControlSettings is the [jungi_control] table in settings.toml. It configures the connection to the jungi control remote messenger service.
func (JungiControlSettings) IsEnabled ¶
func (j JungiControlSettings) IsEnabled() bool
IsEnabled reports whether the jungi control connection is opted in. A nil Enabled pointer defaults to disabled.
type LSPServerSettings ¶
type LSPServerSettings struct {
Command string `toml:"command"`
Args []string `toml:"args"`
FileTypes []string `toml:"file_types"`
RootMarkers []string `toml:"root_markers"`
// Warmup, when true, asks the manager to spawn the server at session
// open rather than on first request. Defaults to false.
Warmup *bool `toml:"warmup"`
// Enabled controls whether this server is active. A nil pointer means
// "not specified" — the registry default applies. Users can explicitly
// enable a disabled-by-default server with `enabled = true` or disable
// a default server with `enabled = false`.
Enabled *bool `toml:"enabled"`
}
LSPServerSettings is the user-overridable shape of a single LSP server registry entry. All fields are optional; pointer-valued fields distinguish "explicitly cleared" from "not specified" where it matters.
type LSPSettings ¶
type LSPSettings struct {
// Enabled controls whether LSP support is active. A nil pointer means
// "not set" which defaults to enabled; users explicitly opt out with
// `enabled = false`.
Enabled *bool `toml:"enabled"`
// Servers maps a logical server name (e.g. "gopls") to its
// configuration. Entries here are merged on top of the built-in
// default registry: any field the user sets wins, anything they
// omit falls back to the default.
Servers map[string]LSPServerSettings `toml:"servers"`
}
LSPSettings groups all LSP-related user configuration.
func (LSPSettings) IsEnabled ¶
func (l LSPSettings) IsEnabled() bool
IsEnabled reports whether LSP support should be turned on. Missing or explicitly true → enabled; explicitly false → disabled.
type ModelSetting ¶ added in v0.4.0
type ModelSetting struct {
// contains filtered or unexported fields
}
ModelSetting represents a model configuration setting that accepts either a single model identifier string or an ordered list of model identifiers (the first being primary, subsequent ones being fallbacks).
The zero value is unset: ids == nil, HasEmptyList() == false, Empty() == true, and IsSet() == false. An omitted TOML field and an explicit empty string (`model = ""`) both decode as the zero value. An explicit empty list (`model = []`) decodes as Empty() && HasEmptyList() && IsSet(); Validate rejects it, but Merge must still treat it as set so the invalid override is not silently dropped before validation.
func NewModelSetting ¶ added in v0.4.0
func NewModelSetting(ids ...string) ModelSetting
NewModelSetting creates a ModelSetting from one or more model identifier strings. Empty strings are ignored.
func (ModelSetting) Empty ¶ added in v0.4.0
func (m ModelSetting) Empty() bool
Empty reports whether no model identifier is configured. True for both an omitted/unset field and an explicit empty list (`model = []`).
func (ModelSetting) Equal ¶ added in v0.4.0
func (m ModelSetting) Equal(other ModelSetting) bool
Equal reports whether m and other represent the same model setting.
func (ModelSetting) Fallbacks ¶ added in v0.4.0
func (m ModelSetting) Fallbacks() []string
Fallbacks returns the fallback model identifiers (all except the primary), or nil if there are no fallbacks configured. The returned slice aliases the receiver's storage; callers must not mutate it.
func (ModelSetting) HasEmptyList ¶ added in v0.4.0
func (m ModelSetting) HasEmptyList() bool
HasEmptyList reports whether an explicit empty list (`model = []`) was decoded.
func (ModelSetting) IDs ¶ added in v0.4.0
func (m ModelSetting) IDs() []string
IDs returns all configured model identifiers (primary followed by fallbacks), or nil if none are configured. The returned slice aliases the receiver's storage; callers must not mutate it.
func (ModelSetting) IsSet ¶ added in v0.4.0
func (m ModelSetting) IsSet() bool
IsSet reports whether a model value was present in TOML — a non-empty identifier list or an explicit empty list. An omitted field is not set.
func (ModelSetting) Primary ¶ added in v0.4.0
func (m ModelSetting) Primary() string
Primary returns the primary (first) model identifier, or "" if unconfigured.
func (*ModelSetting) UnmarshalTOML ¶ added in v0.4.0
func (m *ModelSetting) UnmarshalTOML(data any) error
UnmarshalTOML implements toml.Unmarshaler to decode a string or list of strings.
type OpenRouterSettings ¶ added in v0.4.0
type OpenRouterSettings struct {
// Provider configures OpenRouter provider routing preferences.
Provider ProviderSettings `toml:"provider"`
}
OpenRouterSettings is the [openrouter] table in settings.toml.
type PlanConfig ¶ added in v0.2.0
type PlanConfig struct {
CommandConfig
// ResearchSubagent overrides the model used for the research subagent.
// Empty means the research subagent is disabled.
ResearchSubagent SubagentConfig `toml:"research_subagent"`
}
PlanConfig holds the per-command model configuration for /plan plus the nested [plan.research_subagent] model override for the research subagent spawned by /plan.
type ProviderSettings ¶ added in v0.4.0
type ProviderSettings struct {
// ZDR restricts routing to Zero Data Retention endpoints when true.
ZDR *bool `toml:"zdr"`
// DataCollection controls whether providers may store user data.
// Valid values: DataCollectionAllow, DataCollectionDeny. Empty means unset.
DataCollection string `toml:"data_collection"`
// AllowFallbacks controls whether backup providers can serve requests
// when the primary or custom providers are unavailable.
AllowFallbacks *bool `toml:"allow_fallbacks"`
// Only restricts routing to the specified provider slugs.
// Slugs are not validated at load time; unknown values fail at request time.
Only []string `toml:"only"`
// Ignore excludes the specified provider slugs.
// Slugs are not validated at load time; unknown values fail at request time.
Ignore []string `toml:"ignore"`
// Order defines an ordered list of provider slugs to attempt.
// Slugs are not validated at load time; unknown values fail at request time.
Order []string `toml:"order"`
// Sort sets the sorting strategy if Order is not specified.
// Valid values: SortPrice, SortThroughput, SortLatency. Empty means unset.
Sort string `toml:"sort"`
// PreferredMaxLatency specifies the preferred maximum latency in seconds (p50).
// Must be greater than zero when set.
PreferredMaxLatency *float64 `toml:"preferred_max_latency"`
// PreferredMinThroughput specifies the preferred minimum throughput in tokens per second (p50).
// Must be greater than zero when set.
PreferredMinThroughput *float64 `toml:"preferred_min_throughput"`
}
ProviderSettings is the [openrouter.provider] table in settings.toml. All fields are optional; unset fields (nil pointers, empty strings, empty slices) are omitted from outgoing requests so OpenRouter defaults remain in force.
func (ProviderSettings) IsEmpty ¶ added in v0.4.0
func (p ProviderSettings) IsEmpty() bool
IsEmpty reports whether every field in p is unset (nil pointers, empty strings, empty slices). Used to omit the provider block from requests when the user has configured no routing preferences.
type ReviewConfig ¶ added in v0.2.0
type ReviewConfig struct {
CommandConfig
// ReviewerSubagent overrides the model used for the reviewer subagent.
// Empty means the reviewer subagent is disabled.
ReviewerSubagent SubagentConfig `toml:"reviewer_subagent"`
}
ReviewConfig holds the per-command model configuration for /review plus the nested [review.reviewer_subagent] model override for the reviewer subagent spawned by /review and review_ticket.
type SessionTitleSettings ¶ added in v0.3.0
type SessionTitleSettings struct {
// Enabled controls whether automatic session title generation is
// active. Defaults to false (nil = not set = disabled). Users must
// explicitly opt in with enabled = true.
Enabled *bool `toml:"enabled"`
// Model is the model identifier(s) used to generate session titles.
// Empty disables the feature.
Model ModelSetting `toml:"model"`
// ReasoningEffort is the optional reasoning-effort level (e.g.
// "minimal", "low", "medium", "high", "xhigh", "max"). Only meaningful
// alongside a Model in this section; empty (with a Model set) means
// reasoning is disabled.
ReasoningEffort string `toml:"reasoning_effort"`
}
SessionTitleSettings is the [session_title] table in settings.toml.
func (SessionTitleSettings) ModelID ¶ added in v0.4.0
func (s SessionTitleSettings) ModelID() model.ID
ModelID returns s.Model's primary model identifier as a model.ID value.
type Settings ¶
type Settings struct {
// New holds the model and reasoning configuration for the main chat
// session (/new).
New CommandConfig `toml:"new"`
// LSP holds language server configuration. Omitting the [lsp] table
// leaves Enabled=true and applies built-in defaults; setting
// `enabled = false` disables LSP entirely.
LSP LSPSettings `toml:"lsp"`
// AutoApprove holds the AI auto-approver configuration for
// run_unsafe_shell commands. The auto-approver delegates the
// approve/deny decision to a model instead of showing the manual
// confirmation overlay. Defaults to disabled.
//
// Breaking change: this was formerly a bare boolean (`auto_approve =
// true`); it is now a table. Existing configs must migrate to:
//
// [auto_approve]
// enabled = true
AutoApprove AutoApproveSettings `toml:"auto_approve"`
// SkipWorktree, when non-nil and true, causes jungi to operate directly
// on the source directory without creating a git worktree branch. The
// repo root is still detected for the plan store, but no worktree is
// created. Useful for new projects with no commits or when working
// directly on an existing branch. Defaults to false (nil pointer).
SkipWorktree *bool `toml:"skip_worktree"`
// Hooks holds the built-in hook opt-in table. Each key is a built-in
// hook name (e.g. "notify", "github-pr"); its value carries enable/disable
// and per-hook options. Built-in hooks are disabled by default and only
// become active when their entry carries enabled = true.
Hooks HooksSettings `toml:"hooks"`
// Plan holds the per-command model configuration applied when the
// /plan slash command is invoked.
Plan PlanConfig `toml:"plan"`
// Execute holds the per-command model configuration applied when the
// /execute slash command is invoked.
Execute CommandConfig `toml:"execute"`
// Review holds the per-command model configuration applied when the
// /review slash command is invoked.
Review ReviewConfig `toml:"review"`
// Compact holds the per-command model configuration applied when the
// /compact slash command is invoked and for idle autocompaction.
Compact CompactConfig `toml:"compact"`
// JungiControl holds the jungi control remote messenger service
// configuration. Disabled by default; opt in with enabled = true and a
// url.
JungiControl JungiControlSettings `toml:"jungi_control"`
// SessionTitle holds automatic session title generation configuration.
// Disabled by default; requires a model.
SessionTitle SessionTitleSettings `toml:"session_title"`
// OpenRouter holds provider preferences and routing settings applied to
// OpenRouter chat requests.
OpenRouter OpenRouterSettings `toml:"openrouter"`
}
Settings holds all user-configurable options for jungi.
Fields must remain backward compatible: adding a new field with a sensible zero-value default is always safe; removing or renaming a field is a breaking change for existing settings files.
func Load ¶
Load reads the TOML settings file at path and returns the resulting Settings.
If the file does not exist, Load returns a zero Settings with no error — a missing settings file is not an error condition, and with no implicit model configured, every feature is simply disabled until the user configures one. If the file exists but cannot be parsed, an error is returned so the caller can surface the problem to the user before proceeding with potentially wrong configuration.
Fields absent from the file retain their zero values, so partial files are fully supported.
func LoadEffective ¶ added in v0.2.0
LoadEffective resolves the effective settings for a process starting in cwd: the user-level settings merged with any project-level settings found at the git repo root containing cwd. This mirrors the per-session merge session.Manager applies when building a session's effective settings (see Merge), so a command palette gated on the result at startup cannot diverge from what a session created in the same directory would see.
If cwd is not inside a git repository, userSettings is returned unchanged — there is no project settings file to find. If cwd is inside a repo but no project settings file exists there, LoadProject's zero-value result merges to no-op, so userSettings is effectively returned unchanged too.
A project settings file that fails to parse, or whose merge with userSettings fails validation, is reported as an error; userSettings is still returned so the caller can fall back to it rather than fail startup outright.
func LoadProject ¶
LoadProject reads the project-level TOML settings file at path and returns the raw Settings found there, without applying any defaults.
The function is lenient by design: if the file is absent a zero Settings{} is returned with no error (a missing file is normal — most repos will not have one). If the file exists but cannot be parsed, the error is returned so the caller can log a warning; in that case no project overrides are applied and the user-level settings remain in effect unchanged.
Defaults are deliberately not applied: the returned value is intended to be passed to Merge as the override argument, so only fields explicitly set in the file should carry values.
func Merge ¶
Merge returns a new Settings that combines base and override using a deep merge strategy: scalar and pointer fields in override take effect only when they carry a non-zero value, and the Hooks and LSP.Servers maps are merged key-by-key so that adding or changing one hook or server entry does not silently wipe sibling entries from the base.
Merge is the mechanism by which project-level settings (<repo>/.jungi/settings.toml) are layered on top of user-level settings (~/.config/jungi/settings.toml). The base is the fully-defaulted user settings; the override is the raw project file parsed without defaults (see LoadProject). The result carries default-filled fields for anything the project file does not specify.
func (Settings) ConfiguredModels ¶ added in v0.2.0
ConfiguredModels returns the distinct model identifiers configured across all nine model slots ([new], [plan], [plan.research_subagent], [execute], [review], [review.reviewer_subagent], [auto_approve], [compact], [session_title]), including any fallback models. A model named by more than one section or slot is returned once. Order is not guaranteed.
func (Settings) Features ¶ added in v0.2.0
func (s Settings) Features() FeatureSet
Features returns the FeatureSet describing which model-backed features s has configured.
func (Settings) IsAutoApprove ¶
IsAutoApprove reports whether the AI auto-approver for run_unsafe_shell is enabled. A nil pointer means "not set" which defaults to disabled.
func (Settings) IsAutoCompact ¶ added in v0.3.0
IsAutoCompact reports whether idle autocompaction is enabled. A nil pointer means "not set" which defaults to disabled.
func (Settings) IsSessionTitle ¶ added in v0.3.0
IsSessionTitle reports whether automatic session title generation is enabled and configured with a model.
func (Settings) IsSkipWorktree ¶
IsSkipWorktree reports whether jungi should skip git worktree creation and operate directly on the source directory. A nil pointer means "not set" which defaults to disabled (worktrees are created normally).
func (Settings) SessionCreatingCommandModels ¶ added in v0.2.0
SessionCreatingCommandModels returns the resolved model identifier configured for each session-creating command ("new", "plan", "execute", "review"), keyed by command name. A command whose section carries no model maps to an empty model.ID. Used to resolve which provider's credential each command needs before creating a session — the model itself may already be checked separately via Features.
type SubagentConfig ¶ added in v0.2.0
type SubagentConfig struct {
// Model is the model identifier(s) to use for the subagent. Empty means
// the subagent is disabled.
Model ModelSetting `toml:"model"`
}
SubagentConfig holds an optional model identifier for a subagent. Unlike CommandConfig, it carries no reasoning_effort: subagents do not support configurable reasoning. An empty Model means the subagent is disabled.
func (SubagentConfig) ModelID ¶ added in v0.4.0
func (s SubagentConfig) ModelID() model.ID
ModelID returns s.Model's primary model identifier as a model.ID value.
Source Files
¶
- effective.go
- settings.go