Skip to content

Commit d503717

Browse files
kzucrickman
andauthored
Clarify exception handling in ConversationId property (#1457)
Update XML documentation to clarify exception behavior. See `ChatClientAgentThreadTests.SetConversationIdThrowsWhenMessageStoreIsSet` which already verifies this is the actual behavior. Co-authored-by: Chris <[email protected]>
1 parent 77247a3 commit d503717

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dotnet/src/Microsoft.Agents.AI/ChatClient/ChatClientAgentThread.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ internal ChatClientAgentThread(
7575
/// <remarks>
7676
/// <para>
7777
/// Note that either <see cref="ConversationId"/> or <see cref="MessageStore "/> may be set, but not both.
78-
/// If <see cref="MessageStore "/> is not null, and <see cref="ConversationId"/> is set, <see cref="MessageStore "/>
79-
/// will be reverted to null, and vice versa.
78+
/// If <see cref="MessageStore "/> is not null, setting <see cref="ConversationId"/> will throw an
79+
/// <see cref="InvalidOperationException "/> exception.
8080
/// </para>
8181
/// <para>
8282
/// This property may be null in the following cases:
@@ -91,6 +91,7 @@ internal ChatClientAgentThread(
9191
/// to fork the thread with each iteration.
9292
/// </para>
9393
/// </remarks>
94+
/// <exception cref="InvalidOperationException">Attempted to set a conversation ID but a <see cref="MessageStore"/> is already set.</exception>
9495
public string? ConversationId
9596
{
9697
get => this._conversationId;

0 commit comments

Comments
 (0)