WordRevisionAgentTools Class
Provides agent tools for managing tracked changes (revisions) in Word documents. Handles accepting, rejecting, and querying document revisions.
Inherited Members
Namespace: Syncfusion.AI.AgentTools.Word
Assembly: Syncfusion.DocumentSDK.AI.AgentTools.dll
Syntax
public class WordRevisionAgentTools : AgentToolBase<WordDocument>
Constructors
WordRevisionAgentTools(DocumentStorageManager)
Initializes a new instance of the WordRevisionAgentTools class (Mode 2 — DocumentStorage).
Declaration
public WordRevisionAgentTools(DocumentStorageManager manager)
Parameters
| Type | Name | Description |
|---|---|---|
| DocumentStorageManager | manager | The document storage manager. |
WordRevisionAgentTools(WordDocumentManager)
Initializes a new instance of the WordRevisionAgentTools class (Mode 1 — InMemory).
Declaration
public WordRevisionAgentTools(WordDocumentManager manager)
Parameters
| Type | Name | Description |
|---|---|---|
| WordDocumentManager | manager | The document manager for managing Word documents. |
Methods
AcceptAllRevisions(String, String)
Accepts all revisions in a Word document.
Declaration
[Tool(Name = "AcceptAllRevisions", Description = "Accepts all revisions in the document and returns count.")]
public AgentToolResult AcceptAllRevisions([ToolParameter(Description = "The document ID (InMemory mode) or input file path (DocumentStorage mode)")] string documentIdOrFilePath, [ToolParameter(Description = "Output file path for saving the result (DocumentStorage mode only).")] string outputFilePath = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | documentIdOrFilePath | The document ID (InMemory mode) or input file path (DocumentStorage mode) of the document containing the TOC to update. |
| System.String | outputFilePath | Output file path for saving the result (DocumentStorage mode only). |
Returns
| Type | Description |
|---|---|
| AgentToolResult | Result indicating whether the revision acceptance was completed successfully. |
AcceptRevisionsByAuthor(String, String, String)
Accepts all revisions made by a specific author.
Declaration
[Tool(Name = "AcceptRevisionsByAuthor", Description = "Accepts all tracked change revisions made by a specific author in the Word document. documentIdOrFilePath: The document ID (InMemory mode) or input file path (DocumentStorage mode).")]
public AgentToolResult AcceptRevisionsByAuthor([ToolParameter(Description = "The document ID (InMemory mode) or input file path (DocumentStorage mode)")] string documentIdOrFilePath, [ToolParameter(Description = "The name of the author whose revisions should be accepted")] string author, [ToolParameter(Description = "Output file path for saving the result (DocumentStorage mode only).")] string outputFilePath = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | documentIdOrFilePath | The document ID (InMemory mode) or input file path (DocumentStorage mode) of the document containing the TOC to update. |
| System.String | author | The name of the author whose tracked revisions should be accepted. |
| System.String | outputFilePath | Output file path for saving the result (DocumentStorage mode only). |
Returns
| Type | Description |
|---|---|
| AgentToolResult | Result indicating whether the revision acceptance was completed successfully. |
RejectAllRevisions(String, String)
Rejects all revisions in a Word document.
Declaration
[Tool(Name = "RejectAllRevisions", Description = "Rejects all revisions in the document and returns count.")]
public AgentToolResult RejectAllRevisions([ToolParameter(Description = "The document ID (InMemory mode) or input file path (DocumentStorage mode)")] string documentIdOrFilePath, [ToolParameter(Description = "Output file path for saving the result (DocumentStorage mode only).")] string outputFilePath = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | documentIdOrFilePath | The document ID (InMemory mode) or input file path (DocumentStorage mode) of the document containing the TOC to update. |
| System.String | outputFilePath | Output file path for saving the result (DocumentStorage mode only). |
Returns
| Type | Description |
|---|---|
| AgentToolResult | Result indicating whether the revision rejection was completed successfully. |
RejectRevisionsByAuthor(String, String, String)
Rejects all revisions made by a specific author.
Declaration
[Tool(Name = "RejectRevisionsByAuthor", Description = "Rejects all tracked change revisions made by a specific author in the Word document. documentIdOrFilePath: The document ID (InMemory mode) or input file path (DocumentStorage mode).")]
public AgentToolResult RejectRevisionsByAuthor([ToolParameter(Description = "The document ID (InMemory mode) or input file path (DocumentStorage mode)")] string documentIdOrFilePath, [ToolParameter(Description = "The name of the author whose revisions should be rejected")] string author, [ToolParameter(Description = "Output file path for saving the result (DocumentStorage mode only).")] string outputFilePath = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | documentIdOrFilePath | The document ID (InMemory mode) or input file path (DocumentStorage mode). |
| System.String | author | The name of the author whose tracked revisions should be rejected. |
| System.String | outputFilePath | Output file path for saving the result (DocumentStorage mode only). |
Returns
| Type | Description |
|---|---|
| AgentToolResult | Result indicating whether the revision rejection was completed successfully. |