Skip to content

chore: dev to main merge#957

Merged
Avijit-Microsoft merged 10 commits into
mainfrom
dev
Jun 16, 2026
Merged

chore: dev to main merge#957
Avijit-Microsoft merged 10 commits into
mainfrom
dev

Conversation

@Ragini-Microsoft

Copy link
Copy Markdown
Contributor

Purpose

This pull request refactors two Python data processing scripts (03_cu_process_data_text.py and 04_cu_process_custom_data.py) and improves the chat history deletion logic in the frontend API (api.ts). The main goals are to streamline credential management, improve async handling, and make the "clear all chat history" feature more robust against missing API endpoints.

Credential and async handling improvements:

  • Refactored both 03_cu_process_data_text.py and 04_cu_process_custom_data.py to use a single shared AzureCliCredential instance for all Azure service clients, reducing redundant instantiations and ensuring credentials are properly closed at the end of execution. All async code is now run within an async main() function, using asyncio.run(main()) as the entry point. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]

  • Removed redundant or unnecessary credential instantiations and simplified agent creation/deletion by reusing credentials and ensuring proper cleanup with close() calls and exception handling. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

Frontend API improvements:

  • Enhanced the historyDeleteAll method in api.ts to fall back to paginated single-deletes if the bulk delete endpoint (/history/delete_all) is missing (e.g., returns 404), ensuring the "Clear All" feature works reliably across different deployments. The fallback fetches conversation IDs in pages and deletes them individually, with error handling for partial failures.

  • Updated the historyList function to accept a limit parameter for paginated fetching, supporting the fallback logic in historyDeleteAll.

Other code cleanup:

  • Removed unused SQL data type mapping in 03_cu_process_data_text.py for clarity.

These changes improve reliability, maintainability, and resource management across both backend data processing and frontend chat history operations.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors the two Content Understanding processing scripts to centralize Azure credential usage and run everything under a single async main() entrypoint, and it improves the frontend “clear all chat history” behavior by falling back to paginated single-deletes when the bulk delete endpoint is missing.

Changes:

  • Updated historyList to support a limit parameter and added a 404-only fallback path in historyDeleteAll that lists conversations in pages and deletes them individually.
  • Refactored 03_cu_process_data_text.py and 04_cu_process_custom_data.py to reuse a shared AzureCliCredential, consolidate async execution under main(), and add credential cleanup.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/App/src/api/api.ts Adds pagination support to history listing and a bulk-delete fallback to make “Clear All” more resilient across deployments.
infra/scripts/index_scripts/03_cu_process_data_text.py Restructures the text processing script into an async main() and reuses a shared Azure CLI credential across clients.
infra/scripts/index_scripts/04_cu_process_custom_data.py Restructures the custom data processing script similarly, including shared credentials and async orchestration for agent usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/App/src/api/api.ts
Comment thread src/App/src/api/api.ts
Comment thread infra/scripts/index_scripts/03_cu_process_data_text.py
Comment thread infra/scripts/index_scripts/04_cu_process_custom_data.py
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report •
FileStmtsMissCoverMissing
src/api/services
   chat_service.py1751293%64–65, 236–239, 243, 246, 257–258, 278–279
src/api/services/_patches
   agent_framework_search_citations.py876426%54, 58–59, 63, 67, 73, 78, 82–83, 88–96, 98–112, 117, 121–131, 134–135, 140–149, 155–160, 162
TOTAL140321684% 

Tests Skipped Failures Errors Time
163 0 💤 0 ❌ 0 🔥 5.275s ⏱️

fix: updated roleDefinitionIdOrName to use GUID and fixed CodeQL issue.
Comment thread src/api/services/chat_service.py
Comment thread src/api/services/_patches/agent_framework_search_citations.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Comment thread infra/main.json
Comment thread infra/scripts/index_scripts/03_cu_process_data_text.py
Comment thread infra/scripts/index_scripts/04_cu_process_custom_data.py
@Avijit-Microsoft Avijit-Microsoft merged commit a15dc79 into main Jun 16, 2026
29 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.23.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants