Skip to content

Update conversation ID in copilot studio client when start_conversation is called - #195

Merged
Rodrigo Brandão (rodrigobr-msft) merged 3 commits into
microsoft:mainfrom
dineshkumar31:patch-1
Oct 22, 2025
Merged

Update conversation ID in copilot studio client when start_conversation is called#195
Rodrigo Brandão (rodrigobr-msft) merged 3 commits into
microsoft:mainfrom
dineshkumar31:patch-1

Conversation

@dineshkumar31

Copy link
Copy Markdown
Contributor

Fix ### Details

  1. Capture x-ms-conversationid from the start-conversation HTTP response when status is 200.
  2. Persist it to _current_conversation_id so all later ask_question calls target the correct conversation

Copilot AI review requested due to automatic review settings October 22, 2025 17:36

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 PR fixes a bug where the conversation ID was not being persisted after starting a new conversation. The fix captures the x-ms-conversationid header from successful HTTP responses and stores it in _current_conversation_id to ensure subsequent ask_question calls target the correct conversation.

Key Changes:

  • Added logic to extract and persist the conversation ID from response headers after successful API calls

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dineshkumar31

Copy link
Copy Markdown
Contributor Author

This pull request fixes this issue - #194

@rodrigobr-msft

Rodrigo Brandão (rodrigobr-msft) commented Oct 22, 2025

Copy link
Copy Markdown
Contributor

Could you run black (our formatter)? All you need to do is:

black ./libraries

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 1 out of 1 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@rodrigobr-msft
Rodrigo Brandão (rodrigobr-msft) merged commit b8108ff into microsoft:main Oct 22, 2025
6 checks passed
Copilot AI mentioned this pull request Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants