mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #1785] [Issue]: Knowledge agents drop file sources and active-lorebook controls #868
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#868
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?
Originally created by @Xelvanis on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1785
Originally assigned to: @SpicyMarinara on GitHub.
Summary
Knowledge Retrieval and Knowledge Router still expose knowledge-source setup, but several legacy-backed workflows appear broken in the current refactor runtime/UI:
sourceFileIdsnever become retrieval material.useChatActiveLorebooks === false, but the Agent Editor no longer exposes the chat-active-lorebooks toggle. Users cannot choose active-chat lorebooks vs fixed manual sources from the UI.Expected behavior
Knowledge Retrieval should include selected uploaded files in its source material. Knowledge Retrieval and Knowledge Router should expose the chat-active lorebook source toggle when configuring the built-in agents. If both knowledge agents are enabled, the UI copy and runtime behavior should agree: either they run in parallel, or the warning should say they run sequentially.
Actual behavior
Static comparison found these gaps:
src/features/catalog/agents/components/AgentEditor.tsxpersistssourceFileIdsfor Knowledge Retrieval, andsrc-tauri/src/commands/storage/knowledge.rscan extract knowledge-source text. However,src/engine/generation/agent-runner.tsonly loads lorebook entries throughloadKnowledgeSourceLorebookEntries()and passes only formatted lorebook content intoexecuteKnowledgeRetrieval().src/engine/generation/agent-runner.tsstill hassettings.useChatActiveLorebooks === falsehandling, but the current Agent Editor only loads/savessourceLorebookIdsandsourceFileIds; it does not expose the active-lorebook toggle that existed in the legacy editor.runKnowledgePreGenerationAgents()loops through knowledge agents with sequentialawaitcalls.Steps to reproduce
Impact area
Environment
cc81eb44Logs, screenshots, or video
No runtime logs or screenshots. Evidence is from static code inspection.
Relevant current refactor paths:
src/features/catalog/agents/components/AgentEditor.tsxsrc/engine/generation/agent-runner.tssrc-tauri/src/commands/storage/knowledge.rssrc-tauri/src/commands/storage/prompts.rsRelevant legacy comparison paths:
packages/client/src/components/agents/AgentEditor.tsxpackages/server/src/routes/generate.routes.tspackages/server/src/routes/generate/generate-route-utils.tsRegression notes
Legacy generation loaded
settings.sourceFileIds, resolved uploaded files, extracted file text, and appended it to Knowledge Retrieval material. Legacy Agent Editor also exposed a "Use this chat's active lorebooks" toggle and persisteduseChatActiveLorebooks.Issue #1050 previously covered making Knowledge Retrieval and Router use chat-active lorebooks. This report is about the remaining/current UI and runtime parity gaps after that closed work.
Additional context
Suggested repair direction:
settings.sourceFileIdsin Knowledge Retrieval source material without importing Tauri or shared API adapters into engine code.useChatActiveLorebooksfor both Knowledge Retrieval and Knowledge Router.The local sidecar embedding difference appears intentional in the current refactor and is not included in this issue.
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jun 1, 2026):
Fixed on
refactorinccce568e.\n\nWhat changed:\n- Added a storage-gateway capability for reading extracted knowledge-source text and wired the shared API adapter to the existingknowledge_source_textcommand.\n- Knowledge Retrieval now builds source material from both selected lorebook entries and selected uploaded knowledge-source files.\n- Restored the Agent Editor control foruseChatActiveLorebookson Knowledge Retrieval and Knowledge Router, including explicit persistence and default built-in settings.\n- Updated the dual-knowledge-agent warning so the UI no longer claims the agents run in parallel while the runtime executes them in the pre-generation pass.\n\nVerification:\n-pnpm typecheck\n-pnpm check:architecture\n-git diff --check