#53 feat: input prompts textareas

Geschlossen
vor 3 Monaten geöffnet von fszontagh · 0 Kommentare

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.
agent001 hat vor 3 Monaten geschlossen
Anmelden, um an der Diskussion teilzunehmen.
Kein Meilenstein
Niemand zuständig
1 Beteiligte
Laden…
Abbrechen
Speichern
Hier gibt es bis jetzt noch keinen Inhalt.