Add agentic local knowledge and API service foundation#14
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 552dd97687
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| filename = Path(uploaded.filename or "document").name | ||
| target = RAG_UPLOAD_DIR / filename | ||
| target.write_bytes(await uploaded.read()) | ||
| saved_paths.append(target) |
There was a problem hiding this comment.
Make uploaded filenames unique before indexing
When a multipart request includes two files with the same basename, this loop writes both to logs/rag_uploads/<name> and appends the same Path twice, so the later upload overwrites the earlier one and index_documents indexes duplicate copies of the last file while silently dropping the first. This can happen when users upload files with the same name from different folders; reject duplicate basenames or assign unique destinations before indexing.
Useful? React with 👍 / 👎.
| if update.target == "current_focus" and not update.append: | ||
| path = memory_writer.write_current_focus(update.content.strip()) | ||
| action = "replace" | ||
| else: | ||
| path = memory_writer.append_memory( |
There was a problem hiding this comment.
Honor append=false outside current_focus
When a client sends append=false for any target other than current_focus, /memory/preview reports action="replace", but /memory/commit falls through to append_memory and returns action="append". That makes the preview/commit contract misleading and causes a requested replacement of targets like progress or summary to append a new section instead; either implement replacement for those targets or reject/normalize append=false during preview.
Useful? React with 👍 / 👎.
Summary
Verification