Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 58f78cc6eb
ℹ️ 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".
| for item in coping_resources[:10]: | ||
| cat = item.get("category", "joy") | ||
| desc = f" ({item['description']})" if item.get("description") else "" | ||
| base_prompt += f"- [{cat}] {item['title']}{desc}\n" |
There was a problem hiding this comment.
Delimit saved resources as untrusted prompt data
When a resource title, category, or description contains instruction-like text—whether submitted through the REST endpoint or generated by a tool call—this interpolation places it verbatim inside the system message without the explicit “DATA, NOT INSTRUCTIONS” boundary used for profile and RAG content. A crafted resource can therefore persistently influence or override the assistant's safety behavior on subsequent chats; serialize these fields as data and explicitly instruct the model never to execute instructions contained in them.
Useful? React with 👍 / 👎.
| class ResourceRequest(BaseModel): | ||
| session_id: str = "default" | ||
| title: str | ||
| category: str = "joy" | ||
| description: str = "" |
There was a problem hiding this comment.
Reject resource categories outside the supported set
When an API caller submits a typo or unsupported category, this unconstrained string is persisted successfully. The frontend then labels the item as “Small Joys” via its fallback, but filtering to Small Joys excludes it because the stored value is not joy, so the item appears only in the all-items view and cannot be reached through its displayed category. Validate against joy, body, people, places, and creativity before storing, including in the tool-call path.
Useful? React with 👍 / 👎.
Includes all current workspace changes:\n\n- persistent Grounding Points resource bank with SQLite storage and API endpoints\n- assistant tools and prompt integration for personalized coping resources\n- localized two-pane UI with a separate creation flow\n- dialog evaluation cases, runner, scoring, and recorded report\n- knowledge-workspace scaffolding and Serena project configuration\n\nValidation:\n- 64 tests passed\n- JavaScript syntax checks passed\n- dialog JSON and Python artifacts validated\n- live desktop and mobile Grounding Points UI verified on localhost:8000