MCPcopy
hub / github.com/coder/mux / createProjectsConfig

Function createProjectsConfig

src/node/services/streamContextBuilder.test.ts:48–74  ·  view source on GitHub ↗
(args: {
  projectPath: string;
  workspaces: Array<{
    id: string;
    name: string;
    parentWorkspaceId?: string;
  }>;
})

Source from the content-addressed store, hash-verified

46}
47
48function createProjectsConfig(args: {
49 projectPath: string;
50 workspaces: Array<{
51 id: string;
52 name: string;
53 parentWorkspaceId?: string;
54 }>;
55}): ProjectsConfig {
56 return {
57 projects: new Map([
58 [
59 args.projectPath,
60 {
61 trusted: true,
62 workspaces: args.workspaces.map((workspace) => ({
63 path: path.join(args.projectPath, workspace.name),
64 id: workspace.id,
65 name: workspace.name,
66 createdAt: "2026-01-01T00:00:00.000Z",
67 runtimeConfig: DEFAULT_RUNTIME_CONFIG,
68 parentWorkspaceId: workspace.parentWorkspaceId,
69 })),
70 },
71 ],
72 ]),
73 };
74}
75
76async function buildSystemContextForTest(args: {
77 runtime: TestRuntime;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected