@@ -375,7 +375,7 @@ export function AgentPanel({ onClose }: { onClose?: () => void } = {}) {
375375 const [ confirmClear , setConfirmClear ] = useState ( false )
376376
377377 // ─── Inline picker state ──────────────────────────────────────
378- const [ activePicker , setActivePicker ] = useState < 'skill' | 'mcp' | ' prompt' | null > ( null )
378+ const [ activePicker , setActivePicker ] = useState < 'skill' | 'prompt' | null > ( null )
379379 const [ pickerQuery , setPickerQuery ] = useState ( '' )
380380 const [ pickerIndex , setPickerIndex ] = useState ( 0 )
381381 const [ sending , setSending ] = useState ( false )
@@ -1950,12 +1950,6 @@ export function AgentPanel({ onClose }: { onClose?: () => void } = {}) {
19501950 setPickerQuery ( query )
19511951 return
19521952 }
1953- if ( input === '/mcp' || input . startsWith ( '/mcp ' ) ) {
1954- const query = input . replace ( / ^ \/ m c p \s * / , '' )
1955- setActivePicker ( 'mcp' )
1956- setPickerQuery ( query )
1957- return
1958- }
19591953 if ( input === '/prompt' || input . startsWith ( '/prompt ' ) ) {
19601954 const query = input . replace ( / ^ \/ p r o m p t \s * / , '' )
19611955 setActivePicker ( 'prompt' )
@@ -1975,9 +1969,6 @@ export function AgentPanel({ onClose }: { onClose?: () => void } = {}) {
19751969 if ( input === '/skill' || input === '/skill ' || input . startsWith ( '/skill use' ) || input === '/skill use' ) {
19761970 return [ ]
19771971 }
1978- if ( input === '/mcp' || input . startsWith ( '/mcp ' ) ) {
1979- return [ ]
1980- }
19811972 if ( input === '/prompt' || input . startsWith ( '/prompt ' ) ) {
19821973 return [ ]
19831974 }
@@ -2020,7 +2011,6 @@ export function AgentPanel({ onClose }: { onClose?: () => void } = {}) {
20202011 { cmd : '/skill' , desc : 'Open skill commands' , icon : 'lucide:sparkles' } ,
20212012 { cmd : '/skill find' , desc : 'Search for more skills' , icon : 'lucide:search' } ,
20222013 { cmd : '/skill use' , desc : 'Apply a bundled skill' , icon : 'lucide:play' } ,
2023- { cmd : '/mcp' , desc : 'Select an MCP server' , icon : 'lucide:plug' } ,
20242014 { cmd : '/prompt' , desc : 'Use a prompt template' , icon : 'lucide:book-open' } ,
20252015 ]
20262016 const term = input . toLowerCase ( )
@@ -2056,25 +2046,6 @@ export function AgentPanel({ onClose }: { onClose?: () => void } = {}) {
20562046 ]
20572047 } , [ ] )
20582048
2059- const mcpPickerItems = useMemo < PickerItem [ ] > ( ( ) => {
2060- const stored = typeof window !== 'undefined' ? localStorage . getItem ( 'knot-code:mcp:servers' ) : null
2061- if ( stored ) {
2062- try {
2063- const servers = JSON . parse ( stored ) as Array < { id : string ; name : string ; type : string ; enabled : boolean } >
2064- return servers . map ( ( s ) => ( {
2065- id : s . id ,
2066- name : s . name ,
2067- description : `${ s . type } server` ,
2068- icon : 'lucide:plug' ,
2069- enabled : s . enabled ,
2070- } ) )
2071- } catch {
2072- // Ignore parse errors, return empty array
2073- }
2074- }
2075- return [ ]
2076- } , [ ] )
2077-
20782049 const promptPickerItems = useMemo < PickerItem [ ] > ( ( ) => {
20792050 return [
20802051 { id : 'explain-like-5' , name : 'Explain Like I\'m 5' , description : 'Simple explanation of complex topics' , icon : 'lucide:baby' } ,
@@ -2092,8 +2063,6 @@ export function AgentPanel({ onClose }: { onClose?: () => void } = {}) {
20922063 const handlePickerSelect = useCallback ( ( item : PickerItem ) => {
20932064 if ( activePicker === 'skill' ) {
20942065 setInput ( `/skill use ${ item . id } ` )
2095- } else if ( activePicker === 'mcp' ) {
2096- setInput ( `/mcp ${ item . id } ` )
20972066 } else if ( activePicker === 'prompt' ) {
20982067 // For prompt templates, replace the command with the template name or insert it
20992068 setInput ( `Use the "${ item . name } " template: ` )
@@ -2112,14 +2081,12 @@ export function AgentPanel({ onClose }: { onClose?: () => void } = {}) {
21122081
21132082 const currentPickerItems = useMemo ( ( ) => {
21142083 if ( activePicker === 'skill' ) return skillPickerItems
2115- if ( activePicker === 'mcp' ) return mcpPickerItems
21162084 if ( activePicker === 'prompt' ) return promptPickerItems
21172085 return [ ]
2118- } , [ activePicker , skillPickerItems , mcpPickerItems , promptPickerItems ] )
2086+ } , [ activePicker , skillPickerItems , promptPickerItems ] )
21192087
21202088 const pickerTitle = useMemo ( ( ) => {
21212089 if ( activePicker === 'skill' ) return 'Select Skill'
2122- if ( activePicker === 'mcp' ) return 'Select MCP Server'
21232090 if ( activePicker === 'prompt' ) return 'Select Prompt Template'
21242091 return ''
21252092 } , [ activePicker ] )
@@ -2129,21 +2096,11 @@ export function AgentPanel({ onClose }: { onClose?: () => void } = {}) {
21292096 icon : 'lucide:sparkles' ,
21302097 heading : 'Getting Started with Skills' ,
21312098 steps : [
2132- 'Open Skills view (⌘6 )' ,
2099+ 'Open Skills view (⌘5 )' ,
21332100 'Enable skills from the catalog' ,
21342101 'Skills will appear here once active' ,
21352102 ] ,
21362103 }
2137- if ( activePicker === 'mcp' ) return {
2138- icon : 'lucide:plug' ,
2139- heading : 'Getting Started with MCP' ,
2140- steps : [
2141- 'Open MCP Library (⌘5)' ,
2142- 'Browse and install a server' ,
2143- 'Configure API keys if needed' ,
2144- 'Come back here to use it' ,
2145- ] ,
2146- }
21472104 if ( activePicker === 'prompt' ) return {
21482105 icon : 'lucide:book-open' ,
21492106 heading : 'Create Your First Prompt' ,
0 commit comments