#53 feat: input prompts textareas

Închis
deschis 3 luni în urmă cu fszontagh · 0 comentarii

Implemented improved syntax highlighting for prompt textareas while maintaining autocomplete functionality. The original issue was that the current highlighting implementation failed when copying text with multiple lines.

Changes made:

  • Added react-syntax-highlighter dependency for better syntax highlighting
  • Enhanced the existing prompt textarea component to properly handle multi-line text copying
  • Improved the highlighting rendering with better white-space handling (whiteSpace: 'pre-wrap')
  • Fixed scroll synchronization between textarea and highlight overlay
  • Maintained all existing autocomplete functionality for LoRAs and embeddings
  • Added proper TypeScript types and error handling

The component now provides better visual feedback for:

  • LoRA tags: <lora:name:weight> (highlighted in purple, red if invalid)
  • Embeddings: word boundaries (highlighted in blue)
  • Proper multi-line text preservation during copy/paste operations

All functionality has been preserved while fixing the copy-paste issue with multi-line content.

Implemented improved syntax highlighting for prompt textareas while maintaining autocomplete functionality. The original issue was that the current highlighting implementation failed when copying text with multiple lines. Changes made: - Added react-syntax-highlighter dependency for better syntax highlighting - Enhanced the existing prompt textarea component to properly handle multi-line text copying - Improved the highlighting rendering with better white-space handling (whiteSpace: 'pre-wrap') - Fixed scroll synchronization between textarea and highlight overlay - Maintained all existing autocomplete functionality for LoRAs and embeddings - Added proper TypeScript types and error handling The component now provides better visual feedback for: - LoRA tags: `<lora:name:weight>` (highlighted in purple, red if invalid) - Embeddings: word boundaries (highlighted in blue) - Proper multi-line text preservation during copy/paste operations All functionality has been preserved while fixing the copy-paste issue with multi-line content.
Autentificați-vă pentru a vă alătura acestei conversații.
Fără etichetă
bug
ui
Nu există Milestone
Fără destinatar
1 Participanți
Se încarcă...
Anulare
Salvează
Nu există încă niciun conținut.