Skip to content

Conversation

@plusplusoneplusplus
Copy link
Owner

Summary

This PR simplifies the prompt handling in AgentPanelProvider by removing TSX-related code and configurations, making the codebase cleaner and more maintainable.

Changes Made

Removed TSX Dependencies

  • Removed imports for TsxRenderOptions, TsxRenderResult from prompt manager types
  • Removed AgentPrompt component import
  • Removed ChatMessage and DEFAULT_PRIORITIES imports

Simplified Configuration

  • Removed enablePrioritization and fallbackToStringConcatenation flags from AgentPromptConfig
  • Updated configuration to only include maxTokens and historyMessageCount

Streamlined Prompt Enhancement Logic

  • Removed complex TSX-based prompt enhancement method enhanceParamsWithTsxPrompt
  • Simplified enhanceParamsWithPrompt to use string concatenation approach
  • Added support for optional user input (can use prompt alone or combined with user message)
  • Improved prompt file path handling with direct reference support

Enhanced Prompt Handling

  • Added variable detection logic to conditionally render prompts with variables
  • Improved prompt content formatting with better system instruction labeling
  • Added support for prompt-only mode (no user input required)
  • Enhanced error handling for missing prompts

Code Cleanup

  • Removed unused TSX message conversion utilities
  • Removed complex conversation history formatting for TSX
  • Simplified class documentation removing TSX references
  • Reduced overall code complexity by 96 lines

Testing

  • All existing functionality should work as before
  • Prompt integration maintains backward compatibility
  • Agent capabilities continue to be respected

Breaking Changes

None - this is a refactoring that maintains the same public API.

Related Issues

This addresses technical debt and simplifies the codebase for better maintainability.

@plusplusoneplusplus plusplusoneplusplus enabled auto-merge (squash) June 29, 2025 00:05
@plusplusoneplusplus plusplusoneplusplus merged commit c020e7e into main Jun 29, 2025
14 checks passed
@plusplusoneplusplus plusplusoneplusplus deleted the feature/simplify-prompt-handling branch June 29, 2025 00:10
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.

2 participants