You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 71098b0
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(tools): import logpoints without the browser bundle (#3525)
Refs #3427
Lazy loading part 9 of 11, stacked on #3524. The server still loads
`third_party/browser.js` at startup through `index.ts`, `McpContext` and
`McpResponse`, until a follow-up PR loads it on the first tool call.
## What moved
- The `set_logpoints` schema description uses `LOGPOINT_FORMAT`, so a
lazy import is not enough. The browser-free parts of
`LogpointManager.ts` move unchanged to a new `src/utils/logpoint.ts`:
`LOGPOINT_FORMAT`, `parseLogpoint()`, `LogpointError` and the
`LogpointOptions`, `Logpoint` and `GeneratedLocation` interfaces.
- `LogpointManager.ts`, `McpPage.ts`, `formatters/LogpointFormatter.ts`,
`tools/ToolDefinition.ts`, `tools/logpoints.ts` and the tests import
them from there. There are no re-exports.
Adds `tools/logpoints.js` to the light entries in
`tests/browser-imports.test.ts`.
## Modules now in both bundles
None.
## Test plan
- `npm run test tests/browser-imports.test.ts
tests/tools/logpoints.test.ts tests/formatters/LogpointFormatter.test.ts
tests/LogpointManager.test.ts tests/McpPage.test.ts`.
- `npm run format` and `npm run build`.
- `tests/browser-imports.test.ts` fails without the source change and
passes with it.
0 commit comments