Skip to content

Navigator Agent#122

Merged
KarmaKamikaze merged 6 commits intodevfrom
feature/navigator_agent
Apr 22, 2025
Merged

Navigator Agent#122
KarmaKamikaze merged 6 commits intodevfrom
feature/navigator_agent

Conversation

@KarmaKamikaze
Copy link
Copy Markdown
Owner

@KarmaKamikaze KarmaKamikaze commented Apr 10, 2025

This pull request introduces several new features and enhancements to the ChatRPG application, focusing on improving game logic, handling game-over states, and enhancing campaign interactions. Key changes include adding a GameOver property to campaigns, integrating a new ReActNavigatorAgent for graph updates, and refining user prompt handling to incorporate adherence verdicts and graph summaries.

Game State Management:

  • Added a GameOver property to the Campaign model and database schema, allowing campaigns to track whether the game has ended. (ChatRPG/Data/Models/Campaign.cs - [1] ChatRPG/Data/Migrations/20250422082802_AddGameOverToCampaign.cs - [2] ChatRPG/Data/Migrations/ApplicationDbContextModelSnapshot.cs - [3]
  • Updated user input handling to disable interactions when the campaign is in a GameOver state. (ChatRPG/Pages/CampaignPage.razor - ChatRPG/Pages/CampaignPage.razorL107-R115)

Graph Update Enhancements:

  • Introduced ReActNavigatorAgent to review and update the narrative graph based on user input and adherence verdicts. (ChatRPG/Program.cs - [1] ChatRPG/Services/GameInputHandler.cs - [2] [3]
  • Added methods to determine the End node of a narrative graph and check if the game has reached its conclusion. (ChatRPG/Data/Models/NarrativeGraph.cs - ChatRPG/Data/Models/NarrativeGraph.csR34-R38)

User Interaction Improvements:

  • Enhanced user prompt processing to include adherence verdicts and graph update summaries in system prompts. (ChatRPG/API/Tools/UpdateGraphTool.cs - [1] [2] ChatRPG/Services/GameInputHandler.cs - [3] [4]
  • Refined the initialization of campaign messages to prevent redundant calls during the first render. (ChatRPG/Pages/CampaignPage.razor.cs - [1] [2]

Backend Adjustments:

  • Updated ReActArchivistAgent to store game-over messages in the campaign's message history. (ChatRPG/Services/ReActArchivistAgent.cs - [1] [2]
  • Simplified the ReActExaminerAgent by removing unused parameters in tool creation methods. (ChatRPG/Services/ReActExaminerAgent.cs - [1] [2]

These changes collectively enhance the game's narrative flow, improve the handling of edge cases, and introduce a more robust mechanism for managing game-over states.

Co-authored-by: Sarmisuper <stharm20@student.aau.dk>
@KarmaKamikaze KarmaKamikaze added the enhancement New feature or request label Apr 10, 2025
KarmaKamikaze and others added 3 commits April 14, 2025 09:58
- Inform narrator about Examiner's verdict in Do/Say actions
- Inform narrator about Navigator's graph update summary in Do/Say
  actions
Co-authored-by: Sarmisuper <stharm20@student.aau.dk>
@KarmaKamikaze KarmaKamikaze marked this pull request as ready for review April 22, 2025 13:06
@KarmaKamikaze KarmaKamikaze requested a review from Copilot April 22, 2025 13:08
Copy link
Copy Markdown

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 pull request introduces significant enhancements to the ChatRPG application by adding game-over state handling, narrative graph progression via a new ReActNavigatorAgent, and improved user interaction through refined prompt processing. Key changes include:

  • Adding a GameOver property and corresponding migration updates.
  • Implementing the ReActNavigatorAgent to update the narrative graph based on user inputs and adherence verdicts.
  • Refining user prompt handling with asynchronous processing and enhanced UI logic.

Reviewed Changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ChatRPG/Services/SystemPromptType.cs Added GameOver enum value
ChatRPG/Services/ReActScribeAgent.cs Augmented document processing with a last page notice
ChatRPG/Services/ReActNavigatorAgent.cs Introduced a new agent to manage narrative graph updates
ChatRPG/Services/ReActExaminerAgent.cs Removed redundant tool parameters
ChatRPG/Services/ReActArchivistAgent.cs Updated message storage to include a game end message
ChatRPG/Services/GameInputHandler.cs Enhanced prompt handling with GameOver checks and graph updates
ChatRPG/Pages/CampaignPage.razor(.cs) Adjusted campaign initialization and UI disable states
ChatRPG/Data/Models/NarrativeGraph.cs Added GetEndNode method for narrative graph processing
ChatRPG/Data/Models/Campaign.cs Added GameOver property
ChatRPG/Data/Migrations/* Database schema updates to support GameOver
ChatRPG/API/Tools/UpdateGraphTool.cs Updated tool to include adherence verdict in condition checks
Files not reviewed (1)
  • ChatRPG/appsettings.json: Language not supported

@KarmaKamikaze KarmaKamikaze merged commit 0569aad into dev Apr 22, 2025
14 checks passed
@KarmaKamikaze KarmaKamikaze deleted the feature/navigator_agent branch April 22, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write out campaign-ending message when player wins/meets their demise Make all-new characters appear at the top of the UI characters list in v2

3 participants