processSystemPrompt = (prompt) => {
    if (!prompt) return '';
    return prompt.replace(/\\n/g, '\n');
  }
@swagger
/settings:
  get:
    summary: Application settings page
    description: |
      Renders the application settings page where users can modify configuration
      after initial setup.
      
      This page allows administrators to update connections to Paperless-ngx, 
      AI provider settings, processing parameters, feature toggles, and custom fields.
      The interface provides validation for connection settings and displays the current
      configuration values.
      
      Changes made on this page require application restart to take full effect.
    tags:
      - Navigation
      - Setup
      - System
    security:
      - BearerAuth: []
      - ApiKeyAuth: []
    responses:
      200:
        description: Settings page rendered successfully
        content:
          text/html:
            schema:
              type: string
              description: HTML content of the application settings page
      401:
        description: Unauthorized - user not authenticated
        headers:
          Location:
            schema:
              type: string
              example: "/login"
      500:
        description: Server error
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Error'