Treat empty, null, or undefined tool arguments as {} instead of throwing
a JSON parse error. Uses explicit checks (=== '' || === null || === undefined)
rather than a broad falsy check, as recommended in review.
Addresses all review feedback from jpr5:
- Added tests for wildcard tool path with empty args
- Added tests for null and undefined arguments
- Used explicit empty/null/undefined check instead of broad falsy
- Added inline comments explaining the fallback rationale
- Removed duplicate tests (TEST 7/8) from core-full.test.ts
- Removed console.log debugging statements from tests
Mark all publishable @copilotkitnext/* packages as deprecated in
package.json, pointing users to the @copilotkit/* equivalents.
V2 features will be available under the /v2 subpath.
Affected packages: shared, core, agent, angular, react, runtime,
sqlite-runner, web-inspector.
Fixes#399
When the CopilotTextarea hovering popup (CMD+K / CTRL+K) is open and the
user presses `Escape`, the popup loses focus entirely, instead of safely
closing and returning focus to the underlying textarea.
This PR:
1. Adds an `Escape` key handler to the `HoveringInsertionPromptBoxCore`
component so the textarea can intercept the key.
2. Adds a document-level `Escape` listener to `HoveringToolbar` to
cleanly close the popup and use `ReactEditor.focus()` to restore focus
to the Slate editor.
## Testing
1. Run `textarea` example.
2. Type in the input, press `CMD+K` (or `CTRL+K`).
3. Press `Escape`.
4. The popup closes and focus is successfully returned to the editor
input without needing an extra mouse click.
The v1 CopilotRuntime always set afterRequestMiddleware on the v2 runtime,
causing parseSSEResponse to attempt reading the cloned SSE stream body even
when no user hooks existed. This results in "Failed to read SSE response
body in afterRequestMiddleware" warnings. Only register the handler when
the user actually provided afterRequestMiddleware or middleware.onAfterRequest.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>