Skip to content

Commit 0163e94

Browse files
committed
Remove length and newline constraints for long text paste handling
- paste as symbol text of any length, not just above certain threshold └── packages └── ui └── src └── components └── editor └── common └── prompts ├── PromptField │ ├── PromptField.module.scss │ ├── PromptField.stories.tsx │ ├── PromptField.tsx │ ├── hooks │ │ ├── use-drag-drop.ts │ │ ├── use-dropdown.ts │ │ ├── use-ghost-text.ts │ │ ├── use-handlers │ │ │ ├── handle-copy.ts │ │ │ ├── handle-cut.ts │ │ │ ├── handle-input-change.ts │ │ │ ├── handle-input-click.ts │ │ │ ├── handle-key-down.ts │ │ │ ├── handle-paste.ts │ │ │ ├── handle-submit.ts │ │ │ ├── index.ts │ │ │ ├── types.ts │ │ │ ├── use-handlers.ts │ │ │ └── utils.ts │ │ └── use-keyboard-shortcuts.ts │ └── index.ts ├── Template │ ├── Template.module.scss │ ├── Template.tsx │ └── index.ts └── shared └── symbols ├── caret.ts ├── get-highlighted-text.tsx ├── index.ts ├── position-mapping.ts ├── prompt-symbols.module.scss ├── reconstruct-raw-value.ts └── use-symbol-deletion.ts
1 parent 0ee8181 commit 0163e94

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/ui/src/components/editor/common/prompts/PromptField/hooks/use-handlers

‎packages/ui/src/components/editor/common/prompts/PromptField/hooks/use-handlers/handle-paste.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export const create_handle_paste =
116116

117117
if (
118118
!refs.is_shift_pressed_ref.current &&
119-
(text.includes('\n') || text.length > 100) &&
119+
text.trim().length > 0 &&
120120
!is_fragment_paste &&
121121
!has_symbols
122122
) {

0 commit comments

Comments
 (0)