(content: string)
| 2790 | } |
| 2791 | |
| 2792 | export function extractMcpResourceMentions(content: string): string[] { |
| 2793 | // Extract MCP resources mentioned with @ symbol in format @server:uri |
| 2794 | // Example: "@server1:resource/path" would extract "server1:resource/path" |
| 2795 | const atMentionRegex = /(^|\s)@([^\s]+:[^\s]+)\b/g |
| 2796 | const matches = content.match(atMentionRegex) || [] |
| 2797 | |
| 2798 | // Remove the prefix (everything before @) from each match |
| 2799 | return uniq(matches.map(match => match.slice(match.indexOf('@') + 1))) |
| 2800 | } |
| 2801 | |
| 2802 | export function extractAgentMentions(content: string): string[] { |
| 2803 | // Extract agent mentions in two formats: |
no test coverage detected