Repository navigation
Commit f23ac25
committed
Refactor prompt field properties and streamline layout structure
- remove 'copy prompt' from 'api' target
- in api target, edit prompt type, when missing configuration, should not show 'attaching X files' notice
- 'prompt field' should work without being aware of the current prompt type
- in api target, submitting should be disabled when there are no api configurations
- show 'missing configuration' warning also when there are no web configurations
- show warnings independently allowing showing more at once, don't use loops for it to not break border radius that should be only on last notice
- when not showing 'empty context' warning, should show 'attaching X files...' notice
- not last notice should not have border radius
- show empty context/attaching... above the eventual 'missing configuration'
- dont't show 'missing configuration' warning, simplify as necessary, as we only show either one context related prompt notice
- 'preview prompt' should only be disabled in 'edit' when context is empty.
- submitting in API target should never be disabled, even if there are no api configurations
- don't show [Image] when in web target and being not connected
- move UiBrowserExtensionMessage
- in `apps/editor/src/views/prompt/frontend/Main/MainView/MainView.tsx` wrap everyting in .container
- in `apps/editor/src/views/prompt/frontend/Main/MainView/MainView.tsx` wrap everyting in scrollable in div.container
- remove -container suffix from [Pasted text]
├── apps
│ └── editor
│ └── src
│ └── views
│ └── prompt
│ └── frontend
│ └── Main
│ └── MainView
│ ├── MainView.module.scss
│ └── MainView.tsx
└── 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
├── prompt
│ ├── BrowserExtensionMessage
│ │ ├── BrowserExtensionMessage.module.scss
│ │ ├── BrowserExtensionMessage.stories.tsx
│ │ ├── BrowserExtensionMessage.tsx
│ │ └── index.ts
│ └── PromptNotice
│ ├── PromptNotice.module.scss
│ └── PromptNotice.tsx
└── settings
└── Notice
└── Notice.tsx1 parent afe169a commit f23ac25
12 files changed
Lines changed: 286 additions & 279 deletions
File tree
- apps/editor
- src/views/prompt
- backend/message-handlers
- frontend/Main/MainView
- packages/ui/src/components/editor
- common/prompts/PromptField
- hooks
- use-handlers
- prompt
- BrowserExtensionMessage
- Configurations
- PromptNotice
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1040 | 1040 | | |
1041 | 1041 | | |
1042 | 1042 | | |
1043 | | - | |
| 1043 | + | |
1044 | 1044 | | |
1045 | 1045 | | |
1046 | 1046 | | |
1047 | | - | |
| 1047 | + | |
1048 | 1048 | | |
1049 | 1049 | | |
1050 | 1050 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
54 | | - | |
55 | 52 | | |
56 | 53 | | |
57 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
2 | 10 | | |
3 | 11 | | |
4 | 12 | | |
| |||
8 | 16 | | |
9 | 17 | | |
10 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments