Skip to content

Feat/multi projects - #1

Merged
Darkmintis merged 10 commits into
mainfrom
feat/multi-projects
Oct 23, 2026
Merged

Darkmintis merged 10 commits into
mainfrom
feat/multi-projects

Conversation

@Darkmintis

Copy link
Copy Markdown
Owner

No description provided.

…tform

relative() returns the OS separator, so the impact report showed 'lib\order.dart' on Windows while every other path in Apilot uses '/'. Normalize it the same way the extension does when it opens a file.
…pace

A folder can hold more than one Apilot project: the folder itself and any nested folder with an .apilot/apilot.yaml. Opening a monorepo root used to show only the root project.

discoverProjects() finds every project under the open folders (4 levels deep, skipping node_modules/build/dist and other noise, capped so a huge repo cannot stall startup). The workspace folder itself is always included so it can still be initialized.

ProjectHub holds one Workspace per project and resolves an endpoint id to the right one. An id that exists in more than one project is reported with the candidates instead of being guessed at.
list_endpoints now returns each project with its id and root, and every endpoint tool takes an optional 'project'. Ids that are unique in the workspace need nothing extra; ids that exist twice are disambiguated with project: '<id>' or the shorthand 'project::endpoint'.

callTool() takes a Workspace or a ProjectHub, so the single-project case (the CLI, an older client) is unchanged.
The sidebar lists one group per project instead of only the one in the workspace root, and a folder with no Apilot yet is shown with an init action. The panel keeps track of which project you are in, along with that project's own environments and secrets (keychain keys are now per project).

One watcher per workspace folder picks up a project that is created or removed by hand, and multi-root workspaces are now supported instead of only the first folder.
The panel's sidebar groups endpoints under the project they belong to, with the project name as the group header. A folder without Apilot shows an init action. The endpoint editor, environments, import, run-all, and every result tab carry the project along, so each one works on the right project.
apilot list shows the project each endpoint belongs to, run-all and check cover every project in the workspace, and any command takes --project <id> to target one.
The skill now explains that a workspace can hold several Apilot projects, how to read the project ids from list_endpoints, and when to pass project: '<id>' or use the 'project::endpoint' form.
How projects are discovered, how the sidebar groups them, and how to address a project from the panel, the CLI, and the AI.
The nested-project integration tests passed on Windows but timed out on the
Linux runners: discovery only ran when the `**/.apilot/**` watcher fired, and
on CI it can fall back to polling or stop when watch handles run out.

Project discovery is now repeated on demand instead of once per file event:
on refresh, on panel state, when the tree is expanded, and whenever the
exported `projects()` API is called. Scans are throttled to one per 500ms,
and `apilot.refresh` forces one. The watcher stays as the fast path.

`discoverProjects` also reads directories with `withFileTypes`, dropping a
stat() per entry now that the walk runs on every refresh.

The tests no longer wait for the OS watcher: they create the nested project
and call `apilot.refresh`, which is what a real user's refresh button does.
Node 24 is the current LTS and is what the project is developed on, so the
workflows, `engines.node`, and a new `.nvmrc` now agree on it. Node 22 moves
to maintenance, and the old `>=22.13` floor only existed because pnpm 11
needs `node:sqlite`, which Node 24 has too.

Nothing in the repo targets Node 22 specifics, and the published packages
still declare `engines.node: >=20` because the MCP server runs under VS Code's
bundled Electron Node, not the CI Node.
@Darkmintis
Darkmintis merged commit 2b6a4ed into main Oct 23, 2026
3 checks passed
@Darkmintis
Darkmintis deleted the feat/multi-projects branch October 23, 2026 03:24
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