2026-03-05 19:17:22 -05:00
|
|
|
// Context gathering for idle prompts.
|
|
|
|
|
//
|
cleanup: fix all build warnings, delete dead DMN context code
- Delete poc-daemon/src/context.rs dead code (git_context, work_state,
irc_digest, recent_commits, uncommitted_files) — replaced by
where-am-i.md and memory graph
- Remove unused imports (BufWriter, Context, similarity)
- Prefix unused variables (_store, _avg_cc, _episodic_ratio, _message)
- #[allow(dead_code)] on public API surface that's not yet wired
(Message::assistant, ConversationLog::message_count/read_all,
Config::context_message, ContextInfo fields)
- Fix to_capnp macro dead_code warning
- Rename _rewrite_store_DISABLED to snake_case
Only remaining warnings are in generated capnp code (can't fix).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:20:34 -04:00
|
|
|
// Notifications are handled by the notify module and passed
|
|
|
|
|
// in separately by the caller. Git context and IRC digest
|
|
|
|
|
// are now available through where-am-i.md and the memory graph.
|
2026-03-05 19:17:22 -05:00
|
|
|
|
cleanup: fix all build warnings, delete dead DMN context code
- Delete poc-daemon/src/context.rs dead code (git_context, work_state,
irc_digest, recent_commits, uncommitted_files) — replaced by
where-am-i.md and memory graph
- Remove unused imports (BufWriter, Context, similarity)
- Prefix unused variables (_store, _avg_cc, _episodic_ratio, _message)
- #[allow(dead_code)] on public API surface that's not yet wired
(Message::assistant, ConversationLog::message_count/read_all,
Config::context_message, ContextInfo fields)
- Fix to_capnp macro dead_code warning
- Rename _rewrite_store_DISABLED to snake_case
Only remaining warnings are in generated capnp code (can't fix).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:20:34 -04:00
|
|
|
/// Build context string for a prompt.
|
2026-03-05 19:17:22 -05:00
|
|
|
/// notification_text is passed in from the notify module.
|
2026-03-16 17:09:27 -04:00
|
|
|
pub fn build(_include_irc: bool, notification_text: &str) -> String {
|
|
|
|
|
// Keep nudges short — Claude checks notifications via
|
|
|
|
|
// `poc-daemon status` on its own. Just mention the count.
|
|
|
|
|
let count = notification_text.matches("[irc.").count()
|
|
|
|
|
+ notification_text.matches("[telegram.").count();
|
|
|
|
|
if count > 0 {
|
|
|
|
|
format!("{count} pending notifications")
|
|
|
|
|
} else {
|
|
|
|
|
String::new()
|
2026-03-05 19:17:22 -05:00
|
|
|
}
|
|
|
|
|
}
|