MCPcopy Create free account
hub / github.com/backnotprop/plannotator / getServerConfig

Function getServerConfig

packages/shared/config.ts:207–222  ·  view source on GitHub ↗
(gitUser: string | null)

Source from the content-addressed store, hash-verified

205 * Reads config.json fresh each call so the response reflects the latest file on disk.
206 */
207export function getServerConfig(gitUser: string | null): {
208 displayName?: string;
209 diffOptions?: DiffOptions;
210 gitUser?: string;
211 conventionalComments?: boolean;
212 conventionalLabels?: CCLabelConfig[] | null;
213} {
214 const cfg = loadConfig();
215 return {
216 displayName: cfg.displayName,
217 diffOptions: cfg.diffOptions,
218 gitUser: gitUser ?? undefined,
219 ...(cfg.conventionalComments !== undefined && { conventionalComments: cfg.conventionalComments }),
220 ...(cfg.conventionalLabels !== undefined && { conventionalLabels: cfg.conventionalLabels }),
221 };
222}
223
224/**
225 * Read the user's preferred default diff type from config, falling back to 'unstaged'.

Callers 7

fetchFunction · 0.90
fetchFunction · 0.90
fetchFunction · 0.90
fetchFunction · 0.90
startReviewServerFunction · 0.85
startPlanReviewServerFunction · 0.85
startAnnotateServerFunction · 0.85

Calls 1

loadConfigFunction · 0.85

Tested by

no test coverage detected