mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1405] [CLOSED] Fix memory recall provider embeddings #5072
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5072
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1405
Author: @Promansis
Created: 5/27/2026
Status: ❌ Closed
Base:
refactor← Head:fix/issue-1363📝 Commits (1)
e079749Fix memory recall provider embeddings📊 Changes
18 files changed (+672 additions, -60 deletions)
View changed files
📝
src-tauri/src/commands/storage/chats.rs(+283 -35)📝
src-tauri/src/commands/storage/commands/chats.rs(+4 -4)📝
src-tauri/src/commands/storage/commands/media.rs(+5 -0)📝
src-tauri/src/commands/storage/llm.rs(+40 -0)📝
src-tauri/src/commands/storage/prompts.rs(+102 -2)📝
src-tauri/src/http_dispatch.rs(+12 -6)📝
src-tauri/src/lib.rs(+1 -0)📝
src/engine/capabilities/llm.ts(+8 -0)📝
src/engine/contracts/types/chat.ts(+11 -1)📝
src/engine/generation/agent-runner.test.ts(+6 -0)📝
src/engine/generation/main-tool-loop.test.ts(+2 -0)📝
src/engine/generation/prompt-assembly.test.ts(+90 -0)📝
src/engine/generation/prompt-assembly.ts(+80 -3)📝
src/engine/generation/start-generation.ts(+3 -0)📝
src/engine/mari/mari-history.test.ts(+1 -0)📝
src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx(+13 -9)📝
src/shared/api/llm-api.ts(+10 -0)📝
src/shared/api/remote-runtime.ts(+1 -0)📄 Description
Linked issue
Closes #1363
Why this change
Memory Recall regressed during the refactor: chat memory refresh/import generated local lexical vectors only, while legacy staging could use configured provider or local-sidecar embeddings. Prompt assembly also queried memory recall with lexical vectors, so provider-vectorized memories could not be compared in the right vector space.
What changed
embeddingSource, model, connection, provider, updated-at) so recall knows which vector space each memory uses.llm_embedruntime command through the shared API, embedded Tauri command list, and remote-runtime allowlist/dispatch path.LlmGateway, compare provider memories only against matching provider query vectors, and skip mismatched/unavailable provider vectors instead of mixing lexical and provider spaces.Refactor impact
Primary owner:
Rust storage/provider transport, engine generation/prompt assembly, shared API runtime adapter, remote runtime dispatch, and shared chat settings UI.
Impact areas reviewed:
Boundary notes:
LlmGateway; it does not import Tauri, shared API adapters, React, or feature internals.Pressure points touched:
src-tauri/src/lib.rscommand registration.src-tauri/src/http_dispatch.rsremote invoke dispatch.src/shared/api/remote-runtime.tsallowlist.src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsxMemory Recall labels/copy.Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
Agent-run validation on the rebased branch:
pnpm checkpnpm buildpnpm test -- src/engine/generation/prompt-assembly.test.ts src/engine/generation/agent-runner.test.ts src/engine/generation/main-tool-loop.test.tscargo test --manifest-path src-tauri/Cargo.toml refresh_chat_memories_uses_configured_provider_embeddingscargo clippy --manifest-path src-tauri/Cargo.toml --workspace --all-targets -- -D warningsNo browser/Tauri manual verification or remote-runtime live smoke was performed.
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo docs were changed. This restores existing legacy behavior rather than adding a new documented feature.
UI evidence
No screenshots added. UI change is limited to Memory Recall text/labels showing provider vs lexical vector source.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.