Skip to content
Merged

Dev #67

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion cortex-mem-service/src/handlers/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ async fn search_layered(
semantic_options.threshold = (min_score * 0.5).max(0.0);

if let Some(thread_id) = thread {
let scope_uri = format!("cortex://session/{}", thread_id);
// Support both session ID and full URI format
// - "abc" -> "cortex://session/abc" (backward compatible)
// - "cortex://user/default" -> "cortex://user/default" (full URI)
let scope_uri = if thread_id.starts_with("cortex://") {
thread_id.to_string()
} else {
format!("cortex://session/{}", thread_id)
};
options.root_uri = Some(scope_uri.clone());
semantic_options.root_uri = Some(scope_uri);
}
Expand Down
4 changes: 4 additions & 0 deletions cortex-mem-service/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ pub struct AddMessageRequest {
#[derive(Debug, Deserialize)]
pub struct SearchRequest {
pub query: String,
/// Scope to limit search. Supports two formats:
/// - Session ID: "abc" -> searches within cortex://session/abc
/// - Full URI: "cortex://user/default" -> searches user memories
/// - Omit to search across all dimensions
pub thread: Option<String>,
pub limit: Option<usize>,
pub min_score: Option<f32>,
Expand Down
4 changes: 2 additions & 2 deletions examples/@memclaw/bin-darwin-arm64/bin/cortex-mem-service
Git LFS file not shown
2 changes: 1 addition & 1 deletion examples/@memclaw/bin-darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@memclaw/bin-darwin-arm64",
"version": "0.1.8",
"version": "0.1.9",
"description": "MemClaw binaries for macOS Apple Silicon",
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions examples/@memclaw/bin-linux-x64/bin/cortex-mem-service
Git LFS file not shown
2 changes: 1 addition & 1 deletion examples/@memclaw/bin-linux-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@memclaw/bin-linux-x64",
"version": "0.1.8",
"version": "0.1.9",
"description": "MemClaw binaries for Linux x64",
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion examples/@memclaw/plugin/dist/plugin-impl.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 16 additions & 12 deletions examples/@memclaw/plugin/dist/plugin-impl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/@memclaw/plugin/dist/plugin-impl.js.map

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions examples/@memclaw/plugin/dist/src/agents-md-injector.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading