Fix engram_compile: fetch pinned nodes directly when vector search empty
Replace scan-by-offset fallback with engram_get_node_json calls for the known high-salience identity nodes (family, origin). Offset-based scanning is order-dependent and unreliable; direct ID fetch is stable regardless of snapshot position. Ensures biographical context (Fox, Bobby, etc.) is always in the system prompt when vector search returns nothing.
This commit is contained in:
@@ -2,6 +2,7 @@ import "memory.el"
|
||||
import "awareness.el"
|
||||
import "chat.el"
|
||||
import "studio.el"
|
||||
import "elp-input.el"
|
||||
|
||||
fn strip_query(path: String) -> String {
|
||||
let q: Int = str_index_of(path, "?")
|
||||
@@ -246,6 +247,9 @@ fn handle_request(method: String, path: String, body: String) -> String {
|
||||
if str_eq(clean, "/synthesize") {
|
||||
return route_synthesize(body)
|
||||
}
|
||||
if str_eq(clean, "/api/elp/chat") {
|
||||
return handle_elp_chat(body)
|
||||
}
|
||||
if str_eq(clean, "/api/chat") {
|
||||
let agentic_flag: Bool = json_get_bool(body, "agentic")
|
||||
let reply: String = if agentic_flag {
|
||||
|
||||
Reference in New Issue
Block a user