Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions claudear.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,16 @@ bot_role_id = ""
# Polling interval in milliseconds (overrides global)
poll_interval_ms = 300000

# Reply-chain conversation context. When a user replies to a message, resolve
# the reply thread and feed it to the agent as grounding, so follow-ups continue
# the conversation without re-quoting. Claudear's own prior answers are read from
# the DB; other users' messages are fetched from Discord. Defaults to true.
reply_chain_enabled = true

# Maximum number of ancestor messages to walk when building reply-chain context.
# Bounds Discord fetches and guards against very long threads. Defaults to 15.
reply_chain_max_depth = 15

# Slack as an issue source (messages become issues)
# Shared credentials (bot_token, channel_id) are inherited from notifiers.slack if not set here.

Expand Down
16 changes: 16 additions & 0 deletions crates/claudear-config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,15 @@ pub struct DiscordSourceConfig {
/// alongside `bot_id` so the source ingests the message regardless of which
/// form the sender picked from autocomplete.
pub bot_role_id: Option<String>,
/// When a message is a reply, resolve its reply thread into conversation
/// context and feed it to the agent (Claudear's own answers come from the
/// DB; other users' messages are fetched from Discord). `None` (omitted)
/// uses the default: enabled.
pub reply_chain_enabled: Option<bool>,
/// Maximum number of ancestor messages to walk when building reply-chain
/// context. Bounds fetches and guards against long threads. `None` (omitted)
/// uses the default: 15.
pub reply_chain_max_depth: Option<usize>,
}

/// Discord notifier-only configuration (for outbound notifications).
Expand Down Expand Up @@ -1269,6 +1278,11 @@ pub struct DiscordConfig {
pub bot_role_id: Option<String>,
/// Verbose per-message polling diagnostics for the Discord source.
pub debug_logging: bool,
/// Resolve reply threads into conversation context (see
/// `DiscordSourceConfig::reply_chain_enabled`).
pub reply_chain_enabled: bool,
/// Maximum ancestor messages to walk when building reply-chain context.
pub reply_chain_max_depth: usize,
}

/// Email (SMTP) notification configuration.
Expand Down Expand Up @@ -3266,6 +3280,8 @@ impl Config {
bot_role_id: src.and_then(|s| s.bot_role_id.clone()),
// Sourced from the global `debug_logging` flag, not per-source.
debug_logging: self.debug_logging,
reply_chain_enabled: src.and_then(|s| s.reply_chain_enabled).unwrap_or(true),
reply_chain_max_depth: src.and_then(|s| s.reply_chain_max_depth).unwrap_or(15),
}
}

Expand Down
Loading
Loading