fix: keep embedded session controls visible and handle empty memory
Publish documentation / publish (push) Successful in 34s
Publish documentation / publish (push) Successful in 34s
Cap the embedded shell at its portal container height so steering and stop controls remain accessible. Skip vector retrieval for an empty authoritative Memory archive and compute SQL-rule embeddings lazily. Validated with 54 Memory tests, 90 frontend tests, five browser scenarios, frontend and Docker builds, and a read-only comparison against the real empty Memory archive.
This commit is contained in:
@@ -129,7 +129,10 @@ class MemoryService:
|
||||
if not question.strip():
|
||||
raise ValueError("Recall question must not be empty")
|
||||
scope = scope or RecallScope()
|
||||
self.repository.list(CardQuery(page_size=1))
|
||||
# PostgreSQL is authoritative: an empty archive needs no search projection.
|
||||
# Still read it first so archive failures cannot masquerade as zero results.
|
||||
if self.repository.list(CardQuery(page_size=1))["total"] == 0:
|
||||
return []
|
||||
kinds = (["solved_question"] if family == "solved_question" else
|
||||
["memory"] if family else ["memory", "solved_question"])
|
||||
hits = searcher.search(embedder.embed_query(question),
|
||||
|
||||
Reference in New Issue
Block a user