File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
opencode/src/cli/cmd/tui/component/prompt Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -284,6 +284,9 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
284284 }
285285
286286 const [ steerPending , setSteerPending ] = createSignal ( false )
287+ // TODO(contamination): enhancePrompt belongs to prax/enhance-prompt (PR #9).
288+ // It leaked into this branch during extraction from prax-dev.
289+ // Remove when prax/enhance-prompt is merged via prax-build.sh.
287290 const [ enhancing , setEnhancing ] = createSignal ( false )
288291
289292 const enhancePrompt = async ( ) => {
Original file line number Diff line number Diff line change @@ -634,6 +634,8 @@ export function Prompt(props: PromptProps) {
634634 // Guards: $ must be at start-of-line or after whitespace (not $$).
635635 // $name → adds skill to session (SkillPart in parts array)
636636 // $-name → removes skill from session (DELETE API call)
637+ // NOTE: This regex MUST stay in sync with packages/app/src/util/skill-parse.ts
638+ // (the web frontend's source-of-truth parser). If you change it here, update there too.
637639 const skillPattern = / (?: ^ | (?< = \s ) ) \$ ( - ? [ a - z A - Z ] [ \w - ] * ) / g
638640 const skills : Array < { type : "skill" ; name : string } > = [ ]
639641 const removals : string [ ] = [ ]
@@ -644,13 +646,11 @@ export function Prompt(props: PromptProps) {
644646 else skills . push ( { type : "skill" as const , name : token } )
645647 }
646648
647- // Process $-removal requests via DELETE /session/:id/skill
649+ // Process $-removal requests via DELETE /session/:id/skill/:name
648650 if ( sessionID ) {
649651 for ( const name of removals ) {
650- fetch ( `${ sdk . url } /session/${ sessionID } /skill` , {
652+ fetch ( `${ sdk . url } /session/${ sessionID } /skill/ ${ encodeURIComponent ( name ) } ` , {
651653 method : "DELETE" ,
652- headers : { "Content-Type" : "application/json" } ,
653- body : JSON . stringify ( { name } ) ,
654654 } ) . catch ( ( ) => {
655655 toast . show ( {
656656 variant : "error" ,
You can’t perform that action at this time.
0 commit comments