Skip to content

Commit 1269121

Browse files
refactor: remove org-specific quiet mode hooks
1 parent a81e1ef commit 1269121

2 files changed

Lines changed: 5 additions & 49 deletions

File tree

src/agent/channel.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ impl Channel {
483483
) -> Result<bool> {
484484
if message.source != "telegram"
485485
|| message.source == "system"
486-
|| self.deps.agent_id.as_ref() != "lumia-marketing-intel"
487486
|| raw_text.trim() != "/digest"
488487
{
489488
return Ok(false);
@@ -1045,12 +1044,9 @@ impl Channel {
10451044
return Ok(());
10461045
}
10471046

1048-
// Deterministic liveness ping for Telegram mention checks in the marketing intel channel.
1047+
// Deterministic liveness ping for Telegram mentions.
10491048
// This avoids model/provider flakiness for simple "you there?" style checks.
1050-
if message.source == "telegram"
1051-
&& self.deps.agent_id.as_ref() == "lumia-marketing-intel"
1052-
&& message.source != "system"
1053-
{
1049+
if message.source == "telegram" && message.source != "system" {
10541050
let text = raw_text.trim().to_lowercase();
10551051
let mention = message
10561052
.metadata
@@ -1114,9 +1110,7 @@ impl Channel {
11141110
}
11151111
}
11161112

1117-
let rewritten_text = if message.source == "telegram"
1118-
&& self.deps.agent_id.as_ref() == "lumia-marketing-intel"
1119-
{
1113+
let rewritten_text = if message.source == "telegram" {
11201114
match raw_text.trim() {
11211115
"/digest" => {
11221116
"generate a day digest for this channel for today (from local 00:00 to now), concise and useful. preferred format and order: 1) top decisions (what was decided), 2) key convo themes (high-level discussion summary), 3) open loops (pending calls/questions). keep it short, practical, and non-cringe. if there is no meaningful activity in that window, say exactly: no material updates today.".to_string()

src/tools/reply.rs

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -72,46 +72,8 @@ impl ReplyTool {
7272
}
7373
}
7474

75-
fn enforce_agent_style(agent_id: &str, content: &str) -> String {
76-
if agent_id != "lumia-marketing-intel" {
77-
return content.to_string();
78-
}
79-
80-
let mut styled = content.to_lowercase();
81-
styled = styled.replace("i'm your assistant in this channel.", "yeah i'm here.");
82-
styled = styled.replace("i’m your assistant in this channel.", "yeah i'm here.");
83-
styled = styled.replace("how can i help", "what do you need");
84-
styled = styled.replace("certainly", "yep");
85-
styled = styled.replace("absolutely", "yep");
86-
styled = styled.replace("of course", "yep");
87-
styled = styled.replace("i can help with that", "yeah i can do that");
88-
89-
// Add a mild punchier sign-off when no profanity is present and this isn't a
90-
// structured digest-style response.
91-
let is_structured = ["decisions:", "tasks:", "risks:", "next 24h:"]
92-
.iter()
93-
.any(|prefix| styled.trim_start().starts_with(prefix));
94-
let has_swear = [" damn", " hell", " shit", " fuck", " fucking"]
95-
.iter()
96-
.any(|token| styled.contains(token));
97-
98-
if !is_structured && !has_swear && !styled.trim().is_empty() {
99-
let seed = styled
100-
.as_bytes()
101-
.iter()
102-
.fold(0usize, |acc, b| acc + (*b as usize));
103-
// Keep the "unhinged" flavor occasional, not constant.
104-
if seed % 5 == 0 {
105-
let suffix = match (seed / 5) % 3 {
106-
0 => " let's fucking move.",
107-
1 => " let's go crush it.",
108-
_ => " let's ship this shit.",
109-
};
110-
let base = styled.trim_end_matches(['.', '!', '?', ' ']);
111-
styled = format!("{base}.{suffix}");
112-
}
113-
}
114-
styled
75+
fn enforce_agent_style(_agent_id: &str, content: &str) -> String {
76+
content.to_string()
11577
}
11678

11779
fn cards_to_text(cards: &[crate::Card]) -> String {

0 commit comments

Comments
 (0)