#53 feat: input prompts textareas

已关闭
fszontagh3 月之前创建 · 0 条评论

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.
登录 并参与到对话中。
未选择标签
bug
ui
未选择里程碑
未指派成员
1 名参与者
正在加载...
取消
保存
这个人很懒,什么都没留下。