-
-
Notifications
You must be signed in to change notification settings - Fork 113
[ISSUE] AI-Powered Goal Setting: #183 #227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
iffasadiq
wants to merge
10
commits into
eccentriccoder01:main
Choose a base branch
from
iffasadiq:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,264
β907
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The "goal planning file" is a Python script designed to create and manage mental health goals within a Streamlit application. It provides a user interface for both AI-generated and manually created goal plans. The file handles all the logic for data persistence, user interaction, and the display of goal-related information.
To integrate the goal planner, we first imported the render_goal_planning function into talkheal.py. We then added new session state variables to manage navigation, such as st.session_state.show_goal_planning = True. Finally, we added a new button to the main page that sets this state variable, and a new elif condition in the page routing logic to display the goal planner when the variable is true, completing the integration.
We create a data folder and a user_goals.json file to persistently store user goal information between sessions. Since Streamlit is a stateless web framework, it doesn't automatically save data. The data folder acts as a dedicated location to hold this information, while user_goals.json serves as a simple, human-readable database to save the user's goals, progress, and plans. This ensures that when a user returns to the app, their goals are not lost.
The change in addition of a new "π― Goal Planning" button to the sidebar's navigation. When a user clicks this button, the application's session state is updated: the st.session_state.show_goal_planning flag is set to True, while all other page-related flags (like show_chat_interface or show_mood_dashboard) are set to False. This action triggers a rerun of the application, causing the main content area to switch from the current page to the newly integrated goal planning interface.
Great work @iffasadiq, now please provide a working deployment link of your updated fork/PR... Thanks! |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π Related Issue
π― Rationale
π Summary of Changes
π§ Technical Details
β Testing
Test Coverage
Test Details
π Documentation
π Breaking Changes
π¨ User-Facing Changes
Frontend Changes
Backend/API Changes
π Checklist
Code Quality
Review Readiness
Security & Performance
π Deployment Notes
πΈ Screenshots/Demo
π Reviewer Notes