* Build a context string when the Copilot CLI failed due to the token lacking inference access. * @param {boolean} hasInferenceAccessError - Whether an inference access error was detected * @returns {string} Formatted context string, or empty string if no error
(hasInferenceAccessError)
| 1590 | * @returns {string} Formatted context string, or empty string if no error |
| 1591 | */ |
| 1592 | function buildInferenceAccessErrorContext(hasInferenceAccessError) { |
| 1593 | if (!hasInferenceAccessError) { |
| 1594 | return ""; |
| 1595 | } |
| 1596 | |
| 1597 | const templatePath = getPromptPath("inference_access_error.md"); |
| 1598 | const template = fs.readFileSync(templatePath, "utf8"); |
| 1599 | return "\n" + template; |
| 1600 | } |
| 1601 | |
| 1602 | /** |
| 1603 | * Build a context string when MCP servers were blocked by enterprise/organization policy. |