This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Stores GenAI case analysis in JSON format in the database while preserving format on the Slack side #5300
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.
This pull request introduces several changes to enhance the
Casemodel and improve the handling of GenAI signal analysis messages in the Slack plugin. The most significant updates include adding a new JSONB column to theCasemodel, updating the Alembic migration script, and modifying the Slack plugin to handle JSON responses for GenAI analysis.Enhancements to
CaseModel:genai_analysiscolumn of typeJSONBto theCasemodel, with default values and non-null constraints (src/dispatch/case/models.py).CaseReadschema to include thegenai_analysisfield (src/dispatch/case/models.py).Alembic Migration:
genai_analysiscolumn in thecasetable (src/dispatch/database/revisions/tenant/versions/2024-10-08_b057c079c2d5.py).Slack Plugin Enhancements:
json_to_slack_formatto convert JSON dictionaries to Slack markup format (src/dispatch/plugins/dispatch_slack/case/messages.py) [1] [2].create_genai_signal_analysis_messagefunction to return a tuple containing the GenAI analysis message and Slack message blocks (src/dispatch/plugins/dispatch_slack/case/messages.py) [1] [2] [3] [4] [5].create_threadedmethod to store the GenAI analysis message in thegenai_analysisfield of theCasemodel (src/dispatch/plugins/dispatch_slack/plugin.py).These changes collectively improve the data structure and processing of GenAI analysis within the case management and Slack communication workflows.
