Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
feat(web): show the server version in the page footer
Gabriel Scharba8c0fb758b17
diff --git a/crates/ai-memory-web/src/templates.rs b/crates/ai-memory-web/src/templates.rsindex a985009e..087a0653 100644--- a/crates/ai-memory-web/src/templates.rs+++ b/crates/ai-memory-web/src/templates.rs@@ -2,6 +2,10 @@use askama::Template;+/// Server version shown in the footer of every page. Workspace crates share+/// one version, so this crate's version is the running server's.+pub(crate) const VERSION: &str = env!("CARGO_PKG_VERSION");+// ---------------------------------------------------------------------------// URL helpers// ---------------------------------------------------------------------------diff --git a/crates/ai-memory-web/templates/base.html b/crates/ai-memory-web/templates/base.htmlindex 11b9e525..678352b6 100644--- a/crates/ai-memory-web/templates/base.html+++ b/crates/ai-memory-web/templates/base.html@@ -64,8 +64,9 @@</main><footer class="border-t border-slate-200 dark:border-slate-800 mt-16 py-4">- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-xs text-slate-400 dark:text-slate-600">- ai-memory · read-only+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex items-center justify-between gap-4 text-xs text-slate-400 dark:text-slate-600">+ <span>ai-memory · read-only</span>+ <span>v{{ crate::templates::VERSION }}</span></div></footer></body>diff --git a/crates/ai-memory-web/tests/suite/routes.rs b/crates/ai-memory-web/tests/suite/routes.rsindex bc1e3778..b34d5c32 100644--- a/crates/ai-memory-web/tests/suite/routes.rs+++ b/crates/ai-memory-web/tests/suite/routes.rs@@ -98,6 +98,10 @@ async fn smoke_index_returns_200() {text.contains("scratch"),"expected project name in index response");+ assert!(+ text.contains(&format!("v{}", env!("CARGO_PKG_VERSION"))),+ "expected server version in footer"+ );}#[tokio::test]