Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@aliciamatsumoto
Copy link
Contributor

@aliciamatsumoto aliciamatsumoto commented Jul 16, 2025

Key Changes

  • Adds an LLM prompt to generate tactical reports (conditions, actions, needs) from an incident's targeted Slack conversation
  • Adds an API endpoint and frontend functionality to call the prompt from an incident's tactical report view
  • The draft report auto-populates the relevant fields without saving, allowing for user review and edits
  • Ensures the endpoint requires the same incident permissions as manual tactical report generation to avoid unintentional information leaks

Next steps

image image image

@aliciamatsumoto aliciamatsumoto added the enhancement New feature or request label Jul 16, 2025
Alicia Matsumoto added 2 commits July 16, 2025 10:47
@whitdog47 whitdog47 requested review from Copilot and whitdog47 July 16, 2025 18:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds end-to-end support for AI-assisted tactical report generation from Slack conversations, including service logic, API exposure, and frontend integration.

  • Implements generate_tactical_report in the AI service with logging and error handling.
  • Exposes a new FastAPI GET endpoint /incidents/{id}/report/tactical/generate guarded by incident edit permissions.
  • Integrates Vuex store action, API client method, and UI button with loading state to draft reports in the incident report dialog.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/ai/test_ai_service.py Added comprehensive tests for generate_tactical_report scenarios
src/dispatch/static/dispatch/src/incident/store.js Added Vuex state, mutations, and action for tactical report loading
src/dispatch/static/dispatch/src/incident/api.js Added generateTacticalReport API client call
src/dispatch/static/dispatch/src/incident/ReportDialog.vue Added "Draft with GenAI" button and loading indicator
src/dispatch/incident/views.py New GET endpoint for AI-driven tactical report generation
src/dispatch/ai/service.py Implemented tactical report generation logic
src/dispatch/ai/models.py Introduced TacticalReport and TacticalReportResponse models
src/dispatch/ai/enums.py Added tactical_report_created event description
Comments suppressed due to low confidence (1)

src/dispatch/ai/service.py:716

  • The docstring still references a channel_id parameter that no longer exists. Update the Args section to reflect the actual parameters (db_session, incident, project, important_reaction).
        channel_id (str): The channel ID to target when fetching conversation history

@aliciamatsumoto aliciamatsumoto merged commit b377dfa into main Jul 16, 2025
9 checks passed
@aliciamatsumoto aliciamatsumoto deleted the can-report-generation branch July 16, 2025 18:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants