MCPcopy Index your code
hub / github.com/github/copilot-sdk / generate

Function generate

scripts/codegen/python.ts:3820–3833  ·  view source on GitHub ↗
(sessionSchemaPath?: string, apiSchemaPath?: string)

Source from the content-addressed store, hash-verified

3818}
3819
3820async function generate(sessionSchemaPath?: string, apiSchemaPath?: string): Promise<void> {
3821 await generateSessionEvents(sessionSchemaPath);
3822 try {
3823 const resolvedSessionPath = sessionSchemaPath ?? (await getSessionEventsSchemaPath());
3824 const sessionSchema = postProcessSchema(cloneSchemaForCodegen((await loadSchemaJson(resolvedSessionPath)) as JSONSchema7));
3825 await generateRpc(apiSchemaPath, sessionSchema);
3826 } catch (err) {
3827 if ((err as NodeJS.ErrnoException).code === "ENOENT" && !apiSchemaPath) {
3828 console.log("Python: skipping RPC (api.schema.json not found)");
3829 } else {
3830 throw err;
3831 }
3832 }
3833}
3834
3835const __filename = fileURLToPath(import.meta.url);
3836

Callers 1

python.tsFile · 0.70

Calls 7

postProcessSchemaFunction · 0.85
cloneSchemaForCodegenFunction · 0.85
loadSchemaJsonFunction · 0.85
generateSessionEventsFunction · 0.70
generateRpcFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…