Commit 203e308
committed
fix(scheduled-tasks): seed task contexts instead of clobbering auto-mentions
Cursor (Medium): the mount-only `setContexts(task.contexts)` replaced the
editor's context list AFTER the chipify pass had already registered the
prompt's integration `@`-mentions and `/`-skills, so a task with any stored
resource context lost its integration/skill chip overlay.
Thread an `initialContexts` option through `usePromptEditor` (into the
context manager's existing `initialContexts` seed) and seed the task's
stored contexts there. The mount chipify pass then MERGES integration and
skill contexts on top of the seed (deduped), so the overlay renders the
full set — resources from the seed, integrations/skills from the text.1 parent 94a2bb1 commit 203e308
2 files changed
Lines changed: 21 additions & 13 deletions
File tree
- apps/sim/app/workspace/[workspaceId]
- home/components/user-input/components/prompt-editor
- scheduled-tasks/components/task-details-modal
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
107 | 115 | | |
108 | 116 | | |
109 | 117 | | |
| |||
142 | 150 | | |
143 | 151 | | |
144 | 152 | | |
| 153 | + | |
145 | 154 | | |
146 | 155 | | |
147 | 156 | | |
| |||
170 | 179 | | |
171 | 180 | | |
172 | 181 | | |
173 | | - | |
| 182 | + | |
174 | 183 | | |
175 | 184 | | |
176 | 185 | | |
| |||
Lines changed: 11 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 72 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
81 | 79 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
| |||
0 commit comments