feat: news notifications for the background collection and a collectedNews tool
Each collection target can announce new items at once or in a daily digest (off by default) in collect.notifyChannel, as titles and links only, with no LLM; each post is recorded in the activity log. The brain gets a read-only collectedNews tool (every target's newest items by default, fenced as untrusted web content), offered with the app's collection file and the collection feature, and available to scheduled tasks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ pub const FEATURE_TOOLS: &[(&str, &[&str])] = &[
|
||||
("browser", &["botBrowser"]),
|
||||
("schedule", &["schedule"]),
|
||||
("notes", &["personalNotes"]),
|
||||
("collect", &["collectedNews"]),
|
||||
];
|
||||
|
||||
/// The built-in tools of the features that are off.
|
||||
@@ -29,6 +30,7 @@ pub fn disabled_tools(f: &FeatureSettings) -> Vec<&'static str> {
|
||||
"browser" => f.browser,
|
||||
"schedule" => f.schedule,
|
||||
"notes" => f.notes,
|
||||
"collect" => f.collect,
|
||||
_ => f.meals,
|
||||
};
|
||||
FEATURE_TOOLS.iter().filter(|(k, _)| !on(k)).flat_map(|(_, tools)| tools.iter().copied()).collect()
|
||||
@@ -109,7 +111,7 @@ mod tests {
|
||||
let all_on = FeatureSettings { weather: true, web_search: true, meals: true, collect: true, browser: true, browser_share: true, schedule: true, notes: true };
|
||||
assert!(disabled_tools(&all_on).is_empty());
|
||||
let off = disabled_tools(&FeatureSettings { weather: false, web_search: true, meals: false, collect: false, browser: false, browser_share: false, schedule: false, notes: false });
|
||||
assert_eq!(off, vec!["getWeather", "logMeal", "fetchMeals", "deleteMeal", "botBrowser", "schedule", "personalNotes"]);
|
||||
assert_eq!(off, vec!["getWeather", "logMeal", "fetchMeals", "deleteMeal", "botBrowser", "schedule", "personalNotes", "collectedNews"]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user