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

Function generate

scripts/codegen/csharp.ts:2593–2606  ·  view source on GitHub ↗
(sessionSchemaPath?: string, apiSchemaPath?: string)

Source from the content-addressed store, hash-verified

2591// ══════════════════════════════════════════════════════════════════════════════
2592
2593async function generate(sessionSchemaPath?: string, apiSchemaPath?: string): Promise<void> {
2594 await generateSessionEvents(sessionSchemaPath);
2595 try {
2596 const resolvedSessionPath = sessionSchemaPath ?? (await getSessionEventsSchemaPath());
2597 const sessionSchema = propagateInternalVisibility(postProcessSchema(cloneSchemaForCodegen((await loadSchemaJson(resolvedSessionPath)) as JSONSchema7)));
2598 await generateRpc(apiSchemaPath, sessionSchema);
2599 } catch (err) {
2600 if ((err as NodeJS.ErrnoException).code === "ENOENT" && !apiSchemaPath) {
2601 console.log("C#: skipping RPC (api.schema.json not found)");
2602 } else {
2603 throw err;
2604 }
2605 }
2606}
2607
2608const __filename = fileURLToPath(import.meta.url);
2609

Callers 1

csharp.tsFile · 0.70

Calls 8

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…