File tree Expand file tree Collapse file tree 5 files changed +8
-2
lines changed
cli/cmd/tui/component/prompt Expand file tree Collapse file tree 5 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ export function Autocomplete(props: {
259259 const s = session ( )
260260 for ( const command of sync . data . command ) {
261261 results . push ( {
262- display : "/" + command . name ,
262+ display : "/" + command . name + ( command . mcp ? " (MCP)" : "" ) ,
263263 description : command . description ,
264264 onSelect : ( ) => {
265265 const newText = "/" + command . name + " "
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export namespace Command {
2727 description : z . string ( ) . optional ( ) ,
2828 agent : z . string ( ) . optional ( ) ,
2929 model : z . string ( ) . optional ( ) ,
30+ mcp : z . boolean ( ) . optional ( ) ,
3031 // workaround for zod not supporting async functions natively so we use getters
3132 // https://zod.dev/v4/changelog?id=zfunction
3233 template : z . promise ( z . string ( ) ) . or ( z . string ( ) ) ,
@@ -94,6 +95,7 @@ export namespace Command {
9495 for ( const [ name , prompt ] of Object . entries ( await MCP . prompts ( ) ) ) {
9596 result [ name ] = {
9697 name,
98+ mcp : true ,
9799 description : prompt . description ,
98100 get template ( ) {
99101 // since a getter can't be async we need to manually return a promise here
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ export namespace MCP {
195195 for ( const prompt of prompts . prompts ) {
196196 const sanitizedClientName = clientName . replace ( / [ ^ a - z A - Z 0 - 9 _ - ] / g, "_" )
197197 const sanitizedPromptName = prompt . name . replace ( / [ ^ a - z A - Z 0 - 9 _ - ] / g, "_" )
198- const key = sanitizedClientName + ":" + sanitizedPromptName + " (MCP)"
198+ const key = sanitizedClientName + ":" + sanitizedPromptName
199199
200200 commands [ key ] = { ...prompt , client : clientName }
201201 }
Original file line number Diff line number Diff line change @@ -1733,6 +1733,7 @@ export type Command = {
17331733 description ?: string
17341734 agent ?: string
17351735 model ?: string
1736+ mcp ?: boolean
17361737 template : string
17371738 subtask ?: boolean
17381739 hints : Array < string >
Original file line number Diff line number Diff line change 89828982 "model" : {
89838983 "type" : " string"
89848984 },
8985+ "mcp" : {
8986+ "type" : " boolean"
8987+ },
89858988 "template" : {
89868989 "anyOf" : [
89878990 {
You can’t perform that action at this time.
0 commit comments