Repository navigation
Commit cbfc277
committed
Enable hash sign quick pick and symbol insertion in template editor form
- current behavior: in prompt view, user can insert hash sign symbols. expected behavior: such symbols can be idenically inserted in settings>prompt>templates.
- place the root logic of `apps/editor/src/views/prompt/backend/message-handlers/handle-hash-sign-quick-pick/handle-hash-sign-quick-pick.ts` and`apps/editor/src/views/settings/backend/message-handlers/handle-hash-sign-quick-pick.ts` in `apps/editor/src/views/shared/utils`
├── apps
│ └── editor
│ └── src
│ ├── i18n
│ │ └── translations
│ │ └── views
│ │ ├── prompt
│ │ │ └── handlers
│ │ │ ├── handle-template-quick-pick.ts
│ │ │ └── index.ts
│ │ └── settings
│ │ └── handlers
│ │ └── index.ts
│ ├── migrations
│ │ ├── migrate-prompt-templates-suffixes.ts
│ │ └── migrate-prompt-templates-to-templates.ts
│ └── views
│ ├── prompt
│ │ ├── backend
│ │ │ ├── message-handlers
│ │ │ │ ├── handle-hash-sign-quick-pick.ts
│ │ │ │ ├── handle-template-quick-pick.ts
│ │ │ │ └── index.ts
│ │ │ ├── prompt-view-provider.ts
│ │ │ └── utils
│ │ │ └── symbols
│ │ │ ├── replace-symbols.ts
│ │ │ └── skill
│ │ │ └── replace-skill-symbol.ts
│ │ ├── frontend
│ │ │ ├── Main
│ │ │ │ ├── Main.tsx
│ │ │ │ └── MainView
│ │ │ │ └── MainView.tsx
│ │ │ ├── hooks
│ │ │ │ └── use-prompt
│ │ │ │ └── use-prompt.ts
│ │ │ └── i18n
│ │ │ └── translations
│ │ │ └── prompt-field.ts
│ │ └── types
│ │ └── messages.ts
│ ├── settings
│ │ ├── backend
│ │ │ ├── message-handlers
│ │ │ │ ├── handle-create-template.ts
│ │ │ │ ├── handle-delete-template.ts
│ │ │ │ ├── handle-get-templates.ts
│ │ │ │ ├── handle-hash-sign-quick-pick.ts
│ │ │ │ ├── handle-update-templates.ts
│ │ │ │ └── index.ts
│ │ │ └── settings-view-provider.ts
│ │ ├── frontend
│ │ │ ├── Home
│ │ │ │ ├── Home.tsx
│ │ │ │ └── sections
│ │ │ │ └── GeneralSection.tsx
│ │ │ ├── Settings.tsx
│ │ │ ├── forms
│ │ │ │ └── EditTemplateForm
│ │ │ │ ├── EditTemplateForm.module.scss
│ │ │ │ ├── EditTemplateForm.tsx
│ │ │ │ └── index.ts
│ │ │ ├── hooks
│ │ │ │ └── use-settings.ts
│ │ │ └── i18n
│ │ │ └── translations
│ │ │ ├── edit-template-form.ts
│ │ │ ├── general.ts
│ │ │ └── index.ts
│ │ ├── helpers
│ │ │ └── open-settings.ts
│ │ └── types
│ │ └── messages.ts
│ └── shared
│ ├── actions
│ │ ├── agent
│ │ │ ├── create.ts
│ │ │ ├── delete.ts
│ │ │ ├── pick-agent.ts
│ │ │ ├── reorder.ts
│ │ │ ├── toggle-pinned.ts
│ │ │ └── update.ts
│ │ ├── api
│ │ │ ├── create
│ │ │ │ ├── create.ts
│ │ │ │ └── interactions
│ │ │ │ ├── index.ts
│ │ │ │ ├── initial-select-model.ts
│ │ │ │ ├── initial-select-provider.ts
│ │ │ │ ├── verify-model.ts
│ │ │ │ └── verify-reasoning-effort.ts
│ │ │ ├── delete.ts
│ │ │ ├── pick-reasoning-effort.ts
│ │ │ ├── reorder.ts
│ │ │ └── update
│ │ │ ├── interactions
│ │ │ │ ├── edit-model-for-api-config.ts
│ │ │ │ ├── edit-provider-for-api-config.ts
│ │ │ │ ├── edit-reasoning-effort-for-api-config.ts
│ │ │ │ └── index.ts
│ │ │ └── update.ts
│ │ └── web
│ │ ├── create.ts
│ │ ├── delete.ts
│ │ ├── pick-chatbot.ts
│ │ ├── pick-model.ts
│ │ ├── reorder.ts
│ │ ├── toggle-pinned.ts
│ │ └── update.ts
│ ├── forms
│ │ ├── EditApiConfigurationForm
│ │ │ ├── EditApiConfigurationForm.module.scss
│ │ │ ├── EditApiConfigurationForm.tsx
│ │ │ └── index.ts
│ │ ├── EditCliConfigurationForm
│ │ │ ├── EditCliConfigurationForm.module.scss
│ │ │ ├── EditCliConfigurationForm.tsx
│ │ │ └── index.ts
│ │ └── EditWebConfigurationForm
│ │ ├── EditWebConfigurationForm.module.scss
│ │ ├── EditWebConfigurationForm.tsx
│ │ └── index.ts
│ ├── hooks
│ │ └── use-translation.tsx
│ ├── i18n
│ │ ├── translations
│ │ │ ├── common.ts
│ │ │ ├── edit-api-configuration-form.ts
│ │ │ ├── edit-cli-configuration-form.ts
│ │ │ ├── edit-web-configuration-form.ts
│ │ │ └── index.ts
│ │ └── use-translation.tsx
│ ├── types
│ │ └── api-features.ts
│ └── utils
│ ├── generate-unique-name.ts
│ ├── hash-sign-quick-pick
│ │ ├── hash-sign-quick-pick.ts
│ │ ├── index.ts
│ │ └── symbols
│ │ ├── changes-symbol.ts
│ │ ├── commit-symbol.ts
│ │ ├── index.ts
│ │ ├── saved-context-symbol.ts
│ │ └── skill-symbol.ts
│ └── webview-html.ts
└── packages
└── ui
└── src
└── components
└── editor
├── common
│ ├── Icon
│ │ └── Icon.tsx
│ └── prompts
│ ├── PromptField
│ │ ├── PromptField.module.scss
│ │ ├── PromptField.tsx
│ │ ├── components
│ │ │ └── Footer
│ │ │ └── Footer.tsx
│ │ └── hooks
│ │ └── use-handlers
│ │ ├── handle-input-change.ts
│ │ └── handle-input-click.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
└── settings-view
└── Templates
├── Templates.module.scss
├── Templates.tsx
└── index.ts1 parent 2c12397 commit cbfc277
18 files changed
Lines changed: 161 additions & 50 deletions
File tree
- apps/editor/src/views
- prompt/backend
- message-handlers
- handle-hash-sign-quick-pick
- utils/symbols/skill
- settings
- backend
- message-handlers
- frontend
- forms/EditTemplateForm
- types
- packages/ui/src/components/editor/common/prompts/Template
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| 147 | + | |
| 148 | + | |
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| 480 | + | |
480 | 481 | | |
481 | 482 | | |
482 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | | - | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | 28 | | |
22 | 29 | | |
| |||
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
28 | 68 | | |
29 | 69 | | |
30 | 70 | | |
| |||
43 | 83 | | |
44 | 84 | | |
45 | 85 | | |
46 | | - | |
| 86 | + | |
47 | 87 | | |
| 88 | + | |
48 | 89 | | |
49 | | - | |
50 | | - | |
51 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
52 | 99 | | |
53 | 100 | | |
54 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
359 | 363 | | |
360 | 364 | | |
361 | 365 | | |
| |||
420 | 424 | | |
421 | 425 | | |
422 | 426 | | |
| 427 | + | |
423 | 428 | | |
424 | 429 | | |
425 | 430 | | |
| |||
623 | 628 | | |
624 | 629 | | |
625 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
626 | 636 | | |
627 | 637 | | |
628 | 638 | | |
| |||
655 | 665 | | |
656 | 666 | | |
657 | 667 | | |
| 668 | + | |
658 | 669 | | |
659 | 670 | | |
660 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
149 | 148 | | |
150 | 149 | | |
151 | 150 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
0 commit comments