You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d3f8fc1
Browse filesBrowse the repository at this point in the historyBrowse files
Refactor symbol handling logic and introduce PromptTemplate component to support symbol insertion in preset prefix and suffix fields
- Create a special component for prefix/suffix textareas in the `apps/editor/src/views/panel/frontend/components/edit-preset-form/EditPresetForm/EditPresetForm.tsx`. It should have "insert symbol" button just like `packages/ui/src/components/editor/panel/PromptField/PromptField.tsx`. When the button is clicked, log to the console 'insert button clicked'.
- TemplateTextarea should be a separate UI component
- in UiTemplateTextarea add prop for [Fragment]
- handle "insert symbol click" with the `apps/editor/src/views/panel/backend/message-handlers/handle-hash-sign-quick-pick/handle-hash-sign-quick-pick.ts`
- move `packages/ui/src/components/editor/common/TemplateTextarea/TemplateTextarea.tsx` to `packages/ui/src/components/editor/panel`
- from prompt field, extract handling of symbols to `packages/ui/src/components/editor/panel/prompt-symbols` and use it in 'template textarea'
- rename `packages/ui/src/components/editor/panel/prompt` to `packages/ui/src/components/editor/panel/prompts`
- [Pasted text]
- place PromptField and TemplateTextarea in `packages/ui/src/components/editor/panel/prompts`
- `TemplateTextarea` rename to `PromptTemplate`
- in the prompt template, trigger[Fragment] on '#' typed in the field
Copy file name to clipboardExpand all lines: apps/editor/src/views/panel/backend/message-handlers/handle-hash-sign-quick-pick/handle-hash-sign-quick-pick.ts
0 commit comments