MCPcopy Create free account
hub / github.com/github/gh-aw / buildInferenceAccessErrorContext

Function buildInferenceAccessErrorContext

actions/setup/js/handle_agent_failure.cjs:1592–1600  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

1590 * @returns {string} Formatted context string, or empty string if no error
1591 */
1592function 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.

Callers 1

mainFunction · 0.85

Calls 1

getPromptPathFunction · 0.85

Tested by

no test coverage detected