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

Function generate

scripts/codegen/typescript.ts:1038–1051  ·  view source on GitHub ↗
(sessionSchemaPath?: string, apiSchemaPath?: string)

Source from the content-addressed store, hash-verified

1036// ── Main ────────────────────────────────────────────────────────────────────
1037
1038async function generate(sessionSchemaPath?: string, apiSchemaPath?: string): Promise<void> {
1039 await generateSessionEvents(sessionSchemaPath);
1040 try {
1041 const resolvedSessionPath = sessionSchemaPath ?? (await getSessionEventsSchemaPath());
1042 const sessionSchema = propagateInternalVisibility(postProcessSchema((await loadSchemaJson(resolvedSessionPath)) as JSONSchema7));
1043 await generateRpc(apiSchemaPath, sessionSchema);
1044 } catch (err) {
1045 if ((err as NodeJS.ErrnoException).code === "ENOENT" && !apiSchemaPath) {
1046 console.log("TypeScript: skipping RPC (api.schema.json not found)");
1047 } else {
1048 throw err;
1049 }
1050 }
1051}
1052
1053const __filename = fileURLToPath(import.meta.url);
1054

Callers 1

typescript.tsFile · 0.70

Calls 7

postProcessSchemaFunction · 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…