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

Function collectPythonSessionEventExportedTypeNames

scripts/codegen/python.ts:3359–3375  ·  view source on GitHub ↗
(schema: JSONSchema7)

Source from the content-addressed store, hash-verified

3357}
3358
3359function collectPythonSessionEventExportedTypeNames(schema: JSONSchema7): Set<string> {
3360 const definitions = collectDefinitionCollections(schema as Record<string, unknown>);
3361 const definitionNames = new Set([...Object.keys(definitions.definitions), ...Object.keys(definitions.$defs)]);
3362 const code = generatePythonSessionEventsCode(schema);
3363 const exported = new Set<string>();
3364 const symbolPattern = /^(?:class\s+([A-Za-z_]\w*)\b|([A-Za-z_]\w*)\s*=)/gm;
3365 let match: RegExpExecArray | null;
3366
3367 while ((match = symbolPattern.exec(code)) !== null) {
3368 const name = match[1] ?? match[2];
3369 if (definitionNames.has(name)) {
3370 exported.add(name);
3371 }
3372 }
3373
3374 return exported;
3375}
3376
3377function emitPyApiGroup(
3378 lines: string[],

Callers 1

generateRpcFunction · 0.85

Calls 4

execMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…