Skip to content

Fix CLI errors and Postgres persistence - #6

Open
badalraj9 wants to merge 3 commits into
v5from
fix/cli-errors-postgres-persistence-10884017965887467943
Open

Fix CLI errors and Postgres persistence#6
badalraj9 wants to merge 3 commits into
v5from
fix/cli-errors-postgres-persistence-10884017965887467943

Conversation

@badalraj9

Copy link
Copy Markdown
Owner

This PR fixes several issues reported by the user:

  1. Postgres Persistence Failure: Modified MemoryClient._persist_to_postgres in memory_thread/sdk.py to call self.tms.persist_event(event) before updating entity_state. This ensures that the event record exists before the state record references it, resolving the foreign key constraint violation.
  2. Missing Dependencies: Added sentence-transformers to requirements.txt. The user also needs to download the spacy model en_core_web_sm (instructions provided/verified in plan).
  3. Slash Commands: Updated memory_thread/cli.py to intercept inputs starting with / in the chat loop and execute them as system commands using subprocess. This allows users to use commands like /provider use groq without exiting the chat or having them sent to the LLM.

PR created automatically by Jules for task 10884017965887467943 started by @badalraj9

- Ensure events are persisted before entity state in SDK to fix FK violation.
- Add `sentence-transformers` to requirements.txt.
- Implement slash command support in CLI chat loop.

Co-authored-by: badalraj9 <128183727+badalraj9@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 2 commits February 13, 2026 08:20
…deps

- Fix FK violation by persisting event before entity state in SDK.
- Add `sentence-transformers` to requirements.txt.
- Implement slash command support (`/provider ...`) in CLI chat loop.
- Add Qdrant client compatibility for `.search()` vs `.query_points()`.
- Improve logging for embeddings/NER import errors to aid debugging.
- Add logging to provider selection logic.

Co-authored-by: badalraj9 <128183727+badalraj9@users.noreply.github.com>
…ding

- Fix Postgres FK violation by persisting events before state.
- Add `sentence-transformers` to requirements.txt.
- Implement slash command support (`/provider ...`) in CLI chat.
- Add Qdrant client compatibility for `.search()` vs `.query_points()`.
- Add `load_dotenv()` to CLI entry point to fix missing API keys.
- Improve logging for embeddings/NER import errors.
- Unmask swallowed ImportError in `sdk.py`.

Co-authored-by: badalraj9 <128183727+badalraj9@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant