Skip to content

Conversation

@BegoniaHe
Copy link
Member

This pull request increases the allowed length for persona settings and introduces a utility to clean up AI-generated text by removing certain tags and comments. The main themes are user input validation and AI output sanitization.

User Input Validation:

  • Increased the maximum allowed length for persona settings from 20/30 characters to 65536 characters in the main function of src/index.ts to allow for much longer persona descriptions. [1] [2]

AI Output Sanitization:

  • Added a new removeThinkingChains function in src/utils/utils_string.ts to strip out <Think>...</Think> tags (case-insensitive, multiline) and HTML-style comments (<!-- ... -->) from AI output.
  • Integrated the removeThinkingChains function into the handleReply function so that all replies have these tags and comments removed before further processing.

Filters out <Think>...</Think> tags and HTML comments from AI-generated text to clean up the final output before processing replies.

Ensures users receive clean, focused responses without internal AI reasoning artifacts or development comments.
@BegoniaHe BegoniaHe merged commit 312000b into DCRepairCenter:main Oct 3, 2025
1 check passed
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