@@ -21,7 +21,7 @@ import type { ImageAttachmentPart } from "./state"
2121import type { PromptHistoryComment } from "./history/entry"
2222import { createComposerHistory } from "./history/store"
2323import { composerPlaceholder } from "./placeholder"
24- import { createComposerSubmit , withSlashSkill } from "./submit"
24+ import { createComposerSubmit } from "./submit"
2525
2626export type ComposerModel = ComposerEditorModel & {
2727 readonly model : ComposerControls [ "model" ]
@@ -243,9 +243,6 @@ export function createComposerModel(adapter: ComposerAdapter, options?: { queue?
243243 type : "builtin" as const ,
244244 } ) ) ,
245245 ] )
246- const slashSkills = createMemo ( ( ) =>
247- skills ( ) . filter ( ( skill ) => skill . slash === true && ! slashCommands ( ) . some ( ( item ) => item . trigger === skill . id ) ) ,
248- )
249246 const commands = createMemo < ComposerSuggestion [ ] > ( ( ) => [
250247 ...slashCommands ( ) . map ( ( item ) => ( {
251248 id : item . id ,
@@ -256,29 +253,12 @@ export function createComposerModel(adapter: ComposerAdapter, options?: { queue?
256253 description : item . description ,
257254 keybind : command . keybindParts ( item . id ) ,
258255 } ) ) ,
259- ...slashSkills ( ) . map ( ( skill ) => ( {
260- id : `skill:${ skill . id } ` ,
261- kind : "skill" as const ,
262- label : `/${ skill . id } ` ,
263- trigger : skill . id ,
264- title : skill . name ,
265- description : skill . description ,
266- mention : {
267- type : "skill" as const ,
268- id : Skill . ID . make ( skill . id ) ,
269- name : Skill . Name . make ( skill . name ) ,
270- content : `/${ skill . id } ` ,
271- start : 0 ,
272- end : 0 ,
273- } ,
274- } ) ) ,
275256 ] )
276257 const variants = createMemo ( ( ) => [ "default" , ...adapter . controls ( ) . model . selection . variant . list ( ) ] )
277258 const submission = createComposerSubmit ( {
278259 adapter,
279260 mode,
280261 commands : ( ) => data . location . command . list ( { directory : sdk ( ) . directory } ) ,
281- skills : slashSkills ,
282262 editor : ( ) => editor ,
283263 queueScroll : ( ) => requestAnimationFrame ( ( ) => editor ?. scrollIntoView ( { block : "nearest" } ) ) ,
284264 addToHistory : ( value , mode ) => controller . addHistory ( value , mode ) ,
@@ -407,7 +387,6 @@ export function createComposerModel(adapter: ComposerAdapter, options?: { queue?
407387 // the composer value as a new prompt. Enter keeps it queued in
408388 // place; the alternate action sends it as a steer.
409389 if ( queue ?. editing ( ) ) {
410- prompt . set ( withSlashSkill ( prompt . current ( ) , slashSkills ( ) ) )
411390 queue . confirmEdit ( submitOptions ?. alternate ? "steer" : "queue" )
412391 return
413392 }
0 commit comments