Skip to content

Conversation

@M4xymm
Copy link
Member

@M4xymm M4xymm commented Dec 15, 2025

Artificial Action Support:

  • Added a new interface AiAgentArtificialActionResponse to represent artificial tool actions and their responses.
  • Updated the AiConversation class to maintain a list of artificial actions, and added two new methods: addArtificialActionWithResponse for string responses and addArtificialActionWithResponseObject for structured object responses, including input validation and optional object mapping. [1] [2]
  • Modified the conversation reset logic to clear artificial actions after each run.

Operation and Command Updates:

  • Updated RunConversationOperation and its internal command to accept and forward artificial actions, ensuring they are included in the operation payload. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Testing:

  • Added new tests in AiArtificialActionsTest.ts to verify input validation and serialization logic for artificial actions.

@M4xymm M4xymm requested review from Copilot and kalczur December 15, 2025 14:10
Copy link

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

This PR (v7.1.4 -> v7.1.5) introduces artificial action support for AI conversations, allowing developers to inject simulated tool actions and responses into conversation contexts.

Key changes:

  • Added AiAgentArtificialActionResponse interface and methods to inject artificial tool actions with string or object responses
  • Modified conversation run logic to include artificial actions in operation payloads and clear them after execution
  • Added comprehensive test coverage for input validation and serialization behavior

Reviewed changes

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

File Description
src/Documents/Operations/AI/Agents/AiAgentActionResponse.ts Introduced new AiAgentArtificialActionResponse interface to represent artificial tool actions
src/Documents/Operations/AI/AiConversation.ts Added artificial action management with validation methods and updated reset logic to clear artificial actions
src/Documents/Operations/AI/Agents/RunConversationOperation.ts Updated operation and command classes to accept and forward artificial actions in the payload
test/Ported/Documents/Operations/AiArtificialActionsTest.ts Added test suite for artificial action validation and serialization

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

- Introduced `AiAgentArtificialActionResponse` for handling artificial tool actions and responses.
- Updated `RunConversationOperation` and `AiConversation` to support artificial actions.
- Added methods for injecting artificial actions and responses into the conversation context.
- Enhanced internal logic to clear artificial actions after conversation execution.
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.

1 participant