#53 feat: input prompts textareas

Slēgta
fszontagh atvēra 3 mēneši atpakaļ · 0 komentāri

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.
Pierakstieties, lai pievienotos šai sarunai.
Nav etiķešu
bug
ui
Nav atskaites punktu
Nav atbildīgā
1 dalībnieki
Notiek ielāde...
Atcelt
Saglabāt
Vēl nav satura.