memoryのクエリと動作のテスト

This commit is contained in:
2026-04-28 11:37:41 +09:00
parent 4273d2a463
commit dfa6213c18
10 changed files with 820 additions and 648 deletions
+2 -2
View File
@@ -210,8 +210,8 @@ impl MemoryConfig {
fn merge(self, upper: Self) -> Self {
Self {
workspace_root: upper.workspace_root.or(self.workspace_root),
search_hit_limit: upper.search_hit_limit.or(self.search_hit_limit),
search_excerpt_lines: upper.search_excerpt_lines.or(self.search_excerpt_lines),
query_result_limit: upper.query_result_limit.or(self.query_result_limit),
query_excerpt_lines: upper.query_excerpt_lines.or(self.query_excerpt_lines),
}
}
}
+6 -6
View File
@@ -56,14 +56,14 @@ pub struct MemoryConfig {
/// absolute path.
#[serde(default)]
pub workspace_root: Option<PathBuf>,
/// Maximum number of hits returned by `MemorySearch` /
/// `KnowledgeSearch`. `None` ⇒ tool default (20).
/// Maximum number of records returned by `MemoryQuery` /
/// `KnowledgeQuery` per call. `None` ⇒ tool default (20).
#[serde(default)]
pub search_hit_limit: Option<usize>,
/// Lines of context before and after each match in search excerpts.
/// `None` ⇒ tool default (3).
pub query_result_limit: Option<usize>,
/// Lines of context before and after each match in query excerpts.
/// Ignored when the request omits `query`. `None` ⇒ tool default (3).
#[serde(default)]
pub search_excerpt_lines: Option<usize>,
pub query_excerpt_lines: Option<usize>,
}
/// Pod metadata.