Wire metrics client into memories extension (#24567)

## Summary

- let the memories extension capture the process-global OTEL metrics
client at install time
- keep app-server/TUI/exec extension construction APIs unchanged
- store the metrics client for future memory metrics without emitting
any metrics yet

## Test plan

- `just fmt`
- `just bazel-lock-update`
- `just bazel-lock-check`
- Not run: tests/clippy per request; CI will cover them
This commit is contained in:
jif-oai authored and GitHub committed 2026-05-26 13:56:46 +02:00
1 parent 3936ed221d
commit c37884d5eb
4 files changed
+24 -9

No files matched your search

+4 -4
View File
@@ -23,7 +23,7 @@ use crate::local::LocalMemoriesBackend;
#[test]
fn tools_are_not_contributed_without_thread_config() {
let extension = MemoriesExtension;
let extension = MemoriesExtension::default();
assert!(
extension
@@ -37,7 +37,7 @@ fn tools_are_not_contributed_without_thread_config() {
#[test]
fn tools_are_not_contributed_when_disabled() {
let extension = MemoriesExtension;
let extension = MemoriesExtension::default();
let thread_store = ExtensionData::new("thread");
thread_store.insert(MemoriesExtensionConfig {
enabled: false,
@@ -53,7 +53,7 @@ fn tools_are_not_contributed_when_disabled() {
#[test]
fn tools_are_contributed_when_enabled() {
let extension = MemoriesExtension;
let extension = MemoriesExtension::default();
let thread_store = ExtensionData::new("thread");
thread_store.insert(MemoriesExtensionConfig {
enabled: true,
@@ -111,7 +111,7 @@ async fn prompt_contribution_uses_memory_summary_when_enabled() {
.await
.expect("write memory summary");
let extension = MemoriesExtension;
let extension = MemoriesExtension::default();
let thread_store = ExtensionData::new("thread");
thread_store.insert(MemoriesExtensionConfig {
enabled: true,