Skip to content

Conversation

@Leka74
Copy link
Contributor

@Leka74 Leka74 commented Jan 8, 2026

I wanted to add 2 new endpoints to server.ts but started getting Type instantiation is excessively deep error. The server.ts file was huge, over 2k lines so decided to simplify it a bit by grouping endpoints together and splitting them in individual files to make it more manageable to add new endpoints.

There are still some endpoints that still live within server.ts but it's a bit harder to group them.

New structure:

server/
├── error.ts          (36 lines)
├── mdns.ts           (57 lines)
├── server.ts        (567 lines)
└── routes/
    ├── config.ts         (92 lines)
    ├── experimental.ts  (156 lines)
    ├── file.ts          (196 lines)
    ├── global.ts        (134 lines)
    ├── mcp.ts           (224 lines)
    ├── permission.ts     (67 lines)
    ├── project.ts        (81 lines)
    ├── provider.ts      (164 lines)
    ├── pty.ts           (168 lines)
    ├── question.ts       (97 lines)
    ├── session.ts       (930 lines)
    └── tui.ts           (375 lines)

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@Leka74 Leka74 force-pushed the refactor/server-routes branch from cf1fa7b to 96b57cc Compare January 9, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant