Repository navigation
Commit a8fdba1
committed
Add preview support for git changes, commits, and skills via symbol clicks
- hold max prompt field tabs in `apps/editor/src/constants/values.ts`
- in the prompt field, clicking on 'changes' and 'commit' symbols should preview the markdown
- [Fragment] should not be optional
- preview skill like you preview git symbols - in markdown file. On the markdown file keep the URL link-opening action button
- remove the 'view on skills.sh' line
- when previewing text use the pattern of opening a file saved in a temp dir (create a shared utility in `apps/editor/src/views/prompt/backend/utils`)
- remove [Pasted text] (should always be true)
- `apps/editor/src/views/prompt/backend/message-handlers/handle-preview-skill-symbol.ts` should use `apps/editor/src/views/prompt/backend/utils/preview-text-in-temp-file.ts`
├── apps
│ └── editor
│ └── src
│ └── views
│ └── prompt
│ ├── backend
│ │ ├── message-handlers
│ │ │ ├── handle-hash-sign-quick-pick
│ │ │ │ ├── handle-hash-sign-quick-pick.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── symbols
│ │ │ │ ├── changes-symbol.ts
│ │ │ │ ├── clipboard-paths-symbol.ts
│ │ │ │ ├── commit-symbol.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── saved-context-symbol.ts
│ │ │ │ ├── selection-symbol.ts
│ │ │ │ └── skill-symbol.ts
│ │ │ ├── handle-open-prompt-pasted-text.ts
│ │ │ ├── handle-preview-changes-symbol.ts
│ │ │ ├── handle-preview-commit-symbol.ts
│ │ │ ├── handle-preview-prompt.ts
│ │ │ ├── handle-preview-skill-symbol.ts
│ │ │ └── index.ts
│ │ ├── prompt-view-provider.ts
│ │ └── utils
│ │ ├── preview-text-in-temp-file.ts
│ │ ├── symbols
│ │ │ ├── git
│ │ │ │ └── replace-git-symbols.ts
│ │ │ ├── replace-symbols.ts
│ │ │ └── skill
│ │ │ └── replace-skill-symbol.ts
│ │ └── website-fetcher.ts
│ ├── frontend
│ │ ├── Main
│ │ │ ├── Main.tsx
│ │ │ └── MainView
│ │ │ └── MainView.tsx
│ │ ├── Prompt.tsx
│ │ └── hooks
│ │ └── use-prompt
│ │ └── use-prompt.ts
│ └── types
│ └── messages.ts
└── 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
└── Tasks
├── components
│ └── TaskGroup.tsx
├── hooks
│ └── use-auto-focus-new-task.ts
└── index.ts1 parent 13530b1 commit a8fdba1
16 files changed
Lines changed: 300 additions & 38 deletions
File tree
- apps/editor/src/views/prompt
- backend
- message-handlers
- utils
- symbols/skill
- frontend
- Main
- MainView
- hooks/use-prompt
- types
- packages/ui/src/components/editor/common/prompts
- PromptField
- hooks/use-handlers
| 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 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 10 | + | |
15 | 11 | | |
16 | 12 | | |
17 | 13 | | |
| |||
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
76 | 55 | | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| |||
836 | 839 | | |
837 | 840 | | |
838 | 841 | | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
839 | 848 | | |
840 | 849 | | |
841 | 850 | | |
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
545 | 553 | | |
546 | 554 | | |
547 | 555 | | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
548 | 559 | | |
549 | 560 | | |
550 | 561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
| |||
365 | 373 | | |
366 | 374 | | |
367 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
368 | 379 | | |
369 | 380 | | |
370 | 381 | | |
| |||
0 commit comments