(filePath)
| 144 | } |
| 145 | |
| 146 | async fetchFileContent(filePath) { |
| 147 | try { |
| 148 | const response = await axios.get(`${this.rawURL}/${filePath}`, { |
| 149 | headers: { |
| 150 | 'User-Agent': 'iCSS-MCP-Server', |
| 151 | ...(this.githubToken && { 'Authorization': `token ${this.githubToken}` }) |
| 152 | } |
| 153 | }); |
| 154 | |
| 155 | return response.data; |
| 156 | } catch (error) { |
| 157 | console.error(`❌ Error fetching file ${filePath}:`, error.message); |
| 158 | return null; |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | parseMarkdownContent(content, category, filename) { |
| 163 | const lines = content.split('\n'); |
no test coverage detected