MCPcopy
hub / github.com/toon-format/toon / generateNestedConfigQuestions

Function generateNestedConfigQuestions

benchmarks/src/questions/nested-config.ts:9–283  ·  view source on GitHub ↗
(config: NestedConfig | undefined, getId: () => string)

Source from the content-addressed store, hash-verified

7 * Generate nested configuration questions
8 */
9export function generateNestedConfigQuestions(config: NestedConfig | undefined, getId: () => string): Question[] {
10 const questions: Question[] = []
11
12 if (!config)
13 return questions
14
15 // Field retrieval: top-level config values
16 const fieldRetrievalQuestions = [
17 {
18 prompt: 'What is the environment in the configuration?',
19 groundTruth: config.environment,
20 answerType: 'string' as const,
21 },
22 {
23 prompt: 'What is the database host?',
24 groundTruth: config.database.host,
25 answerType: 'string' as const,
26 },
27 {
28 prompt: 'What is the database port?',
29 groundTruth: String(config.database.port),
30 answerType: 'integer' as const,
31 },
32 {
33 prompt: 'What is the maximum connection pool size?',
34 groundTruth: String(config.database.pool.max),
35 answerType: 'integer' as const,
36 },
37 {
38 prompt: 'What is the session duration?',
39 groundTruth: String(config.authentication.session.duration),
40 answerType: 'integer' as const,
41 },
42 {
43 prompt: 'What is the minimum connection pool size?',
44 groundTruth: String(config.database.pool.min),
45 answerType: 'integer' as const,
46 },
47 {
48 prompt: 'What is the connection pool idle timeout?',
49 groundTruth: String(config.database.pool.idleTimeout),
50 answerType: 'integer' as const,
51 },
52 {
53 prompt: 'What is the database name?',
54 groundTruth: config.database.name,
55 answerType: 'string' as const,
56 },
57 {
58 prompt: 'What is the session refresh threshold?',
59 groundTruth: String(config.authentication.session.refreshThreshold),
60 answerType: 'integer' as const,
61 },
62 {
63 prompt: 'What is the version in the configuration?',
64 groundTruth: config.version,
65 answerType: 'string' as const,
66 },

Callers 1

generateQuestionsFunction · 0.90

Calls 8

getIdFunction · 0.85
buildMethod · 0.80
answerTypeMethod · 0.80
datasetMethod · 0.80
typeMethod · 0.80
groundTruthMethod · 0.80
promptMethod · 0.80
idMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…