Conversation
- Switched backend to use DatabaseSessionService (SQLite locally, Cloud SQL in prod). - Added database driver dependencies to ADK. - Updated service.template.yaml for Cloud SQL support. - Implemented automatic session title generation from the first message. - Added support for updating session state via PATCH. - Implemented inline session title editing in the Sidebar. - Updated ESLint/Prettier configs to handle monorepo environment and template files. Co-authored-by: MrOrz <108608+MrOrz@users.noreply.github.com>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the application's session management capabilities by introducing persistent storage for user sessions and enabling dynamic, user-editable titles. These changes provide a more robust and user-friendly experience, allowing sessions to be saved and easily identified, while also improving the backend's database integration and frontend's interactive elements. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request successfully implements database-backed session persistence and management of session titles. The changes span the backend, frontend, and infrastructure, including updates to use DatabaseSessionService, Cloud SQL integration, and new UI components for title display and editing. The implementation appears solid. I have a couple of minor suggestions regarding code clarity and configuration management to enhance maintainability.
| session_service=session_service | ||
| ) | ||
|
|
||
| root_agent = ai_writer |
There was a problem hiding this comment.
The root_agent is redefined here after the app object has been created. This is confusing and likely redundant if the application server is configured to use the app object, which encapsulates the agent and session service. To improve clarity and maintainability, please consider removing this line if it's not strictly necessary for a specific execution path. If it is required, a comment explaining its purpose would be very helpful.
| run.googleapis.com/container-dependencies: '{"ingress":["backend"]}' | ||
| autoscaling.knative.dev/minScale: "0" | ||
| autoscaling.knative.dev/maxScale: "3" | ||
| run.googleapis.com/cloudsql-instances: industrious-eye-145611:asia-east1:cofacts |
There was a problem hiding this comment.
The Cloud SQL instance connection string appears to contain a hardcoded project ID (industrious-eye-145611). Hardcoding project-specific identifiers can make the configuration less portable and harder to manage across different environments (e.g., dev, staging, prod). It's recommended to use a variable that can be substituted during deployment, similar to other variables in this file.
run.googleapis.com/cloudsql-instances: ${GCP_PROJECT_ID}:asia-east1:cofacts- Switch ADK backend to DatabaseSessionService (SQLite local, Cloud SQL prod) - Implement title generation from first message and storage in session state - Add inline session title editing in the sidebar - Refactor server functions and error handling to avoid client-side import errors - Update infrastructure for Cloud SQL connectivity Co-authored-by: MrOrz <108608+MrOrz@users.noreply.github.com>
Implemented database-backed session persistence and management of session titles as requested.
Key changes:
adk/cofacts_ai/agent.pyto useDatabaseSessionService, which defaults to a local SQLite database but can be configured viaDATABASE_URL. Wrapped the agent in theAppclass. Added necessary database driver dependencies (aiosqlite,asyncpg,aiomysql).service.template.yamlto include Cloud SQL instance annotations and environment variables.sessions.functions.tsto allow passing initial state during session creation and added a PATCH-based update function. Definedtitleas the session state key for titles.Fixes #15
PR created automatically by Jules for task 10403535399489104791 started by @MrOrz