Skip to content

refactor(core)!: move chat sends, attachments, thread switches and the message view into core - #8179

Merged
AlemTuzlak merged 10 commits into
2.0.0from
alem/2.0-core-chat-session
Nov 4, 2026
Merged

AlemTuzlak merged 10 commits into
2.0.0from
alem/2.0-core-chat-session

Conversation

@AlemTuzlak

@AlemTuzlak AlemTuzlak commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

The chat's send, attachment, thread-switch and message-list logic now lives in @copilotkit/core. React, Vue and Angular call it, so a fix there applies to all three. This fixes Vue sends that did not wait for the active run (#5195), Angular welcome-screen gating, and other drift between the three frameworks.

This is PR 6 of 10 in the "2.0 core pipeline" stack. Base: alem/2.0-core-agents-threads. Merge it after PR 5.

What does this PR do?

New internal (ɵ) modules in packages/core/src/chat/ and packages/core/src/core/:

  • attachment-queue.ts: ɵAttachmentQueue. It checks file type and size, shows a placeholder per file, uploads (onUpload or base64), and hands ready files to the next message.
  • session.ts: ɵcreateChatSubmitter. It owns send, suggestion, stop and transcription: the send queue, the upload guard, and the 5-second notice.
  • thread-switch.ts and thread-baseline.ts: ɵThreadSwitchCoordinator and ɵresetAgentThreadBaseline. They pin the thread, reset the agent on a switch to a fresh thread, and keep teardowns in order. The run handler uses the same reset.
  • message-view.ts: ɵcreateMessageViewModel for tool-call layout, the "turn" work summaries, and the cursor rule.
  • chat-view.ts: ɵgetChatViewState (suggestions, welcome screen, connecting indicator, padding) and the pin-to-send tracker.

Fixes:

  • Vue now waits for the thread to load and for the active run before it sends (fix(react-core): route turn-2 Enter to send during interrupt-resume #5195). Before, a send in Vue stopped a thread load that was in progress, and the chat could stay in "connecting".
  • Vue and Angular show chatAttachmentsUploadingText and keep the typed text when an upload blocks a send.
  • Angular hides the welcome screen while the thread loads and when [welcomeScreen] is false. It also takes [autoScroll] instead of always scrolling.
  • Angular logs a failed detach on a thread switch instead of leaving an unhandled rejection.

Not in this PR: a core connect/reconnect controller (item 6 of the slice). It is designed but not built. React, Vue and Angular still own their connect code.

BREAKING CHANGE: behavior only. No public export, prop or input is removed or renamed. Migration steps are on the chat 2.0 migration page:

  • Sending messages: a send waits for the active run and the thread load. Blank text and loading suggestions are not sent. Angular sends text untrimmed.
  • Attachment uploads: processFiles needs enabled: true. Vue and Angular honor maxConcurrentUploads.
  • Welcome screen and suggestions in Angular: a custom <copilot-chat-view> must pass [isRunning] and [isConnecting].
  • Console messages: new text for the Vue duplicate-ID warning and the Angular connect failure.

Related PRs and Issues

Checklist

  • I have read the Contribution Guide
  • If the PR changes or adds functionality, I have updated the relevant documentation
  • If the PR contains a breaking change, the title has ! (for example feat(react-core)!: ...) and the description has a BREAKING CHANGE: line with migration steps. See VERSIONING.md
  • "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

Merge notes

  • Angular copilot-chat.ts combines this layer's change with layer 5's. This layer makes a send wait for the thread to load. Layer 5 makes a failed connect end the Inspector's "view thread" override. Both now sit in the same connect callback.
  • A carry-over commit (f47b53867f) moves the React-only "connecting" indicator rule from 2.0.0 into core's ɵgetChatViewState, with tests. React reads it from there.

Testing

Commands run:

  • Before the stack merge: nx run build, check-types and test for @copilotkit/core, @copilotkit/react-core, @copilotkit/vue and @copilotkit/angular. Build and check-types passed. Tests: core 119/119 files, React 2482 passed. Vue 1437/1438 and Angular 675/677. The failures were timeouts under machine load (build-entries, inspector.spec, mcp-apps-widget.spec), and they passed when run alone.
  • On this head (f47b53867f): nx run-many -t check-types for the four packages passed. nx run @copilotkit/core:test: 146/146 files passed. nx run build for React, Vue and Angular passed when run one at a time. In one parallel run, the builds read a stale core dist and failed.
  • nx run @copilotkit/v2-migration:test: 52/52. pnpm check:public-api-manifest: current.
  • Not run: nx run @copilotkit/vue:lint. It fails with 197 errors on lines this PR does not touch. Core, React and Angular have no lint target. I ran repo oxlint on the changed files: 0 errors.

Manual test (Vue, #5195):

  1. On the base branch, open a Vue chat with an explicit threadId that has history. Send a message while the history still loads. The load stops, and the chat can stay in "connecting".
  2. On this branch, do the same. The message waits until the history loads, then sends.
  3. While a reply streams, send a second message. It sends after the first run ends. It does not stop that run.

How this PR makes testing easy: core unit tests for every new module in packages/core/src/chat/__tests__/ (attachment-queue, session, thread-switch, message-view, chat-view) and packages/core/src/core/__tests__/thread-baseline.test.ts. New Angular specs cover [welcomeScreen], [autoScroll] and the connecting welcome gate.

Risk / rollback

The main risk is send timing. A send now waits for the active run in Vue. If a run never ends (for example, a human-in-the-loop prompt with no answer after its component unmounts in Vue), later sends wait too. To roll back, revert this PR. It has no data or config migration.

Stack

Merge in this order. Each PR's base is the PR above it.

# PR Area Base
1 #8181 Chat primitives 2.0.0
2 #8173 Provider config and runtime info PR 1
3 #8176 Tool-call rendering PR 2
4 #8175 A2UI, Open Generative UI, MCP Apps PR 3
5 #8174 Agents, threads, chat configuration PR 4
6 #8179 (this PR) Chat sends, attachments, message view PR 5
7 #8178 Chat input, recorder, DOM controllers PR 6
8 #8177 Markdown renderer PR 7
9 #8182 Suggestions, Inspector, learning PR 8
10 #8180 Interrupts and human-in-the-loop PR 9

Stack verification. After each merge, the stack builder ran these on this layer's head before pushing it, all with --skip-nx-cache: build, check-types and tests for core, react-core, vue and angular, plus the packages this layer touches; the codemod tests; oxlint; and check:public-api-manifest. On the top layer it also ran publint, attw, and the shell-docs tests and build. All passed.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Chat submission, stopping, transcription, attachment handling, and thread switching now follow consistent behavior across React, Vue, and Angular.
    • Chat views now provide more consistent welcome-screen, suggestion, connecting-indicator, and message-layout behavior, with configurable welcome screens and auto-scrolling in Angular.
  • Bug Fixes
    • Sends wait for active runs and thread connections; failed connections and attachment uploads are handled more consistently.
  • Documentation
    • Updated the chat 2.0 migration guide with cross-framework behavior and Angular welcome-screen details.

AlemTuzlak and others added 8 commits November 3, 2026 14:28
Add ɵAttachmentQueue and ɵbuildUserMessageContent to @copilotkit/core.
React useAttachments, Vue useAttachments and the Angular attachments
directive now only wire the DOM (picker, drag-and-drop, paste) to it.

Behaviour now shared by all three frameworks:
- maxConcurrentUploads is honoured in Vue and Angular (was React only),
  and every picked file shows as uploading at once.
- processFiles does nothing while attachments are disabled (was Angular
  only).
- the file picker is cleared after each upload so the same file can be
  picked again (was Vue only).
- handler errors are caught and logged in Vue (was React only).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…to core

Add the chat session pieces to @copilotkit/core and use them from the
React, Vue and Angular CopilotChat:
- ɵcreateChatSubmitter: send, suggestion, stop and transcription, with
  the send queue, the upload guard and the timed notice.
- ɵThreadSwitchCoordinator: pins the thread, resets the agent on a switch
  to a fresh thread, orders teardowns, tracks connections.
- ɵresetAgentThreadBaseline: one reset, also used by the run handler.

Behaviour now shared by all three frameworks:
- Vue queues a send behind the thread's connection and the run in flight
  (#5195), for typed messages and suggestions, instead of aborting the
  connect.
- A send blocked by an upload shows chatAttachmentsUploadingText and
  restores the typed text in Vue and Angular (was React only).
- Blank text is ignored and a loading suggestion cannot be picked (was
  Angular only).
- A blank transcript leaves the input as it was (was Angular only).
- Angular logs a failed detach instead of leaving the rejection
  unhandled, waits for every earlier teardown, and only resets while the
  fresh thread is still current.
- Angular logs connect failures as "CopilotChat: connection failed" and
  a failed thread load blocks the send with threadLoadErrorText.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… core

Add ɵMessageViewModel (tool-call layouts, "turn" work summaries, open
state, work times, cursor and pending summary), ɵshouldShowMessageCursor
and ɵduplicateMessagesWarning. React and Vue CopilotChatMessageView and
the Angular message view cursor use them.

Behaviour changes:
- Vue reads the last RENDERED message for the cursor, as React does, not
  the last raw message.
- Vue's duplicate-id development warning says "Merged", as React's does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add ɵgetChatViewState (suggestions, welcome screen, bottom padding) and
ɵcreateLastUserMessageTracker to @copilotkit/core. React and Vue
CopilotChatView and CopilotChat use them; Angular's chat view and scroll
view use the same rule.

Angular fixes:
- The welcome screen hides while the thread connects and when the new
  [welcomeScreen] input is false (both were ignored).
- Suggestions hide while the agent runs or the thread connects, read from
  the new [isRunning]/[isConnecting] inputs instead of the cursor.
- CopilotChat takes an [autoScroll] input instead of always passing true.

React now computes the pin-to-send nonce during render instead of in an
effect, which saves one render per send.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…een changes

Add "Sending messages", "Attachment uploads", "Welcome screen and
suggestions in Angular" and "Console messages" to the chat 2.0
migration page. Update the maxConcurrentUploads doc comment: Vue and
Angular now honor it too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…sion

Angular CopilotChat tracks each thread connect through the chat session
coordinator and also ends the Inspector's view-thread override when that
connect fails. React CopilotChat and the attachment tests keep the core
chat session versions. Keep both sides' core exports and chat-2.0
sections. Regenerate react-core external re-exports and the public API
manifest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… state

ɵgetChatViewState returns showConnectingIndicator, the rule 2.0.0 added
to the React CopilotChatView: show it while an empty thread's first
connect loads, unless the app turned it off. React reads it from core.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

CodeRabbit ASCII loading animation

Currently processing new changes in this PR. This may take a few minutes, please wait...

Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between ee16793 and 5bfca85.

Files selected for processing: 42
  • .lint-baseline/oxlint.json
  • packages/angular/src/lib/active-thread-connector.spec.ts
  • packages/angular/src/lib/active-thread-connector.ts
  • packages/angular/src/lib/components/chat/__tests__/copilot-chat-view.component.spec.ts
  • packages/angular/src/lib/components/chat/__tests__/copilot-chat.spec.ts
  • packages/angular/src/lib/components/chat/copilot-chat-attachments.directive.ts
  • packages/angular/src/lib/components/chat/copilot-chat-message-view.ts
  • packages/angular/src/lib/components/chat/copilot-chat-view-scroll-view.ts
  • packages/angular/src/lib/components/chat/copilot-chat-view.ts
  • packages/angular/src/lib/components/chat/copilot-chat-view.types.ts
  • packages/angular/src/lib/components/chat/copilot-chat.ts
  • packages/core/src/chat/__tests__/attachment-queue.test.ts
  • packages/core/src/chat/__tests__/chat-view.test.ts
  • packages/core/src/chat/__tests__/message-view.test.ts
  • packages/core/src/chat/__tests__/session-test-agent.ts
  • packages/core/src/chat/__tests__/session.test.ts
  • packages/core/src/chat/__tests__/thread-switch.test.ts
  • packages/core/src/chat/attachment-queue.ts
  • packages/core/src/chat/chat-view.ts
  • packages/core/src/chat/index.ts
  • packages/core/src/chat/message-view.ts
  • packages/core/src/chat/session.ts
  • packages/core/src/chat/thread-switch.ts
  • packages/core/src/core/__tests__/thread-baseline.test.ts
  • packages/core/src/core/index.ts
  • packages/core/src/core/run-handler.ts
  • packages/core/src/core/thread-baseline.ts
  • packages/react-core/src/components/chat/CopilotChat.tsx
  • packages/react-core/src/components/chat/CopilotChatMessageView.tsx
  • packages/react-core/src/components/chat/CopilotChatView.tsx
  • packages/react-core/src/external-reexports.ts
  • packages/react-core/src/hooks/__tests__/use-attachments.test.tsx
  • packages/react-core/src/hooks/use-attachments.tsx
  • packages/shared/src/attachments/types.ts
  • packages/vue/src/v2/__tests__/utils/test-helpers.ts
  • packages/vue/src/v2/components/chat/CopilotChat.vue
  • packages/vue/src/v2/components/chat/CopilotChatMessageView.vue
  • packages/vue/src/v2/components/chat/CopilotChatView.vue
  • packages/vue/src/v2/hooks/__tests__/use-frontend-tool.e2e.test.ts
  • packages/vue/src/v2/hooks/__tests__/use-human-in-the-loop.e2e.test.ts
  • packages/vue/src/v2/hooks/use-attachments.ts
  • showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Production Digest-Pinning Audit

All 43 services digest-pinned.

Run 2026-11-04 02:43:09 PST — 0 finding(s).

@pkg-pr-new

pkg-pr-new Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
@copilotkit/a2ui-renderer

pnpm add https://pkg.pr.new/@copilotkit/a2ui-renderer@8179

@copilotkit/agentcore-runner

pnpm add https://pkg.pr.new/@copilotkit/agentcore-runner@8179

@copilotkit/angular

pnpm add https://pkg.pr.new/@copilotkit/angular@8179

@copilotkit/channels

pnpm add https://pkg.pr.new/@copilotkit/channels@8179

@copilotkit/channels-core

pnpm add https://pkg.pr.new/@copilotkit/channels-core@8179

@copilotkit/channels-discord

pnpm add https://pkg.pr.new/@copilotkit/channels-discord@8179

@copilotkit/channels-intelligence

pnpm add https://pkg.pr.new/@copilotkit/channels-intelligence@8179

@copilotkit/channels-slack

pnpm add https://pkg.pr.new/@copilotkit/channels-slack@8179

@copilotkit/channels-teams

pnpm add https://pkg.pr.new/@copilotkit/channels-teams@8179

@copilotkit/channels-ui

pnpm add https://pkg.pr.new/@copilotkit/channels-ui@8179

@copilotkit/channels-whatsapp

pnpm add https://pkg.pr.new/@copilotkit/channels-whatsapp@8179

@copilotkit/core

pnpm add https://pkg.pr.new/@copilotkit/core@8179

@copilotkit/intelligence-langgraph

pnpm add https://pkg.pr.new/@copilotkit/intelligence-langgraph@8179

@copilotkit/intelligence-mastra

pnpm add https://pkg.pr.new/@copilotkit/intelligence-mastra@8179

@copilotkit/learning

pnpm add https://pkg.pr.new/@copilotkit/learning@8179

@copilotkit/markdown

pnpm add https://pkg.pr.new/@copilotkit/markdown@8179

@copilotkit/mcp-apps-renderer

pnpm add https://pkg.pr.new/@copilotkit/mcp-apps-renderer@8179

@copilotkit/react-core

pnpm add https://pkg.pr.new/@copilotkit/react-core@8179

@copilotkit/react-native

pnpm add https://pkg.pr.new/@copilotkit/react-native@8179

@copilotkit/runtime

pnpm add https://pkg.pr.new/@copilotkit/runtime@8179

@copilotkit/sdk-js

pnpm add https://pkg.pr.new/@copilotkit/sdk-js@8179

@copilotkit/shared

pnpm add https://pkg.pr.new/@copilotkit/shared@8179

@copilotkit/sqlite-runner

pnpm add https://pkg.pr.new/@copilotkit/sqlite-runner@8179

@copilotkit/voice

pnpm add https://pkg.pr.new/@copilotkit/voice@8179

@copilotkit/vue

pnpm add https://pkg.pr.new/@copilotkit/vue@8179

@copilotkit/web-components

pnpm add https://pkg.pr.new/@copilotkit/web-components@8179

@copilotkit/web-inspector

pnpm add https://pkg.pr.new/@copilotkit/web-inspector@8179

commit: 5bfca85

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Size Change: +23 kB (+0.99%)

Total Size: 2.35 MB

📦 View Changed
Filename Size Change
packages/core/dist/index.cjs 181 kB +10.4 kB (+6.1%) 🔍
packages/core/dist/index.mjs 180 kB +10.3 kB (+6.09%) 🔍
packages/core/dist/index.umd.js 205 kB +10.8 kB (+5.58%) 🔍
packages/react-core/dist/index.cjs 107 kB -2.93 kB (-2.67%)
packages/react-core/dist/index.mjs 108 kB -2.9 kB (-2.62%)
packages/react-core/dist/index.umd.js 141 kB -2.76 kB (-1.92%)
ℹ️ View Unchanged
Filename Size
packages/a2ui-renderer/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/a2ui-renderer/dist/a2ui-types.cjs 472 B
packages/a2ui-renderer/dist/a2ui-types.mjs 469 B
packages/a2ui-renderer/dist/basic-styles.cjs 942 B
packages/a2ui-renderer/dist/basic-styles.mjs 905 B
packages/a2ui-renderer/dist/catalog-context.cjs 992 B
packages/a2ui-renderer/dist/catalog-context.mjs 950 B
packages/a2ui-renderer/dist/catalog-controller.cjs 1.48 kB
packages/a2ui-renderer/dist/catalog-controller.mjs 1.43 kB
packages/a2ui-renderer/dist/catalog-description.cjs 1.48 kB
packages/a2ui-renderer/dist/catalog-description.mjs 1.4 kB
packages/a2ui-renderer/dist/catalog-ids.cjs 217 B
packages/a2ui-renderer/dist/catalog-ids.mjs 216 B
packages/a2ui-renderer/dist/catalog-schema.cjs 385 B
packages/a2ui-renderer/dist/catalog-schema.mjs 276 B
packages/a2ui-renderer/dist/engine-core.cjs 273 B
packages/a2ui-renderer/dist/engine-core.mjs 198 B
packages/a2ui-renderer/dist/engine.cjs 345 B
packages/a2ui-renderer/dist/engine.mjs 239 B
packages/a2ui-renderer/dist/engine/apply-operations.cjs 2.16 kB
packages/a2ui-renderer/dist/engine/apply-operations.mjs 2.1 kB
packages/a2ui-renderer/dist/engine/surface-diagnostics.cjs 1.09 kB
packages/a2ui-renderer/dist/engine/surface-diagnostics.mjs 1.05 kB
packages/a2ui-renderer/dist/engine/tool-operations.cjs 1.16 kB
packages/a2ui-renderer/dist/engine/tool-operations.mjs 1.09 kB
packages/a2ui-renderer/dist/filter-catalog.cjs 536 B
packages/a2ui-renderer/dist/filter-catalog.mjs 534 B
packages/a2ui-renderer/dist/index.cjs 944 B
packages/a2ui-renderer/dist/index.mjs 624 B
packages/a2ui-renderer/dist/index.umd.js 14.8 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/A2uiSurface.cjs 1.52 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/A2uiSurface.mjs 1.46 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/adapter.cjs 1.57 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/adapter.mjs 1.5 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.cjs 924 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/AudioPlayer.mjs 510 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Button.cjs 1.03 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Button.mjs 627 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Card.cjs 850 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Card.mjs 438 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.cjs 1.12 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/CheckBox.mjs 1.04 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.cjs 799 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChildList.mjs 737 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.cjs 1.65 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/ChoicePicker.mjs 1.59 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Column.cjs 862 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Column.mjs 806 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.cjs 1.1 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/DateTimeInput.mjs 1.03 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.cjs 860 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Divider.mjs 448 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.cjs 882 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Icon.mjs 473 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Image.cjs 1 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Image.mjs 590 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/List.cjs 925 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/List.mjs 510 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.cjs 1.21 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Modal.mjs 1.15 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Row.cjs 860 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Row.mjs 804 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.cjs 1.08 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Slider.mjs 1 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.cjs 1.12 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Tabs.mjs 1.06 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Text.cjs 922 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Text.mjs 507 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.cjs 1.23 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/TextField.mjs 1.16 kB
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Video.cjs 792 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/components/Video.mjs 381 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/index.cjs 928 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/catalog/basic/index.mjs 855 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/index.cjs 303 B
packages/a2ui-renderer/dist/react-renderer/a2ui-react/index.mjs 318 B
packages/a2ui-renderer/dist/react-renderer/catalog-utils.cjs 706 B
packages/a2ui-renderer/dist/react-renderer/catalog-utils.mjs 725 B
packages/a2ui-renderer/dist/react-renderer/core/A2UIProvider.cjs 1.56 kB
packages/a2ui-renderer/dist/react-renderer/core/A2UIProvider.mjs 1.48 kB
packages/a2ui-renderer/dist/react-renderer/core/A2UIRenderer.cjs 728 B
packages/a2ui-renderer/dist/react-renderer/core/A2UIRenderer.mjs 671 B
packages/a2ui-renderer/dist/react-renderer/create-catalog.cjs 1.21 kB
packages/a2ui-renderer/dist/react-renderer/create-catalog.mjs 1.15 kB
packages/a2ui-renderer/dist/react-renderer/hooks/useA2UI.cjs 316 B
packages/a2ui-renderer/dist/react-renderer/hooks/useA2UI.mjs 309 B
packages/a2ui-renderer/dist/react-renderer/index.cjs 430 B
packages/a2ui-renderer/dist/react-renderer/index.mjs 561 B
packages/a2ui-renderer/dist/react-renderer/lib/utils.cjs 236 B
packages/a2ui-renderer/dist/react-renderer/lib/utils.mjs 188 B
packages/a2ui-renderer/dist/react-renderer/styles/index.cjs 239 B
packages/a2ui-renderer/dist/react-renderer/styles/index.mjs 231 B
packages/a2ui-renderer/dist/react-renderer/theme/ThemeContext.cjs 436 B
packages/a2ui-renderer/dist/react-renderer/theme/ThemeContext.mjs 381 B
packages/core/dist/chat-configuration.cjs 2.95 kB
packages/core/dist/chat-configuration.mjs 2.89 kB
packages/core/dist/styles.cjs 13.5 kB
packages/core/dist/styles.mjs 13.5 kB
packages/core/dist/viewport-B0DGmyta.cjs 2.63 kB
packages/core/dist/viewport-BkM_3mlk.mjs 2.55 kB
packages/mcp-apps-renderer/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/mcp-apps-renderer/dist/activity.cjs 354 B
packages/mcp-apps-renderer/dist/activity.mjs 278 B
packages/mcp-apps-renderer/dist/activity.umd.js 5.9 kB
packages/mcp-apps-renderer/dist/constants.cjs 714 B
packages/mcp-apps-renderer/dist/constants.mjs 712 B
packages/mcp-apps-renderer/dist/content-schema.cjs 813 B
packages/mcp-apps-renderer/dist/content-schema.mjs 757 B
packages/mcp-apps-renderer/dist/follow-up.cjs 796 B
packages/mcp-apps-renderer/dist/follow-up.mjs 794 B
packages/mcp-apps-renderer/dist/host.cjs 2.77 kB
packages/mcp-apps-renderer/dist/host.mjs 2.75 kB
packages/mcp-apps-renderer/dist/index.mjs 369 B
packages/mcp-apps-renderer/dist/request-queue.mjs 2.39 kB
packages/mcp-apps-renderer/dist/sandbox.mjs 2 kB
packages/mcp-apps-renderer/dist/session.mjs 6.91 kB
packages/react-core/dist/context.cjs 1.57 kB
packages/react-core/dist/context.mjs 1.49 kB
packages/react-core/dist/generative-ui.cjs 70.8 kB
packages/react-core/dist/generative-ui.mjs 70.2 kB
packages/react-core/dist/headless.cjs 14.3 kB
packages/react-core/dist/headless.mjs 13.8 kB
packages/react-core/dist/MarkdownSurfaces-DconGoF7.cjs 38.8 kB
packages/react-core/dist/MarkdownSurfaces-uLCN1NSS.mjs 38.2 kB
packages/react-native/dist/components/index.cjs 8.24 kB
packages/react-native/dist/components/index.mjs 8.11 kB
packages/react-native/dist/CopilotKitProvider-BXpkAl1Y.mjs 1.52 kB
packages/react-native/dist/CopilotKitProvider-DDPbJkHS.cjs 1.62 kB
packages/react-native/dist/headless.cjs 647 B
packages/react-native/dist/headless.mjs 385 B
packages/react-native/dist/index.cjs 6.87 kB
packages/react-native/dist/index.mjs 6.5 kB
packages/react-native/dist/Markdown-CaYHlD4j.cjs 795 B
packages/react-native/dist/Markdown-SE9MfY2U.mjs 675 B
packages/react-native/dist/MarkdownRendererContext-B_AKdPAN.mjs 430 B
packages/react-native/dist/MarkdownRendererContext-BRNe808d.cjs 915 B
packages/react-native/dist/polyfills.cjs 208 B
packages/react-native/dist/polyfills.mjs 217 B
packages/react-native/dist/polyfills/crypto.cjs 373 B
packages/react-native/dist/polyfills/crypto.mjs 381 B
packages/react-native/dist/polyfills/dom.cjs 540 B
packages/react-native/dist/polyfills/dom.mjs 550 B
packages/react-native/dist/polyfills/encoding.cjs 356 B
packages/react-native/dist/polyfills/encoding.mjs 366 B
packages/react-native/dist/polyfills/location.cjs 236 B
packages/react-native/dist/polyfills/location.mjs 244 B
packages/react-native/dist/polyfills/streams.cjs 383 B
packages/react-native/dist/polyfills/streams.mjs 339 B
packages/react-native/dist/streaming-fetch-CLHG3Z1H.mjs 2.31 kB
packages/react-native/dist/streaming-fetch-DbDALGya.cjs 2.36 kB
packages/react-native/dist/utf8-BIN9t4Oy.mjs 1.39 kB
packages/react-native/dist/utf8-Cf3Ssy33.cjs 1.45 kB
packages/shared/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/shared/dist/a2ui-envelope.cjs 2.44 kB
packages/shared/dist/a2ui-envelope.mjs 2.42 kB
packages/shared/dist/a2ui-prompts.cjs 4.57 kB
packages/shared/dist/a2ui-prompts.mjs 4.54 kB
packages/shared/dist/attachments/content.cjs 255 B
packages/shared/dist/attachments/content.mjs 253 B
packages/shared/dist/attachments/utils.cjs 1.83 kB
packages/shared/dist/attachments/utils.mjs 1.79 kB
packages/shared/dist/constants/index.cjs 501 B
packages/shared/dist/constants/index.mjs 480 B
packages/shared/dist/debug.cjs 454 B
packages/shared/dist/debug.mjs 452 B
packages/shared/dist/finalize-events.cjs 2.07 kB
packages/shared/dist/finalize-events.mjs 2 kB
packages/shared/dist/generative-ui/basic-functions.cjs 2.5 kB
packages/shared/dist/generative-ui/basic-functions.mjs 2.45 kB
packages/shared/dist/generative-ui/child-refs.cjs 2.34 kB
packages/shared/dist/generative-ui/child-refs.mjs 2.27 kB
packages/shared/dist/generative-ui/compact-schema.cjs 2.97 kB
packages/shared/dist/generative-ui/compact-schema.mjs 2.94 kB
packages/shared/dist/generative-ui/is-record.cjs 226 B
packages/shared/dist/generative-ui/is-record.mjs 223 B
packages/shared/dist/generative-ui/prompt-spec.cjs 8.13 kB
packages/shared/dist/generative-ui/prompt-spec.mjs 8.1 kB
packages/shared/dist/generative-ui/prompt.cjs 1.64 kB
packages/shared/dist/generative-ui/prompt.mjs 1.6 kB
packages/shared/dist/generative-ui/render-ui-args.cjs 1.49 kB
packages/shared/dist/generative-ui/render-ui-args.mjs 1.47 kB
packages/shared/dist/generative-ui/schema-render.cjs 3.91 kB
packages/shared/dist/generative-ui/schema-render.mjs 3.88 kB
packages/shared/dist/generative-ui/types.cjs 1.57 kB
packages/shared/dist/generative-ui/types.mjs 1.51 kB
packages/shared/dist/generative-ui/validate-operation.cjs 5.61 kB
packages/shared/dist/generative-ui/validate-operation.mjs 5.55 kB
packages/shared/dist/index.cjs 3.9 kB
packages/shared/dist/index.mjs 3.28 kB
packages/shared/dist/index.umd.js 59.7 kB
packages/shared/dist/intelligence-routing-fields.cjs 778 B
packages/shared/dist/intelligence-routing-fields.mjs 775 B
packages/shared/dist/logger.cjs 112 B
packages/shared/dist/logger.mjs 112 B
packages/shared/dist/open-generative-ui-prompts.cjs 1.59 kB
packages/shared/dist/open-generative-ui-prompts.mjs 1.59 kB
packages/shared/dist/package.cjs 181 B
packages/shared/dist/package.mjs 116 B
packages/shared/dist/standard-schema.cjs 910 B
packages/shared/dist/standard-schema.mjs 903 B
packages/shared/dist/telemetry/lambda-client.cjs 1.6 kB
packages/shared/dist/telemetry/lambda-client.mjs 1.58 kB
packages/shared/dist/telemetry/model-host.cjs 1.63 kB
packages/shared/dist/telemetry/model-host.mjs 1.63 kB
packages/shared/dist/telemetry/sampling.cjs 956 B
packages/shared/dist/telemetry/sampling.mjs 935 B
packages/shared/dist/telemetry/telemetry-disabled.cjs 349 B
packages/shared/dist/telemetry/telemetry-disabled.mjs 339 B
packages/shared/dist/transcription-errors.cjs 951 B
packages/shared/dist/transcription-errors.mjs 944 B
packages/shared/dist/utils/clipboard.cjs 407 B
packages/shared/dist/utils/clipboard.mjs 405 B
packages/shared/dist/utils/dashboard-url.cjs 415 B
packages/shared/dist/utils/dashboard-url.mjs 413 B
packages/shared/dist/utils/errors.cjs 4.1 kB
packages/shared/dist/utils/errors.mjs 4.04 kB
packages/shared/dist/utils/index.cjs 1.49 kB
packages/shared/dist/utils/index.mjs 1.71 kB
packages/shared/dist/utils/inspector-learning.cjs 2.74 kB
packages/shared/dist/utils/inspector-learning.mjs 2.73 kB
packages/shared/dist/utils/inspector-metadata.cjs 1.44 kB
packages/shared/dist/utils/inspector-metadata.mjs 1.43 kB
packages/shared/dist/utils/inspector-visibility.cjs 285 B
packages/shared/dist/utils/inspector-visibility.mjs 282 B
packages/shared/dist/utils/json-schema.cjs 1.16 kB
packages/shared/dist/utils/json-schema.mjs 1.15 kB
packages/shared/dist/utils/process-env.cjs 293 B
packages/shared/dist/utils/process-env.mjs 290 B
packages/shared/dist/utils/random-id.cjs 555 B
packages/shared/dist/utils/random-id.mjs 546 B
packages/shared/dist/utils/requests.cjs 706 B
packages/shared/dist/utils/requests.mjs 704 B
packages/shared/dist/utils/row-render-keys.cjs 3.38 kB
packages/shared/dist/utils/row-render-keys.mjs 3.36 kB
packages/shared/dist/utils/types.cjs 161 B
packages/shared/dist/utils/types.mjs 160 B
packages/voice/dist/_virtual/_rolldown/runtime.cjs 516 B
packages/voice/dist/index.cjs 175 B
packages/voice/dist/index.mjs 95 B
packages/voice/dist/index.umd.js 1.49 kB
packages/voice/dist/transcription/transcription-service-openai.cjs 486 B
packages/voice/dist/transcription/transcription-service-openai.mjs 430 B
packages/web-inspector/dist/assets/inspector-logo-kite.cjs 2.36 kB
packages/web-inspector/dist/assets/inspector-logo-kite.mjs 2.3 kB
packages/web-inspector/dist/assets/inspector-logo.cjs 4.32 kB
packages/web-inspector/dist/assets/inspector-logo.mjs 4.23 kB
packages/web-inspector/dist/domains/announcements/article.styles.cjs 1.42 kB
packages/web-inspector/dist/domains/announcements/article.styles.mjs 1.42 kB
packages/web-inspector/dist/domains/announcements/document.cjs 615 B
packages/web-inspector/dist/domains/announcements/document.mjs 604 B
packages/web-inspector/dist/domains/announcements/feed.cjs 1.64 kB
packages/web-inspector/dist/domains/announcements/feed.mjs 1.64 kB
packages/web-inspector/dist/domains/announcements/markdown.cjs 2.92 kB
packages/web-inspector/dist/domains/announcements/markdown.mjs 2.92 kB
packages/web-inspector/dist/domains/announcements/notification-loader.cjs 795 B
packages/web-inspector/dist/domains/announcements/notification-loader.mjs 789 B
packages/web-inspector/dist/domains/announcements/notifications.cjs 2.4 kB
packages/web-inspector/dist/domains/announcements/notifications.mjs 2.38 kB
packages/web-inspector/dist/domains/announcements/storage.cjs 2.04 kB
packages/web-inspector/dist/domains/announcements/storage.mjs 2.01 kB
packages/web-inspector/dist/domains/announcements/telemetry.cjs 699 B
packages/web-inspector/dist/domains/announcements/telemetry.mjs 697 B
packages/web-inspector/dist/domains/announcements/view.cjs 1.54 kB
packages/web-inspector/dist/domains/announcements/view.mjs 1.5 kB
packages/web-inspector/dist/domains/announcements/view.styles.cjs 2.22 kB
packages/web-inspector/dist/domains/announcements/view.styles.mjs 2.2 kB
packages/web-inspector/dist/domains/generative-ui/model.cjs 1.88 kB
packages/web-inspector/dist/domains/generative-ui/model.mjs 1.83 kB
packages/web-inspector/dist/domains/generative-ui/view.cjs 5.03 kB
packages/web-inspector/dist/domains/generative-ui/view.mjs 5.01 kB
packages/web-inspector/dist/domains/generative-ui/view.styles.cjs 1.8 kB
packages/web-inspector/dist/domains/generative-ui/view.styles.mjs 1.8 kB
packages/web-inspector/dist/domains/home/feature-setup.cjs 696 B
packages/web-inspector/dist/domains/home/feature-setup.mjs 671 B
packages/web-inspector/dist/domains/home/intelligence-state.cjs 1.43 kB
packages/web-inspector/dist/domains/home/intelligence-state.mjs 1.39 kB
packages/web-inspector/dist/domains/home/intelligence-view.cjs 3.21 kB
packages/web-inspector/dist/domains/home/intelligence-view.mjs 3.19 kB
packages/web-inspector/dist/domains/home/intelligence.base.styles.cjs 2.79 kB
packages/web-inspector/dist/domains/home/intelligence.base.styles.mjs 2.78 kB
packages/web-inspector/dist/domains/home/intelligence.dark.styles.cjs 884 B
packages/web-inspector/dist/domains/home/intelligence.dark.styles.mjs 880 B
packages/web-inspector/dist/domains/home/model.cjs 3.21 kB
packages/web-inspector/dist/domains/home/model.mjs 3.18 kB
packages/web-inspector/dist/domains/home/onboarding-prompt.cjs 924 B
packages/web-inspector/dist/domains/home/onboarding-prompt.mjs 913 B
packages/web-inspector/dist/domains/home/telemetry.cjs 415 B
packages/web-inspector/dist/domains/home/telemetry.mjs 403 B
packages/web-inspector/dist/domains/home/view.base.styles.cjs 3.37 kB
packages/web-inspector/dist/domains/home/view.base.styles.mjs 3.37 kB
packages/web-inspector/dist/domains/home/view.cjs 3 kB
packages/web-inspector/dist/domains/home/view.dark.styles.cjs 1.16 kB
packages/web-inspector/dist/domains/home/view.dark.styles.mjs 1.15 kB
packages/web-inspector/dist/domains/home/view.mjs 2.97 kB
packages/web-inspector/dist/domains/home/view.styles.cjs 263 B
packages/web-inspector/dist/domains/home/view.styles.mjs 232 B
packages/web-inspector/dist/domains/learning/inspector-learning.cjs 759 B
packages/web-inspector/dist/domains/learning/inspector-learning.mjs 736 B
packages/web-inspector/dist/domains/learning/learning-setup.cjs 1.12 kB
packages/web-inspector/dist/domains/learning/learning-setup.mjs 1.09 kB
packages/web-inspector/dist/domains/learning/memory-list.cjs 2.48 kB
packages/web-inspector/dist/domains/learning/memory-list.mjs 2.46 kB
packages/web-inspector/dist/domains/learning/memory-list.styles.cjs 1.61 kB
packages/web-inspector/dist/domains/learning/memory-list.styles.mjs 1.61 kB
packages/web-inspector/dist/domains/learning/recall.cjs 625 B
packages/web-inspector/dist/domains/learning/recall.mjs 610 B
packages/web-inspector/dist/domains/learning/snapshot-evidence.cjs 2.07 kB
packages/web-inspector/dist/domains/learning/snapshot-evidence.mjs 2.06 kB
packages/web-inspector/dist/domains/learning/snapshot-state.cjs 420 B
packages/web-inspector/dist/domains/learning/snapshot-state.mjs 418 B
packages/web-inspector/dist/domains/learning/snapshot-view.base.styles.cjs 2.48 kB
packages/web-inspector/dist/domains/learning/snapshot-view.base.styles.mjs 2.47 kB
packages/web-inspector/dist/domains/learning/snapshot-view.cjs 5.53 kB
packages/web-inspector/dist/domains/learning/snapshot-view.mjs 5.51 kB
packages/web-inspector/dist/domains/learning/snapshot-view.panel.styles.cjs 2.17 kB
packages/web-inspector/dist/domains/learning/snapshot-view.panel.styles.mjs 2.17 kB
packages/web-inspector/dist/domains/learning/state.cjs 618 B
packages/web-inspector/dist/domains/learning/state.mjs 586 B
packages/web-inspector/dist/domains/learning/subscription.cjs 568 B
packages/web-inspector/dist/domains/learning/subscription.mjs 570 B
packages/web-inspector/dist/domains/learning/telemetry.cjs 341 B
packages/web-inspector/dist/domains/learning/telemetry.mjs 333 B
packages/web-inspector/dist/domains/learning/view.cjs 215 B
packages/web-inspector/dist/domains/learning/view.mjs 214 B
packages/web-inspector/dist/domains/learning/view.styles.cjs 1.85 kB
packages/web-inspector/dist/domains/learning/view.styles.mjs 1.85 kB
packages/web-inspector/dist/domains/live-inspection/agent-adapter.cjs 2.05 kB
packages/web-inspector/dist/domains/live-inspection/agent-adapter.mjs 2.02 kB
packages/web-inspector/dist/domains/live-inspection/agents/model.cjs 853 B
packages/web-inspector/dist/domains/live-inspection/agents/model.mjs 827 B
packages/web-inspector/dist/domains/live-inspection/agents/view.cjs 3.72 kB
packages/web-inspector/dist/domains/live-inspection/agents/view.mjs 3.7 kB
packages/web-inspector/dist/domains/live-inspection/capabilities/model.cjs 322 B
packages/web-inspector/dist/domains/live-inspection/capabilities/model.mjs 319 B
packages/web-inspector/dist/domains/live-inspection/capabilities/view.cjs 1.27 kB
packages/web-inspector/dist/domains/live-inspection/capabilities/view.mjs 1.26 kB
packages/web-inspector/dist/domains/live-inspection/context/model.cjs 751 B
packages/web-inspector/dist/domains/live-inspection/context/model.mjs 739 B
packages/web-inspector/dist/domains/live-inspection/context/view.cjs 1.44 kB
packages/web-inspector/dist/domains/live-inspection/context/view.mjs 1.42 kB
packages/web-inspector/dist/domains/live-inspection/event-buffer.cjs 598 B
packages/web-inspector/dist/domains/live-inspection/event-buffer.mjs 585 B
packages/web-inspector/dist/domains/live-inspection/events/model.cjs 1.01 kB
packages/web-inspector/dist/domains/live-inspection/events/model.mjs 975 B
packages/web-inspector/dist/domains/live-inspection/events/view.cjs 2.79 kB
packages/web-inspector/dist/domains/live-inspection/events/view.mjs 2.79 kB
packages/web-inspector/dist/domains/live-inspection/events/view.styles.cjs 830 B
packages/web-inspector/dist/domains/live-inspection/events/view.styles.mjs 825 B
packages/web-inspector/dist/domains/live-inspection/state.cjs 817 B
packages/web-inspector/dist/domains/live-inspection/state.mjs 800 B
packages/web-inspector/dist/domains/live-inspection/tools/model.cjs 1.33 kB
packages/web-inspector/dist/domains/live-inspection/tools/model.mjs 1.31 kB
packages/web-inspector/dist/domains/live-inspection/tools/view.cjs 1.93 kB
packages/web-inspector/dist/domains/live-inspection/tools/view.mjs 1.91 kB
packages/web-inspector/dist/domains/playground/composer.cjs 1.97 kB
packages/web-inspector/dist/domains/playground/composer.mjs 1.93 kB
packages/web-inspector/dist/domains/playground/element-guards.cjs 363 B
packages/web-inspector/dist/domains/playground/element-guards.mjs 356 B
packages/web-inspector/dist/domains/playground/message-adapter.cjs 720 B
packages/web-inspector/dist/domains/playground/message-adapter.mjs 698 B
packages/web-inspector/dist/domains/playground/session.cjs 2.52 kB
packages/web-inspector/dist/domains/playground/session.mjs 2.49 kB
packages/web-inspector/dist/domains/playground/state.cjs 312 B
packages/web-inspector/dist/domains/playground/state.mjs 309 B
packages/web-inspector/dist/domains/playground/view.cjs 3.58 kB
packages/web-inspector/dist/domains/playground/view.mjs 3.56 kB
packages/web-inspector/dist/domains/playground/view.styles.cjs 989 B
packages/web-inspector/dist/domains/playground/view.styles.mjs 981 B
packages/web-inspector/dist/domains/threads/detail/conversation-view.cjs 1.77 kB
packages/web-inspector/dist/domains/threads/detail/conversation-view.mjs 1.75 kB
packages/web-inspector/dist/domains/threads/detail/divider-resize.cjs 510 B
packages/web-inspector/dist/domains/threads/detail/divider-resize.mjs 509 B
packages/web-inspector/dist/domains/threads/detail/event-adapter.cjs 779 B
packages/web-inspector/dist/domains/threads/detail/event-adapter.mjs 760 B
packages/web-inspector/dist/domains/threads/detail/events-view.cjs 898 B
packages/web-inspector/dist/domains/threads/detail/events-view.mjs 883 B
packages/web-inspector/dist/domains/threads/detail/focus.cjs 430 B
packages/web-inspector/dist/domains/threads/detail/focus.mjs 420 B
packages/web-inspector/dist/domains/threads/detail/message-adapter.cjs 1.14 kB
packages/web-inspector/dist/domains/threads/detail/message-adapter.mjs 1.13 kB
packages/web-inspector/dist/domains/threads/detail/message-refresh.cjs 742 B
packages/web-inspector/dist/domains/threads/detail/message-refresh.mjs 741 B
packages/web-inspector/dist/domains/threads/detail/provider.cjs 696 B
packages/web-inspector/dist/domains/threads/detail/provider.mjs 679 B
packages/web-inspector/dist/domains/threads/detail/state-view.cjs 1.01 kB
packages/web-inspector/dist/domains/threads/detail/state-view.mjs 985 B
packages/web-inspector/dist/domains/threads/detail/thread-inspector-model.cjs 1.21 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector-model.mjs 1.17 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector-view.cjs 3.6 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector-view.mjs 3.52 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector.base.styles.cjs 3.41 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector.base.styles.mjs 3.4 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector.cjs 4.6 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector.dark.styles.cjs 1.01 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector.dark.styles.mjs 1.01 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector.detail.styles.cjs 1.99 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector.detail.styles.mjs 1.99 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector.mjs 4.6 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector.styles.cjs 273 B
packages/web-inspector/dist/domains/threads/detail/thread-inspector.styles.mjs 236 B
packages/web-inspector/dist/domains/threads/detail/thread-inspector.tool.styles.cjs 1.36 kB
packages/web-inspector/dist/domains/threads/detail/thread-inspector.tool.styles.mjs 1.35 kB
packages/web-inspector/dist/domains/threads/detail/thread-runtime.cjs 650 B
packages/web-inspector/dist/domains/threads/detail/thread-runtime.mjs 631 B
packages/web-inspector/dist/domains/threads/detail/timeline-model.cjs 2.86 kB
packages/web-inspector/dist/domains/threads/detail/timeline-model.mjs 2.84 kB
packages/web-inspector/dist/domains/threads/detail/timeline-view.cjs 1.14 kB
packages/web-inspector/dist/domains/threads/detail/timeline-view.mjs 1.11 kB
packages/web-inspector/dist/domains/threads/examples/data.cjs 1.29 kB
packages/web-inspector/dist/domains/threads/examples/data.mjs 1.28 kB
packages/web-inspector/dist/domains/threads/examples/provider.cjs 499 B
packages/web-inspector/dist/domains/threads/examples/provider.mjs 484 B
packages/web-inspector/dist/domains/threads/examples/tour.cjs 976 B
packages/web-inspector/dist/domains/threads/examples/tour.mjs 945 B
packages/web-inspector/dist/domains/threads/examples/video.cjs 2.01 kB
packages/web-inspector/dist/domains/threads/examples/video.mjs 1.99 kB
packages/web-inspector/dist/domains/threads/list/thread-list.cjs 1.62 kB
packages/web-inspector/dist/domains/threads/list/thread-list.mjs 1.59 kB
packages/web-inspector/dist/domains/threads/list/thread-list.styles.cjs 1.29 kB
packages/web-inspector/dist/domains/threads/list/thread-list.styles.mjs 1.28 kB
packages/web-inspector/dist/domains/threads/selectors.cjs 1.15 kB
packages/web-inspector/dist/domains/threads/selectors.mjs 1.11 kB
packages/web-inspector/dist/domains/threads/state.cjs 735 B
packages/web-inspector/dist/domains/threads/state.mjs 732 B
packages/web-inspector/dist/domains/threads/store-bridge.cjs 2.1 kB
packages/web-inspector/dist/domains/threads/store-bridge.mjs 2.02 kB
packages/web-inspector/dist/domains/threads/telemetry/events.cjs 352 B
packages/web-inspector/dist/domains/threads/telemetry/events.mjs 336 B
packages/web-inspector/dist/domains/threads/usage.cjs 1.19 kB
packages/web-inspector/dist/domains/threads/usage.mjs 1.15 kB
packages/web-inspector/dist/domains/threads/view.cjs 3.52 kB
packages/web-inspector/dist/domains/threads/view.mjs 3.48 kB
packages/web-inspector/dist/domains/threads/view.styles.cjs 429 B
packages/web-inspector/dist/domains/threads/view.styles.mjs 423 B
packages/web-inspector/dist/index.cjs 501 B
packages/web-inspector/dist/index.mjs 397 B
packages/web-inspector/dist/index.umd.js 227 kB
packages/web-inspector/dist/package.cjs 181 B
packages/web-inspector/dist/package.mjs 116 B
packages/web-inspector/dist/register.cjs 907 B
packages/web-inspector/dist/register.mjs 842 B
packages/web-inspector/dist/shared/display/display-value.cjs 571 B
packages/web-inspector/dist/shared/display/display-value.mjs 562 B
packages/web-inspector/dist/shared/learning/status.cjs 359 B
packages/web-inspector/dist/shared/learning/status.mjs 348 B
packages/web-inspector/dist/shared/locked-feature/copy.cjs 1.52 kB
packages/web-inspector/dist/shared/locked-feature/copy.mjs 1.5 kB
packages/web-inspector/dist/shared/locked-feature/view.cjs 787 B
packages/web-inspector/dist/shared/locked-feature/view.mjs 782 B
packages/web-inspector/dist/shared/persistence/inspector-state.cjs 1.61 kB
packages/web-inspector/dist/shared/persistence/inspector-state.mjs 1.57 kB
packages/web-inspector/dist/shared/persistence/telemetry.cjs 679 B
packages/web-inspector/dist/shared/persistence/telemetry.mjs 660 B
packages/web-inspector/dist/shared/telemetry/learning-buckets.cjs 292 B
packages/web-inspector/dist/shared/telemetry/learning-buckets.mjs 285 B
packages/web-inspector/dist/shared/telemetry/privacy.cjs 4.16 kB
packages/web-inspector/dist/shared/telemetry/privacy.mjs 3.96 kB
packages/web-inspector/dist/shared/telemetry/runtime-url.cjs 405 B
packages/web-inspector/dist/shared/telemetry/runtime-url.mjs 402 B
packages/web-inspector/dist/shared/telemetry/transport.cjs 1.33 kB
packages/web-inspector/dist/shared/telemetry/transport.mjs 1.31 kB
packages/web-inspector/dist/shared/version/semver.cjs 2.25 kB
packages/web-inspector/dist/shared/version/semver.mjs 2.24 kB
packages/web-inspector/dist/shell/core-bridge.cjs 780 B
packages/web-inspector/dist/shell/core-bridge.mjs 749 B
packages/web-inspector/dist/shell/launcher/controller.cjs 3.99 kB
packages/web-inspector/dist/shell/launcher/controller.mjs 4.03 kB
packages/web-inspector/dist/shell/launcher/hud-config.cjs 1.36 kB
packages/web-inspector/dist/shell/launcher/hud-config.mjs 1.35 kB
packages/web-inspector/dist/shell/launcher/hud-defaults.cjs 294 B
packages/web-inspector/dist/shell/launcher/hud-defaults.mjs 291 B
packages/web-inspector/dist/shell/launcher/hud-loader.cjs 564 B
packages/web-inspector/dist/shell/launcher/hud-loader.mjs 554 B
packages/web-inspector/dist/shell/launcher/model.cjs 1.75 kB
packages/web-inspector/dist/shell/launcher/model.mjs 1.67 kB
packages/web-inspector/dist/shell/launcher/state.cjs 394 B
packages/web-inspector/dist/shell/launcher/state.mjs 393 B
packages/web-inspector/dist/shell/launcher/view.cjs 2.9 kB
packages/web-inspector/dist/shell/launcher/view.mjs 2.87 kB
packages/web-inspector/dist/shell/navigation/model.cjs 690 B
packages/web-inspector/dist/shell/navigation/model.mjs 667 B
packages/web-inspector/dist/shell/settings/theme.cjs 314 B
packages/web-inspector/dist/shell/settings/theme.mjs 306 B
packages/web-inspector/dist/shell/settings/view.cjs 1.31 kB
packages/web-inspector/dist/shell/settings/view.mjs 1.31 kB
packages/web-inspector/dist/shell/state.cjs 663 B
packages/web-inspector/dist/shell/state.mjs 645 B
packages/web-inspector/dist/shell/styles.cjs 209 B
packages/web-inspector/dist/shell/styles.mjs 230 B
packages/web-inspector/dist/shell/styles/base.cjs 6.54 kB
packages/web-inspector/dist/shell/styles/base.mjs 6.53 kB
packages/web-inspector/dist/shell/styles/chrome.cjs 1.36 kB
packages/web-inspector/dist/shell/styles/chrome.mjs 1.34 kB
packages/web-inspector/dist/shell/styles/content.cjs 1.46 kB
packages/web-inspector/dist/shell/styles/content.mjs 1.46 kB
packages/web-inspector/dist/shell/styles/launcher.cjs 3.63 kB
packages/web-inspector/dist/shell/styles/launcher.mjs 3.61 kB
packages/web-inspector/dist/shell/styles/tokens.cjs 421 B
packages/web-inspector/dist/shell/styles/tokens.mjs 413 B
packages/web-inspector/dist/shell/web-inspector-element.cjs 37.3 kB
packages/web-inspector/dist/shell/web-inspector-element.mjs 37.9 kB
packages/web-inspector/dist/shell/window/controller.cjs 4.27 kB
packages/web-inspector/dist/shell/window/controller.mjs 4.29 kB
packages/web-inspector/dist/shell/window/geometry.cjs 869 B
packages/web-inspector/dist/shell/window/geometry.mjs 837 B
packages/web-inspector/dist/shell/window/host.cjs 282 B
packages/web-inspector/dist/shell/window/host.mjs 267 B
packages/web-inspector/dist/shell/window/keyboard-resize.cjs 466 B
packages/web-inspector/dist/shell/window/keyboard-resize.mjs 463 B
packages/web-inspector/dist/shell/window/pop-out.cjs 1.07 kB
packages/web-inspector/dist/shell/window/pop-out.mjs 1.06 kB
packages/web-inspector/dist/shell/window/realm.cjs 1.42 kB
packages/web-inspector/dist/shell/window/realm.mjs 1.4 kB
packages/web-inspector/dist/shell/window/view.cjs 2.14 kB
packages/web-inspector/dist/shell/window/view.mjs 2.08 kB
packages/web-inspector/dist/styles/generated.cjs 13.7 kB
packages/web-inspector/dist/styles/generated.mjs 13.7 kB
packages/web-inspector/dist/ui/copy-button/copy-button.cjs 1.43 kB
packages/web-inspector/dist/ui/copy-button/copy-button.mjs 1.39 kB
packages/web-inspector/dist/ui/copy-button/copy-button.styles.cjs 869 B
packages/web-inspector/dist/ui/copy-button/copy-button.styles.mjs 864 B
packages/web-inspector/dist/ui/icons/icons.cjs 3.19 kB
packages/web-inspector/dist/ui/icons/icons.mjs 3.19 kB
packages/web-inspector/dist/ui/json-viewer/host-renderer.cjs 1.26 kB
packages/web-inspector/dist/ui/json-viewer/host-renderer.mjs 1.25 kB
packages/web-inspector/dist/ui/json-viewer/json-tokenizer.cjs 526 B
packages/web-inspector/dist/ui/json-viewer/json-tokenizer.mjs 524 B
packages/web-inspector/dist/ui/json-viewer/json-viewer.cjs 1.15 kB
packages/web-inspector/dist/ui/json-viewer/json-viewer.mjs 1.1 kB
packages/web-inspector/dist/ui/json-viewer/json-viewer.styles.cjs 775 B
packages/web-inspector/dist/ui/json-viewer/json-viewer.styles.mjs 768 B
packages/web-inspector/dist/ui/portable-lit-element.cjs 543 B
packages/web-inspector/dist/ui/portable-lit-element.mjs 539 B

compressed-size-action

AlemTuzlak and others added 2 commits November 3, 2026 19:47
…sion

CopilotChat keeps this layer's core submitter and attachment queue. The
lint fix's void wrappers now wrap the submitter: onSubmitInput and
handleSelectSuggestion return void, and dropFiles and uploadFiles void
the attachment handlers. useAttachments voids its paste handler, and
core's thread switch voids the detach it queues (detach catches its own
failure). The lint baseline only shrinks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AlemTuzlak
AlemTuzlak added this pull request to stack #8199 November 4, 2026 12:04
@AlemTuzlak
AlemTuzlak removed this pull request from stack #8199 November 4, 2026 12:04
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
…into core (#8181)

Merge this PR first. It is PR 1 of 10 in the "2.0 core pipeline" stack, with base `2.0.0`.

The chat primitives of React, Vue, and Angular now get their logic from `@copilotkit/core`. As a result, a bug in this logic has one fix, in core. This PR also corrects five bugs where the three frameworks did different things.

## What does this PR do?

These rules moved into core. The framework packages keep only the rendering and the lifecycle.

| Core file | What it holds now |
| --- | --- |
| `chat/message-feedback.ts` | The rating store, the "Learning feedback on" rule, and the comment popover rules (150 ms close delay) |
| `chat/viewport.ts` | `autoScroll` modes, the mobile media query, the keyboard height, and pin-to-send |
| `chat/license.ts` | License banner text, links, colors, and the 52 px bottom offset |
| `chat/message-display.ts` | Reasoning time label, work summary text, user message text and files, branch navigation, toolbar rule, and the "copied" timer |
| `chat/inspector-button.ts` | The "hide shortcuts" store, the kite icon as data, and the hover menu (180 ms close delay) |

Core also exports `ɵshallowEqualRecord` and `ɵcn` to the framework packages. All new exports use the `ɵ` prefix, because they are internal.

Bugs that this PR corrects:

- **Copy buttons:** Fast clicks made the check mark flicker in the React user message and both Angular buttons. A second copy now starts the 2 seconds again.
- **Angular toolbar:** The assistant toolbar showed while the latest message streamed. Now it is hidden, as in React and Vue.
- **License text:** React license warnings ignored custom labels, and the Vue inline warning had fixed text. Both now use the chat labels.
- **Stable refs:** React and Vue treated `{ a: undefined }` and `{ b: undefined }` as equal. Now they compare with `Object.is` and own keys.
- **Pin-to-send in React:** It now runs without `requestAnimationFrame` or `ResizeObserver`, as Vue did.

Angular also gets an optional `branchSwitchEnabled` input (default `true`) on the user message and its branch navigation.

The merge from `2.0.0` brought in the React StrictMode pin-to-send fix of #8159. This fix now lives in core `ɵpinMessageToTop`. The unpin function returns `false` when it cancelled a scroll that did not run. On `false`, React pins again. A new core test covers this ("reports whether the scroll ran before it was unpinned").

BREAKING CHANGE: In `@copilotkit/angular`, `copied` on `CopilotChatUserMessageCopyButton` and `CopilotChatAssistantMessageCopyButton` is a read-only signal. Calls to `copied.set()` and `copied.update()` do not type-check. Call `handleCopy()` on the button, or render your own button in the `copyButton` slot. The [v2-migration codemod](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-chat-primitives/codemods/v2-migration/scripts/angular-copy-buttons.ts) puts a TODO above each of these calls. The steps are in [Angular copy buttons](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-chat-primitives/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#angular-copy-buttons).

Behavior changes without a codemod are in the same page:

- [License warning text](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-chat-primitives/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#license-warning-text) (React and Vue)
- [Chat behavior in Vue and Angular](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-chat-primitives/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#chat-behavior-in-vue-and-angular): the Angular toolbar, and the Vue copy buttons without the Clipboard API

## Related PRs and Issues

- #8159 (the pin-to-send fix that this PR moves into core)

## Checklist

- [ ] I have read the [Contribution Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] If the PR changes or adds functionality, I have updated the relevant documentation
- [x] If the PR contains a breaking change, the title has `!` (for example `feat(react-core)!: ...`) and the description has a `BREAKING CHANGE:` line with migration steps. See [VERSIONING.md](https://github.com/CopilotKit/CopilotKit/blob/main/VERSIONING.md)
- [ ] "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

## Testing

**Commands run**

On the head `cb06e3f5cb` (after the merge from `2.0.0`):

- `pnpm nx run-many -t test -p @copilotkit/core @copilotkit/react-core @copilotkit/vue @copilotkit/angular`: core 1955, react-core 2487 (35 skipped), vue 1432, angular 690 tests pass.
- The first run had two failures from a stale local install: a stale `external-reexports` check and a Vue test that timed out at 5 s. After `pnpm install` and a core build, both pass.

Before the merge, on this branch:

- `pnpm nx run-many -t build,check-types -p @copilotkit/core @copilotkit/react-core @copilotkit/vue @copilotkit/angular`: pass.
- `pnpm nx run @copilotkit/v2-migration:test --skip-nx-cache`: 39 TypeScript and 14 TSX cases pass.
- `pnpm check:public-api-manifest`: current.
- `pnpm nx run @copilotkit/vue:lint`: 197 errors. `2.0.0` has the same 197 errors. None come from this PR.

**Manual test**

1. In an Angular chat, send a message. The assistant toolbar shows only after the reply stops streaming.
2. Click a copy button two times in 2 seconds. The check mark stays for 2 seconds after the second click.
3. In React, render `<CopilotChat labels={{ licenseFeatureUnlicensedText: "No license for {feature}" }} />` without a license. The warning shows your text.
4. Run the codemod on an Angular file with `copyButton.copied.set(true)`. A `TODO(copilotkit-2.0)` comment is above the call.

**How this PR makes testing easy**

- Each new core module has its own tests in `packages/core/src/chat/__tests__/` and `packages/core/src/utils/__tests__/`.
- Each behavior change has an adapter test, for example `CopilotChatCopyButtons.test.tsx`, `copy-buttons.spec.ts`, and `copilot-chat-assistant-message.component.spec.ts`.
- The codemod has three new cases in `codemods/v2-migration/tests/ts/angular-copy-buttons*`.

## Risk / rollback

The risk is medium. Many chat components in three frameworks changed at the same time. The tests above cover each moved rule. If this PR causes an error, revert it. Before that, revert the stack PRs that merged after it.

## Public API change

**Before**

```ts
this.copyButton().copied.set(true);
```

**After**

```ts
this.copyButton().handleCopy();
```

## Stack

Merge in this order. Each PR's base is the PR above it.

| # | PR | Area | Base |
|---|---|---|---|
| 1 | **#8181 (this PR)** | Chat primitives | `2.0.0` |
| 2 | #8173 | Provider config and runtime info | PR 1 |
| 3 | #8176 | Tool-call rendering | PR 2 |
| 4 | #8175 | A2UI, Open Generative UI, MCP Apps | PR 3 |
| 5 | #8174 | Agents, threads, chat configuration | PR 4 |
| 6 | #8179 | Chat sends, attachments, message view | PR 5 |
| 7 | #8178 | Chat input, recorder, DOM controllers | PR 6 |
| 8 | #8177 | Markdown renderer | PR 7 |
| 9 | #8182 | Suggestions, Inspector, learning | PR 8 |
| 10 | #8180 | Interrupts and human-in-the-loop | PR 9 |

**Stack verification.** After each merge, the stack builder ran these on this layer's head before pushing it, all with `--skip-nx-cache`: build, check-types and tests for core, react-core, vue and angular, plus the packages this layer touches; the codemod tests; oxlint; and `check:public-api-manifest`. On the top layer it also ran publint, attw, and the shell-docs tests and build. All passed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
  * Angular 2.0 migration guidance now covers copy-button changes, including read-only copied state and options for custom copy behavior.
* **Improvements**
  * License banners and inline warnings now use configured labels across React and Vue, with default labels when no provider is present.
  * Chat toolbars, branch navigation, copy feedback, Inspector menus, and work summaries now follow shared behavior across frameworks.
* **Documentation**
  * Updated the migration guide with Angular copy-button, license-warning, and chat-behavior notes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
…o core (#8173)

The CopilotKit providers in React, Vue, Angular, and React Native now get their config rules, prop sync, runtime info, and error handling from `@copilotkit/core`. Each framework kept its own copy of this logic, and the copies did not match. A fix in these areas now goes in one place in core.

This is PR 2 of 10 in the "2.0 core pipeline" stack. Its base is `alem/2.0-core-chat-primitives`. Merge it after PR 1.

## What does this PR do?

**Moved into core** (`packages/core/src/core/provider-config.ts`, `runtime-info.ts`, `core.ts`):

- `ɵresolveProviderConfig`: the key fallback (`publicApiKey ?? publicLicenseKey`), the Copilot Cloud URL, the transport from `useSingleEndpoint`, the agent merge, the `a2uiCatalogAvailable` property, the key header, and the missing-config check.
- `CopilotKitCore.ɵupdateConfig(patch)`: applies only the keys present, in a fixed order (message filter first).
- `CopilotKitCore.ɵruntimeInfo` + `ɵsubscribeToRuntimeInfo`: one frozen snapshot of every `/info` field, so an adapter cannot miss a field.
- `onError` config + `setErrorHandler`: without a handler, core logs `[CopilotKit] Error (code):`.
- `ɵCopilotKitProviderBaseOptions`: one copy of the shared option docs that React and Vue extend, and Angular and React Native pick from. Also `ɵSTABLE_ARRAY_WARNINGS` and `ɵtoolRendererShapeChanged`.

**Bugs fixed:**

- React and React Native never disposed their core. They now dispose it on unmount. The dispose waits one task, so the StrictMode remount keeps the same core, and a later remount (`<Activity>`) gets a new core.
- Vue and Angular fetched `/info` during server-side rendering. Vue now connects on mount, and Angular only in the browser.
- Angular could not clear `runtimeUrl`, and had no `runtimeTransport`, `debug`, `defaultThrottleMs`, or `onError` at startup. Now it has all of them.
- Vue logged an invalid `defaultThrottleMs` two times. Now core logs it once.
- Vue `CopilotChatConfigurationProvider` registered its open Thread again on every runtime status event.
- A React StrictMode remount pushed the provider tool lists over the tools that children registered.

## Breaking changes

BREAKING CHANGE: Angular `provideCopilotKit` with no `runtimeUrl`, `licenseKey`, `agents`, or `selfManagedAgents` now throws in production. Add a `runtimeUrl` to the config.

Behavior changes that apps can notice:

- Without `onError`, core, Vue, and Angular now log errors with `console.error`.
- The React and React Native providers dispose their core on unmount.
- Vue and Angular no longer send `/info` during server-side rendering.
- Angular `licenseKey` with no `runtimeUrl` connects to Copilot Cloud. Angular sends every key value, also keys that do not start with `ck_pub_`.
- Angular `updateRuntime({ runtimeUrl: undefined })` clears the URL. `agents` and `selfManagedAgents` each keep the last value of the other set.

Migration:

- Guide: [Providers in 2.0](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-provider-config/showcase/shell-docs/src/content/docs/migrate/providers-2.0.mdx), linked from the main 2.0 migration page.
- Codemod: the [v2 migration codemod](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-provider-config/codemods/v2-migration/scripts/codemod.ts) adds a `TODO(copilotkit-2.0)` comment to each `provideCopilotKit` call that it can read in full and that has no runtime config.

## Related PRs and Issues

- Base: `alem/2.0-core-chat-primitives` (PR 1 of the stack).
- Keeps the deferred connection from #5801 and the header rules from #1937 and #5635.

## Checklist

- [ ] I have read the [Contribution Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] If the PR changes or adds functionality, I have updated the relevant documentation
- [x] If the PR contains a breaking change, the title has `!` (for example `feat(react-core)!: ...`) and the description has a `BREAKING CHANGE:` line with migration steps. See [VERSIONING.md](https://github.com/CopilotKit/CopilotKit/blob/main/VERSIONING.md)
- [ ] "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

## Merge notes

- The merge of 2.0.0 into this branch kept both codemod transforms.
- In the React Native provider, this branch's version won over the reworded `debug` doc comment from 2.0.0. The core base type now documents that prop.

## Testing

**Commands run** (before the stack merge, on this layer alone):

- `pnpm nx run-many -t build,check-types,test,lint -p @copilotkit/core @copilotkit/react-core @copilotkit/vue @copilotkit/angular @copilotkit/react-native --parallel=1`: builds and type checks pass. Core 116 test files, React Native 27, and Angular 71 pass.
- These tests timed out under load in the full run and passed when run alone: the react-core chart tests, Vue `build-entries.test.ts`, and Angular `public-api-documentation.spec.ts`.
- Vue lint fails on the base too. It has 197 errors on the base and 194 on this branch, so this PR adds none.
- `pnpm nx run @copilotkit/v2-migration:test --skip-nx-cache`: 14 tsx and 40 ts cases pass.
- `npm test` in `showcase/shell-docs`: 91 files and 585 tests pass, with link integrity.
- `pnpm check:public-api-manifest`: current.
- Not run after the stack merge: the full suites on head `4ba047de80`.

**Manual test:**

1. In a React app, wrap the provider in `<StrictMode>`. Read the core with `useCopilotKit()`, then unmount the provider. The core is disposed after one task, and StrictMode does not dispose it.
2. In an Angular app, call `provideCopilotKit({})` in a production build. The app throws `Missing required prop: 'runtimeUrl' or 'publicApiKey' or 'publicLicenseKey'`. Add `runtimeUrl` to remove the error.
3. In a Vue app, render the provider on the server. No request goes to `/info` until the app mounts in the browser.

**How this PR makes testing easy:**

- Core unit tests: `provider-config.test.ts`, `runtime-info.test.ts`, `core-update-config.test.ts`.
- Adapter tests: `CopilotKitProvider.lifecycle.test.tsx` (React, StrictMode and `<Activity>`), `CopilotKitProvider.config.test.ts` (Vue), `copilotkit.provider-config.spec.ts` (Angular).
- Codemod fixtures: `codemods/v2-migration/tests/ts/angular-*`.

## Risk / rollback

- Risk: an app that keeps the React core after unmount, or an Angular app with no runtime config at startup, breaks. The guide and the codemod TODO cover both.
- Raw `CopilotKitCore` users now see logged errors when they set no handler.
- Rollback: revert this PR. Layers 3 to 10 of the stack build on it, so revert them first.

## Public API change

**Before** (Angular, 1.x)

```ts
provideCopilotKit({ licenseKey: "ck_pub_..." });
// later
copilotKit.updateRuntime({ runtimeUrl: "/api/copilotkit" });
```

**After**

```ts
provideCopilotKit({
  licenseKey: "ck_pub_...",
  runtimeUrl: "/api/copilotkit",
  onError: ({ code, error }) => console.warn(code, error),
});
```

## Stack

Merge in this order. Each PR's base is the PR above it.

| # | PR | Area | Base |
|---|---|---|---|
| 1 | #8181 | Chat primitives | `2.0.0` |
| 2 | **#8173 (this PR)** | Provider config and runtime info | PR 1 |
| 3 | #8176 | Tool-call rendering | PR 2 |
| 4 | #8175 | A2UI, Open Generative UI, MCP Apps | PR 3 |
| 5 | #8174 | Agents, threads, chat configuration | PR 4 |
| 6 | #8179 | Chat sends, attachments, message view | PR 5 |
| 7 | #8178 | Chat input, recorder, DOM controllers | PR 6 |
| 8 | #8177 | Markdown renderer | PR 7 |
| 9 | #8182 | Suggestions, Inspector, learning | PR 8 |
| 10 | #8180 | Interrupts and human-in-the-loop | PR 9 |

**Stack verification.** After each merge, the stack builder ran these on this layer's head before pushing it, all with `--skip-nx-cache`: build, check-types and tests for core, react-core, vue and angular, plus the packages this layer touches; the codemod tests; oxlint; and `check:public-api-manifest`. On the top layer it also ran publint, attw, and the shell-docs tests and build. All passed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
  * Provider configuration is more consistent across Angular, React, React Native, and Vue, with shared options for runtime settings, agents, and error handling.
  * Runtime and license information updates are synchronized across providers. Angular runtime updates can clear selected settings with `undefined`.
  * Errors use a configured handler when available; otherwise, they are logged.
  * Angular migration tooling flags missing runtime configuration with a TODO.

* **Bug Fixes**
  * Vue and Angular defer runtime information requests until browser startup.

* **Documentation**
  * Added a provider migration guide covering 2.0 configuration and behavior changes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
Merge this PR after PR 2. It is PR 3 of 10 in the "2.0 core pipeline" stack, with base `alem/2.0-core-provider-config`.

Tool-call rendering now follows one set of rules in `@copilotkit/core`. React, Vue, and Angular only connect those rules to their own reactivity, so a rendering bug is fixed in one place. This PR also fixes several bugs where the three frameworks disagreed. One of them: Angular showed tool-call status the wrong way round.

## What does this PR do?

**Moved into core:**

- **Renderer registry** (`ɵRendererRegistry`): prop and hook tool-call renderers by `agentId` and name, plus activity and custom message renderers. React, Vue, and Angular store their renderers in it.
- **Executing tool calls**: `CopilotKitCore.executingToolCallIds` and the `onExecutingToolCallsChanged` event. The React and Vue providers read it. Angular gets an `executingToolCallIds` signal.
- **Tool-call render props**: status, argument parsing, the result text, and the agent to look up renderers for. The props of the built-in card and the state of a tool-call group come from core too.
- **Activity and custom message renderers**: the renderer lookup, a reason when nothing can draw, one warning text, and the props of a custom message renderer.
- **Component tools**: the tool description that `useComponent` and `registerComponent` give the model.

**Bugs fixed:**

- **Angular status was inverted.** A call with no result was "in-progress" while the run went on and "executing" after it stopped. Now it is "executing" only while its handler runs.
- **Vue status lagged.** Vue removed executing ids one tick late, with `setTimeout`. Core now keeps a call executing until its result is in the messages. A human-in-the-loop `respond` also never shows before the handler waits for it.
- **Angular `<copilot-activity>` used no agent** when `agentId` was not set. It now uses the default agent, as React and Vue do.
- **Vue `useComponent` dropped `followUp`.** It now passes it on, as React and Angular do.
- **Renderer changes went unannounced.** React sent no event when activity or custom message renderers changed, and Vue sent none for activity renderers. Both now send one.

## Breaking changes

BREAKING CHANGE: In React, `copilotkit.renderToolCalls` and `copilotkit.renderActivityMessages` are read-only arrays. Code that changes them in place no longer type-checks. Give a new list to `setRenderToolCalls` or `setRenderActivityMessages` instead. See [Renderer lists](https://docs.copilotkit.ai/migrate/chat-2.0#renderer-lists).

BREAKING CHANGE: `CopilotChatLabels` has a new key, `toolCallStatusUnknownLabel`. A complete labels object no longer type-checks. Spread `CopilotChatDefaultLabels` and override only your keys. See [Label type](https://docs.copilotkit.ai/migrate/chat-2.0#label-type).

The codemod marks both cases with a `TODO(copilotkit-2.0)` comment. See [`chat-apis.ts`](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-tool-call-rendering/codemods/v2-migration/scripts/chat-apis.ts).

These behavior changes have guide entries and no codemod:

- **Angular:** for two renderers with the same name and `agentId`, the newer renderer is used. In 1.x, the first one was used. See [Chat behavior in Vue and Angular](https://docs.copilotkit.ai/migrate/chat-2.0#chat-behavior-in-vue-and-angular).
- **React and Vue:** malformed tool-call arguments read `{ _raw }` or `{ _value }`, not `{}`. This is the rule that Angular already tested. See [Tool-call rendering](https://docs.copilotkit.ai/migrate/chat-2.0#tool-call-rendering).
- **The built-in card:** its status and headings come from the labels, and a status it does not know shows "Unknown status".
- **All three frameworks:** they log the same activity warning text.

## Merge notes

- **Angular `copilotkit.ts`:** this PR adds the renderer registry and the executing tool-call ids on top of the runtime-info subscription from PR 2.
- **Codemod:** the stack merge kept the changes from both sides.
- **`chat-2.0.mdx`:** the Vue custom message renderer bullet replaces the earlier 2.0.0 sentence. That sentence said that the chat tries each renderer until one draws. Both React and Vue use the first renderer for the agent, then the first global one.

## Related PRs and Issues

- PR 2 of the stack: `alem/2.0-core-provider-config` (the base of this PR).

## Checklist

- [ ] I have read the [Contribution Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] If the PR changes or adds functionality, I have updated the relevant documentation
- [x] If the PR contains a breaking change, the title has `!` (for example `feat(react-core)!: ...`) and the description has a `BREAKING CHANGE:` line with migration steps. See [VERSIONING.md](https://github.com/CopilotKit/CopilotKit/blob/main/VERSIONING.md)
- [ ] "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

## Testing

**Commands run.** I ran these on this branch before the stack merge, at `12d04e3743`. I did not run them again after the merge of PR 2 (`2fde35e750`).

- `pnpm nx run-many -t build,test,lint,check-types -p @copilotkit/core @copilotkit/react-core @copilotkit/vue @copilotkit/angular`. Build and check-types passed for all four packages, and the Angular tests passed.
- The core, React and Vue test failures were timeouts while ten agents ran on the same machine. Each failing file passed when run on its own, except one Vue `build-entries.test.ts` case. That case times out a Vite build at 5 seconds. I did not run it on the base branch.
- `vue:lint` fails with 197 errors. None is on a line that this PR adds.
- `pnpm --filter @copilotkit/v2-migration test`: 16 tsx fixtures and 38 ts fixtures passed.
- `pnpm check:public-api-manifest`: the manifest is current.

**Manual test (the Angular status bug):**

1. Run `pnpm nx run @copilotkit/angular:test -- src/lib/render-tool-calls.spec.ts`. The new `status` cases pass: "in-progress" when the run stopped, "executing" while core runs the handler, "complete" with a result. On the base branch, a stopped run gave "executing".
2. Run `pnpm --filter @copilotkit/v2-migration test`. The `chat-labels-object` and `chat-renderer-lists` fixtures show the codemod TODOs.

**How this PR makes testing easy.** It adds core unit tests for each moved rule (`renderer-registry.test.ts`, `core-executing-tool-calls.test.ts`, `tool-call-render.test.ts`, and new cases in `renderers.test.ts` and `tool-call-layout.test.ts`). It also adds adapter tests for each behavior change and four codemod fixtures.

## Risk / rollback

The tool-call rendering of all three frameworks changes. The largest risk is the Angular status change, because a renderer that waited for "executing" after a run now stays at "in-progress". To undo, revert this PR. PRs 4 to 10 of the stack build on it, so revert them first.

## Public API change

**Before**

```ts
const { copilotkit } = useCopilotKit();
copilotkit.renderToolCalls.push(searchRenderer);

const labels: CopilotChatLabels = { chatInputPlaceholder: "Ask me anything..." /* every 1.x key */ };
```

**After**

```ts
const { copilotkit } = useCopilotKit();
copilotkit.setRenderToolCalls([...copilotkit.renderToolCalls, searchRenderer]);

const labels: CopilotChatLabels = {
  ...CopilotChatDefaultLabels,
  chatInputPlaceholder: "Ask me anything...",
};
```

New and additive: `CopilotKitCore.executingToolCallIds`, `onExecutingToolCallsChanged`, and the Angular `CopilotKit.executingToolCallIds` signal.

## Stack

Merge in this order. Each PR's base is the PR above it.

| # | PR | Area | Base |
|---|---|---|---|
| 1 | #8181 | Chat primitives | `2.0.0` |
| 2 | #8173 | Provider config and runtime info | PR 1 |
| 3 | **#8176 (this PR)** | Tool-call rendering | PR 2 |
| 4 | #8175 | A2UI, Open Generative UI, MCP Apps | PR 3 |
| 5 | #8174 | Agents, threads, chat configuration | PR 4 |
| 6 | #8179 | Chat sends, attachments, message view | PR 5 |
| 7 | #8178 | Chat input, recorder, DOM controllers | PR 6 |
| 8 | #8177 | Markdown renderer | PR 7 |
| 9 | #8182 | Suggestions, Inspector, learning | PR 8 |
| 10 | #8180 | Interrupts and human-in-the-loop | PR 9 |

**Stack verification.** After each merge, the stack builder ran these on this layer's head before pushing it, all with `--skip-nx-cache`: build, check-types and tests for core, react-core, vue and angular, plus the packages this layer touches; the codemod tests; oxlint; and `check:public-api-manifest`. On the top layer it also ran publint, attw, and the shell-docs tests and build. All passed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Base automatically changed from alem/2.0-core-agents-threads to 2.0.0 November 4, 2026 12:36
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
…o core (#8174)

Merge this after PR 4. It moves the agent, thread-list, chat configuration, threads drawer, and Inspector "view thread" logic from React, Vue, and Angular into `@copilotkit/core`. The three framework packages now only connect that core logic to their reactivity, so a logic fault is fixed in one place. It also fixes several drifts between the frameworks. The largest fix: data that an app writes to the stand-in agent before the runtime connects is now kept in React and Vue.

PR 5 of 10 in the "2.0 core pipeline" stack. Base: `alem/2.0-core-generative-ui` (PR 4).

## What does this PR do?

New core modules (internal `ɵ` exports):

- `core/agent-resolver.ts`: `ɵAgentResolver` (one per core) owns the binding checks, the agent ID fallback, the stand-in agent cache, the hand-off from the stand-in to the real agent, and thread-scoped proxy registration. `useAgent` (React, Vue) and `injectAgentStore` (Angular) use it.
- `threads-controller.ts`: `ɵThreadsController` owns thread projection, config errors, the gated `/threads` context dispatch, the store registry claim, and the mutation guard. `useThreads` (React, Vue) and `injectThreads` (Angular) use it.
- `chat/chat-configuration.ts`: `ɵChatConfigurationStore` owns thread, agent, modal, and drawer state across nested providers, and open-thread registration. The three chat configuration providers wrap it.
- `chat/threads-drawer.ts` and `inspector-thread-bridge.ts`: the drawer actions, element props, chat-input lookup, and `ɵInspectorThreadOverride`.
- `core/agent-helpers.ts` and `core/record-annotation.ts`: context value serialization, capability lookup, and the learn-from-user-action request (moved from React).

Faults and drifts this fixes:

- **Stand-in agent hand-off (React, Vue):** messages, state, and a run written to the stand-in during the `/info` request now move to the real agent. Same-ID consumers share one stand-in (Angular already did this).
- **Stand-in request settings (all):** the stand-in now gets the same credentials, message filter, debug, and Intelligence settings as a registered proxy. React keys header refresh on `ɵheadersGeneration` (#1937).
- **Vue `useAgent`:** returns `isReady`, re-renders on run start, and batches message updates like React.
- **Angular gaps closed:** chats apply the Inspector "view thread" request. `CopilotChatConfiguration` registers the open thread and warns when the thread is controlled. Agent context accepts JSON values.
- **Thread lists:** React and Vue no longer fetch `/threads` twice for the same context. Vue and Angular `startNewThread` hides config errors, like React.

## Breaking changes

BREAKING CHANGE: Angular `CopilotChatConfiguration` no longer has the protected `_setOverride(threadId, explicit)` method. In a subclass, call `this.setActiveThreadId(threadId, { explicit })` instead. To customize thread changes, override `setActiveThreadId` and `startNewThread`.

- Codemod: [`angular-chat-configuration.ts`](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-agents-threads/codemods/v2-migration/scripts/angular-chat-configuration.ts) rewrites the calls. It adds a `TODO(copilotkit-2.0)` comment to a subclass that overrides `_setOverride`.
- Migration guide: [Chat configuration](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-agents-threads/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#chat-configuration). Behavior-only changes are in the same page: [Agents before the runtime connects](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-agents-threads/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#agents-before-the-runtime-connects), [Agent context in Angular](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-agents-threads/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#agent-context-in-angular), [Thread lists](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-agents-threads/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#thread-lists).

Behavior changes an app can notice (guide only, no codemod):

- Vue chat configuration: a parent thread beats a nested non-explicit seed. Nested thread changes go to the top-most provider. A bare provider has `isModalOpen: true` and a `setModalOpen` function.
- React: the placeholder thread ID is made once per provider.
- Angular: `connectAgentContext` and the `copilotkitAgentContext` directive send a non-string value as JSON text.

## Merge notes

- Angular `injectCapabilities` keeps the default-agent fallback from 2.0.0 (`d3c6423f92`) on top of the core `ɵgetAgentCapabilities` version.
- The codemod passes are chained: generative UI first, then Angular chat configuration.
- `f7480aa80b` makes the threads controller and the agent resolver read `ɵruntimeInfo`. `6c501597fb` makes `chat-configuration.ts` use the shared `ɵMOBILE_MAX_WIDTH_QUERY`.
- `d107031158` moves one Vue render-count test baseline after the first render. The provider from the earlier layer now connects on mount, and that causes one extra render.

## Related PRs and Issues

- Stack: PR 5 of 10, "2.0 core pipeline". Base PR: `alem/2.0-core-generative-ui`.

## Checklist

- [ ] I have read the [Contribution Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] If the PR changes or adds functionality, I have updated the relevant documentation
- [x] If the PR contains a breaking change, the title has `!` (for example `feat(react-core)!: ...`) and the description has a `BREAKING CHANGE:` line with migration steps. See [VERSIONING.md](https://github.com/CopilotKit/CopilotKit/blob/main/VERSIONING.md)
- [ ] "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

## Testing

Commands run on this layer before the merge of PR 4:

- `nx run-many -t check-types` for core, react-core, vue, angular: pass.
- `nx run @copilotkit/react-core:test`: 2477 passed, 35 skipped. `nx run @copilotkit/vue:test`: 1439 passed. Core and Angular tests: pass.
- Codemod `pnpm test`: 53 fixtures pass, 3 of them new. `kiira check` on `chat-2.0.mdx`: 7 snippets pass. `pnpm check:public-api-manifest`: current.
- Not run by me after the merge of PR 4 and the three follow-up commits. CI is the check for those.

Manual test:

1. Start a React or Vue app with a runtime URL. Call `useAgent()` and add a message to the agent before the runtime connects.
2. When `isReady` becomes `true`, confirm that the message is on the real agent. Before this PR, React and Vue lost it.
3. In an Angular app, open the Inspector and pick "View in app" on a thread. Confirm that the chat loads that thread.

How this PR makes testing easy: new core unit tests for each module (`agent-resolver.test.ts`, `threads-controller.test.ts`, `chat-configuration.test.ts`, `threads-drawer.test.ts`, `inspector-thread-override.test.ts`, `agent-helpers.test.ts`), new adapter tests for each behavior change, and three codemod fixtures under `codemods/v2-migration/tests/ts/angular-chat-configuration*`.

## Risk / rollback

Risk is medium. The three frameworks now share one implementation of agent resolution, thread lists, and chat configuration, so a core fault shows in all three. The stand-in hand-off bridges stay subscribed for the life of the core and copy each registered-agent update into the stand-in. To undo, revert this PR. Later layers of the stack build on it.

## Public API change

**Before** (Angular subclass)

```ts
export class RoutedChatConfiguration extends CopilotChatConfiguration {
  openFromRoute(threadId: string) {
    this._setOverride(threadId, true);
  }
}
```

**After**

```ts
export class RoutedChatConfiguration extends CopilotChatConfiguration {
  openFromRoute(threadId: string) {
    this.setActiveThreadId(threadId, { explicit: true });
  }
}
```

### Angular bundle fix (added after the PR opened)

Commit `56ba9982d9` (`perf(angular)`) fixes a CI failure on this layer, "Build canonical Angular browser artifact". Angular's chat configuration imported the core store from the core index, and it also injected `CopilotKit`. That pulled all of core, AG-UI and zod into the showcase's initial bundle, which was 2,711,682 raw bytes against a 1,633,493 cap. Initial-path Angular modules must not import core at runtime (see `config.ts`, #1937).

- New public subpath `@copilotkit/core/chat-configuration`. It exports only `ɵChatConfigurationStore`, and the manifest lists it.
- Angular `chat-configuration.ts` imports the store from that subpath. It hands the store to a small root service, `ɵOpenThreadBindings`, and does not inject `CopilotKit`. `CopilotKit` connects its core to that service when it is created.
- Behavior: a chat configuration created before `CopilotKit` now registers its thread when `CopilotKit` is created, not straight away. A new test covers this order.
- Result: the initial bundle is 1,503,074 raw bytes. All Angular tests and the type check pass.

## Stack

Merge in this order. Each PR's base is the PR above it.

| # | PR | Area | Base |
|---|---|---|---|
| 1 | #8181 | Chat primitives | `2.0.0` |
| 2 | #8173 | Provider config and runtime info | PR 1 |
| 3 | #8176 | Tool-call rendering | PR 2 |
| 4 | #8175 | A2UI, Open Generative UI, MCP Apps | PR 3 |
| 5 | **#8174 (this PR)** | Agents, threads, chat configuration | PR 4 |
| 6 | #8179 | Chat sends, attachments, message view | PR 5 |
| 7 | #8178 | Chat input, recorder, DOM controllers | PR 6 |
| 8 | #8177 | Markdown renderer | PR 7 |
| 9 | #8182 | Suggestions, Inspector, learning | PR 8 |
| 10 | #8180 | Interrupts and human-in-the-loop | PR 9 |

**Stack verification.** After each merge, the stack builder ran these on this layer's head before pushing it, all with `--skip-nx-cache`: build, check-types and tests for core, react-core, vue and angular, plus the packages this layer touches; the codemod tests; oxlint; and `check:public-api-manifest`. On the top layer it also ran publint, attw, and the shell-docs tests and build. All passed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
  * Added Angular migration support for chat configuration overrides, including guidance for custom overrides.
  * Agent context values can now be supplied as JSON-compatible values and are serialized consistently across frameworks.
  * Vue’s agent hook now exposes whether the resolved agent is ready.
  * Inspector thread-view requests can select a chat thread and report connection failures.
* **Improvements**
  * Chat configuration, agent resolution, thread lists, and thread-drawer actions now share behavior across frameworks.
  * Thread-list configuration errors and unsupported mutations are handled consistently.
* **Documentation**
  * Expanded the 2.0 migration guide with framework-specific behavior and migration details.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@AlemTuzlak
AlemTuzlak merged commit cc75ad7 into 2.0.0 Nov 4, 2026
53 of 75 checks passed
@AlemTuzlak
AlemTuzlak deleted the alem/2.0-core-chat-session branch November 4, 2026 12:36
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
…ntrollers into core (#8178)

Merge this after PR 6. It moves the chat input, the audio recorder, and the DOM work of the sidebar, popup, lightbox, attachment previews, and scroll-to-bottom from React, Vue, and Angular into `@copilotkit/core`. The three framework packages now only connect that core logic to their own reactivity, so a fault in this logic is fixed in one place. It also fixes several drifts between the frameworks.

PR 7 of 10 in the "2.0 core pipeline" stack. Base: `alem/2.0-core-chat-session` (PR 6).

## What does this PR do?

New core code (internal `ɵ` exports):

- **Slash-command menu** (`chat/composer.ts`): flatten, rank, query parsing, highlight, and key handling. React and Vue use it.
- **Chat input auto-grow and layout** (`chat/composer-layout.ts`): `ɵcreateComposerAutosize` measures the text box, caps it at `maxRows` (default 5), picks the compact or expanded layout, and watches the elements with one `ResizeObserver`. All three use it.
- **Audio recorder** (`chat/audio-recorder.ts`): `ɵAudioRecorder` and `ɵcreateWaveformRenderer`. All three use it. `AudioRecorderError` is now one class in all packages.
- **DOM controllers** (`chat/dom.ts`): docked sidebar margins, popup dismiss, the lightbox morph and focus trap, document preview URLs, and the scroll-to-bottom check.

Bugs fixed:

- Angular: padding that the browser did not report made the text box max-height `NaN`.
- Angular: the text box measured its max-height only once, so a later `inputMaxRows` was ignored.
- Vue: on a phone, each keystroke emptied the text box to measure it. This moved the caret to the end.
- React and Vue: a second `start()` during the microphone prompt opened a second stream.
- React: the docked sidebar set the page margins to `""` and lost the margins that the page had.
- Vue: a pointer down in a chat popover closed the popup.
- React: the attachment preview had no dialog role, no focus trap, and no focus return.
- React and Vue: text previews decoded base64 as Latin-1, so text outside ASCII showed incorrectly.

The full list of behavior changes per framework is in the commit messages.

### Breaking changes

BREAKING CHANGE: Angular `CopilotChatTextarea` has no `ngAfterViewInit()` method. It measures its height after each render.

1. Run the v2 codemod. In a subclass of `CopilotChatTextarea`, it deletes `super.ngAfterViewInit()` and removes `override` from `ngAfterViewInit`. See [the codemod transform](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-composer-dom/codemods/v2-migration/scripts/deprecated-apis.ts) and [its fixture](https://github.com/CopilotKit/CopilotKit/tree/alem/2.0-core-composer-dom/codemods/v2-migration/tests/ts/angular-textarea-lifecycle).
2. Read [Chat UI in 2.0](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-composer-dom/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx) for the behavior changes. The new sections:
   - "Angular text box"
   - "Audio recorder": a second `start()` rejects, and the Angular `error` output emits every failure.
   - "Docked sidebar": one owner, margins come back, the 767px breakpoint, and Vue server rendering.
   - "Slash commands in React", "Attachment previews", and "Scroll to bottom in Angular" (12px, was 10px).

## Related PRs and Issues

- Stack: PR 7 of 10, "2.0 core pipeline". Base: `alem/2.0-core-chat-session` (PR 6). Merge after PR 6.

## Checklist

- [ ] I have read the [Contribution Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] If the PR changes or adds functionality, I have updated the relevant documentation
- [x] If the PR contains a breaking change, the title has `!` (for example `feat(react-core)!: ...`) and the description has a `BREAKING CHANGE:` line with migration steps. See [VERSIONING.md](https://github.com/CopilotKit/CopilotKit/blob/main/VERSIONING.md)
- [ ] "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

## Merge notes

- `chat-2.0.mdx` was rebuilt when PR 6 was merged into this branch. The sections of this layer are appended at the end of the page.
- Commit `97870c944e` makes `composer-layout.ts`, `dom.ts`, and the Angular sidebar use `ɵMOBILE_MAX_WIDTH_QUERY` from the chat-primitives layer. No `(max-width: 767px)` string remains in TypeScript source, except the definition of that constant.
- `packages/core` gets `jsdom` as a dev dependency for its DOM tests. The lockfile change is only that dependency.

## Testing

Commands run:

- On this layer before the merge of PR 6: `pnpm nx run-many -t build,test,lint,check-types` for core, react-core, vue, and angular. Build and check-types passed. Core tests passed (1942). The other failures were:
  - 3 recharts Chart tests in react-core. They also fail without this layer.
  - Timeouts on a loaded machine. They passed when I ran them again with a longer timeout.
  - `vue:lint`, with 197 errors that were already on the base.
- On head `97870c944e`, after the merge of PR 6: `pnpm nx run-many -t check-types` for the same four projects passed. The core chat tests passed (577).
- Codemod: `pnpm --filter @copilotkit/v2-migration test` passed, with the new fixture. `check-types` passed.
- Docs: `pnpm kiira check` on `chat-2.0.mdx` passed. `pnpm check:public-api-manifest` reports the manifest is current.

Not run after the merge of PR 6: the full test suites of react-core, vue, and angular. CI is the check for those.

Manual test:

1. Open a chat with a sidebar, type a long line, then a line break. The text box grows to 5 rows, then scrolls. The buttons move below it.
2. On a narrow window (767px or less), the text box sits above the buttons.
3. Open the docked sidebar, then close it. The page margin comes back to what it was before.
4. In React, open an image attachment. Focus moves to the close button, Tab stays inside, and Escape returns focus to the thumbnail.
5. Start a voice recording, then stop it. The waveform moves, and the recording is transcribed.

How this PR makes testing easy:

- New core tests: `composer-slash`, `composer-layout`, `audio-recorder`, `dom` (jsdom).
- New adapter tests for each behavior change. For example `Lightbox.test.tsx`, `copilot-chat-audio-recorder.spec.ts`, `stick-to-bottom.spec.ts`, and the sidebar margin tests.
- The codemod fixture `tests/ts/angular-textarea-lifecycle`.

## Risk / rollback

Risk is medium. The three frameworks now share one chat input, one recorder, and one set of DOM controllers, so a core fault shows in all three. The most visible change is the docked sidebar: only one docked sidebar adds a page margin, and the margin now follows viewport changes. To undo, revert this PR. Later layers of the stack build on it.

## Public API change

**Before**

```ts
@component({ selector: "textarea[appTextarea]", template: "" })
export class AppTextarea extends CopilotChatTextarea {
  override ngAfterViewInit(): void {
    super.ngAfterViewInit();
  }
}
```

**After**

```ts
@component({ selector: "textarea[appTextarea]", template: "" })
export class AppTextarea extends CopilotChatTextarea {}
```

## Stack

Merge in this order. Each PR's base is the PR above it.

| # | PR | Area | Base |
|---|---|---|---|
| 1 | #8181 | Chat primitives | `2.0.0` |
| 2 | #8173 | Provider config and runtime info | PR 1 |
| 3 | #8176 | Tool-call rendering | PR 2 |
| 4 | #8175 | A2UI, Open Generative UI, MCP Apps | PR 3 |
| 5 | #8174 | Agents, threads, chat configuration | PR 4 |
| 6 | #8179 | Chat sends, attachments, message view | PR 5 |
| 7 | **#8178 (this PR)** | Chat input, recorder, DOM controllers | PR 6 |
| 8 | #8177 | Markdown renderer | PR 7 |
| 9 | #8182 | Suggestions, Inspector, learning | PR 8 |
| 10 | #8180 | Interrupts and human-in-the-loop | PR 9 |

**Stack verification.** After each merge, the stack builder ran these on this layer's head before pushing it, all with `--skip-nx-cache`: build, check-types and tests for core, react-core, vue and angular, plus the packages this layer touches; the codemod tests; oxlint; and `check:public-api-manifest`. On the top layer it also ran publint, attw, and the shell-docs tests and build. All passed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
  * Improved chat input autosizing and slash-command menus across Angular, React, and Vue, including support for commands that load after text is entered.
  * Added accessible lightbox dialogs with focus management and clearer labels for attachment previews.
  * Improved audio recording, waveform display, attachment previews, and docked sidebar behavior across frameworks.
* **Bug Fixes**
  * Prevented typed text from being cleared on phone-sized screens and kept popovers from dismissing the chat popup.
  * Sidebar margins are restored when the sidebar closes or is removed. Scrolling now treats distances up to 12px as at the bottom.
* **Documentation**
  * Expanded the chat 2.0 migration guide with framework-specific migration details.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
…shared engine (#8177)

React, Vue, and Angular now render assistant markdown with one engine from `@copilotkit/markdown`. Markup and URL sanitization live in one file, so a fix there reaches all three frameworks. Angular drops `marked` and DOMPurify and keeps KaTeX math.

This is PR 8 of 10 in the "2.0 core pipeline" stack. Base: `alem/2.0-core-composer-dom`. Merge it after PR 7.

## What does this PR do?

**What moved where**

- `packages/markdown/src/render/` is new and has no framework code. `render-tree.ts` decides the elements, sanitized attributes, click actions, text segments for the fade-in, and the caret position. `parser-session.ts` parses only the appended text (this logic was inside the React hook).
- The React and Vue renderers now only map that tree to elements and VNodes.
- New subpath **`@copilotkit/markdown/dom`**: `createStreamingMarkdownDomRenderer(container)`. It patches the DOM by key, so text on screen keeps its nodes and does not fade in again. It creates nodes through `container.ownerDocument`, so it works on server DOMs.
- Angular `components/chat/markdown.ts` uses the DOM renderer. `marked` and `dompurify` are removed from `@copilotkit/angular`.
- The parser gets GFM task lists (`listItem.checked`) and an opt-in `enableMath` option for `math` nodes. Angular turns math on and typesets it with `katex.render()`, which builds DOM nodes, so no HTML string is parsed.

**Bugs fixed**

- Vue never showed the streaming caret. The boolean prop became `false`, so `caret ?? isStreaming` never fell back.
- Vue did not pass `onLinkClick` / `onCitationClick` to the renderer.
- Vue rendered an empty root for empty content. React rendered nothing. Both render nothing now.
- Vue re-parsed the whole message on every update. It now parses only the new text.
- Angular had no caret and no fade-in, and its parser and sanitizer were different from React and Vue.

**Breaking changes**

BREAKING CHANGE: the `@copilotkit/markdown` AST node types include `math`, and a task-list item has `checked` with no `[ ]` / `[x]` marker in its text. Exhaustive switches on `node.type` and maps keyed by every node type stop type-checking. The codemod marks these imports with a `TODO(copilotkit-2.0)` comment ([codemod](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-markdown-dom-renderer/codemods/v2-migration/scripts/codemod.ts), [fixtures](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-markdown-dom-renderer/codemods/v2-migration/tests/ts/markdown-ast)).

These changes are behavior only, so no codemod applies. The steps are in the migrate section ["Rendering changes in 2.0"](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-markdown-dom-renderer/showcase/shell-docs/src/content/snippets/shared/migration-guides/migrate-markdown-renderer.mdx), on the `/migrate/markdown-renderer` page:

- **Angular:** raw HTML in model output shows as text. A single newline is a soft break, not `<br>`. The table header is in `<tbody>`, and links open in a new tab.
- **Angular:** `marked` and `dompurify` are no longer installed. Apps that import them must add them.
- **React and Vue:** task-list items render as disabled checkboxes.
- **Vue:** strikethrough is `<s>`, not `<del>`. The caret shows while the latest message streams. The renderer adds a `<style>` element next to its root.

**Merge notes**

Merging layer 7 into this branch conflicted only in the codemod `README.md` and `agents/skill/v2-migration/references/mappings.md`. Both sides were kept. My web-inspector change moved with its file to `packages/web-inspector/src/domains/announcements/markdown.ts`.

## Related PRs and Issues

- PR 7 of the stack: `alem/2.0-core-composer-dom` (base of this PR)

## Checklist

- [ ] I have read the [Contribution Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] If the PR changes or adds functionality, I have updated the relevant documentation
- [x] If the PR contains a breaking change, the title has `!` (for example `feat(react-core)!: ...`) and the description has a `BREAKING CHANGE:` line with migration steps. See [VERSIONING.md](https://github.com/CopilotKit/CopilotKit/blob/main/VERSIONING.md)
- [ ] "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

## Testing

**Commands run**

- On the merged head `2e1ffc0f95`: `nx run-many -t test -p @copilotkit/markdown @copilotkit/v2-migration` passes (215 tests, 73 codemod fixtures). The web-inspector announcements tests pass (93).
- Before the layer 7 merge: build, check-types, publint, and attw pass for markdown, core, react-core, vue, angular, and web-inspector. Tests pass for all of them except react-core.
- react-core has 3 failures in chart tests (`chart.test`, `chart-scatter.test`, `data.test`). They failed the same way on the old base. `2.0.0` has since fixed them, and they pass on the stacked heads.
- `@copilotkit/vue:lint` reports 197 errors, all in files this PR does not touch.
- `pnpm check:public-api-manifest` passes. kiira type-checks the changed doc pages (8 of 8 snippets).
- I did not run the full suite again after the layer 7 merge.

**Manual test**

1. Start the Angular demo and send a message with `**bold**`, a task list, and `$x^2$`.
2. While the reply streams, see the caret and the fade-in. After it finishes, see the checkbox and the typeset math.
3. In the Vue demo, send a long reply. Before this PR, no caret showed. Now the caret shows until the reply finishes.

**How this PR makes testing easy**

- Unit tests for the render tree, parser session, DOM renderer, and parser additions in `packages/markdown/src`.
- Parity tests for the Vue renderer and the Vue default renderer. The Angular renderer spec covers caret, empty content, and rendering without a global `document`.
- Codemod fixtures in `codemods/v2-migration/tests/{ts,tsx}/markdown-ast*`.

## Risk / rollback

Medium risk for Angular, because its markdown markup changed (see the breaking changes above). React output is the same except for task lists and the default code block (data attributes, and the caret while it streams). To undo, revert this PR. Layers 9 and 10 build on it, so revert them first.

## Public API change

**Before**

```ts
import type { StreamingMarkdownAstNode } from "@copilotkit/markdown";

function label(node: StreamingMarkdownAstNode) {
  if (node.type === "list-item") return "item"; // task state only in the text: "[x] done"
  return node.type;
}
```

**After**

```ts
import type { StreamingMarkdownAstNode } from "@copilotkit/markdown";
import { createStreamingMarkdownDomRenderer } from "@copilotkit/markdown/dom";

function label(node: StreamingMarkdownAstNode) {
  if (node.type === "math") return node.display ? "display math" : "inline math";
  if (node.type === "list-item") return node.checked === undefined ? "item" : "task";
  return node.type;
}

const renderer = createStreamingMarkdownDomRenderer(element);
renderer.render({ content: "**Hi**", caret: true });
```

## Stack

Merge in this order. Each PR's base is the PR above it.

| # | PR | Area | Base |
|---|---|---|---|
| 1 | #8181 | Chat primitives | `2.0.0` |
| 2 | #8173 | Provider config and runtime info | PR 1 |
| 3 | #8176 | Tool-call rendering | PR 2 |
| 4 | #8175 | A2UI, Open Generative UI, MCP Apps | PR 3 |
| 5 | #8174 | Agents, threads, chat configuration | PR 4 |
| 6 | #8179 | Chat sends, attachments, message view | PR 5 |
| 7 | #8178 | Chat input, recorder, DOM controllers | PR 6 |
| 8 | **#8177 (this PR)** | Markdown renderer | PR 7 |
| 9 | #8182 | Suggestions, Inspector, learning | PR 8 |
| 10 | #8180 | Interrupts and human-in-the-loop | PR 9 |

**Stack verification.** After each merge, the stack builder ran these on this layer's head before pushing it, all with `--skip-nx-cache`: build, check-types and tests for core, react-core, vue and angular, plus the packages this layer touches; the codemod tests; oxlint; and `check:public-api-manifest`. On the top layer it also ran publint, attw, and the shell-docs tests and build. All passed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
  * Added a framework-independent DOM renderer for streaming Markdown, with support for custom rendering, link and citation callbacks, and optional math rendering.
  * Markdown parsing now supports math when enabled and checked or unchecked task-list items.
  * React, Vue, and Angular assistant messages now share consistent streaming Markdown behavior, including caret display and task-list rendering.

* **Improvements**
  * Raw HTML is displayed as text, and unsafe links and image URLs are filtered.
  * Added migration guidance and automated TODO comments for code that reads Markdown AST types.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
…to-start into core (#8182)

React, Vue, and Angular now get suggestions, Inspector mounting, and the `learning` auto-start from `@copilotkit/core` and `@copilotkit/web-inspector`. A fix in that logic is now one change, not three. Vue and Angular get the Inspector rules that React had, and Angular gets `configureSuggestions` and a `learning` option.

This is PR 9 of 10 in the "2.0 core pipeline" stack. Base: `alem/2.0-markdown-dom-renderer`. Merge it after PR 8.

## What does this PR do?

**What moved where**

- **Suggestions:** `ɵbindSuggestionsConfig` (core) owns config dedupe, the target agent, global and targeted reloads, a retry for agents that were running, and the wait for a dynamic config's agent. `ɵsubscribeToAgentSuggestions` keeps a view's list and loading flag current. `useConfigureSuggestions` and `useSuggestions` in React and Vue now only call these.
- **Inspector visibility:** `shouldEnableInspector` (`@copilotkit/shared`) takes an optional `hostname` and allows only `localhost`, `127.0.0.1`, and `[::1]`.
- **Inspector mounting:** `ɵmountInspector` (`@copilotkit/web-inspector/mount`) loads the element, sets the core before it connects, replays an early open request, reports visibility, and removes the element. The adapters keep only the host element.
- **Learning:** `ɵLearningAutoStarter` (core) owns the generated Trajectory ID, start and stop, the warnings, and the guard for a late start failure. The React and Vue providers only call `update()` and `dispose()`.

**Bugs fixed**

- Vue and Angular mounted the Inspector on any development host. They now use React's loopback rule.
- Vue and Angular showed the message "Inspect" action while the Inspector was hidden.
- Angular dropped an open request made before the Inspector loaded.
- Vue `<CopilotKitInspector>` now gives event listeners, such as `@cpk-inspector-visibility-change`, to the `cpk-web-inspector` element.
- React `useConfigureSuggestions` ignored the provider `agentId`. Vue did not load a global config while the agent list was empty, and did not wait for a dynamic config's agent.

**New subpath:** `@copilotkit/web-inspector/mount`. It has no runtime import of the Inspector bundle, so the Inspector stays a lazy chunk. The public API manifest has the new entry.

**Breaking changes**

BREAKING CHANGE: the changes below are behavior only, so no codemod applies. The steps are in the migrate page `/migrate/chat-2.0`:

- [Inspector in Vue and Angular](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-suggestions-inspector-learning/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#inspector-in-vue-and-angular): the Inspector mounts only on loopback hosts, even with `enableInspector: true`. The message "Inspect" action shows only while the Inspector is visible. Vue `<CopilotKitInspector>` does not give object values (for example `:style="{ ... }"`) to the element.
- [Suggestions](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-suggestions-inspector-learning/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#suggestions): in React, a global config outside a chat loads for the provider `agentId`, not `"default"`. Agents skipped while running reload when the run ends. A `deps` change no longer reloads a second time on mount.

**Merge notes**

- The web-inspector architecture test on `2.0.0` rejected a top-level `src/mount.ts`. A `fix(web-inspector)` commit moved it to `src/shell/mount.ts`. It still builds to `dist/mount.*`, so the `./mount` export is unchanged.
- `ɵLearningProp` was removed in favor of D's identical `ɵCopilotKitLearningOptions`.
- A's Angular toolbar test now stubs a visible Inspector, because the shortcut only shows while the Inspector is visible.

## Related PRs and Issues

- PR 8 of the stack: #8177 (`alem/2.0-markdown-dom-renderer`, base of this PR)

## Checklist

- [ ] I have read the [Contribution Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] If the PR changes or adds functionality, I have updated the relevant documentation
- [x] If the PR contains a breaking change, the title has `!` (for example `feat(react-core)!: ...`) and the description has a `BREAKING CHANGE:` line with migration steps. See [VERSIONING.md](https://github.com/CopilotKit/CopilotKit/blob/main/VERSIONING.md)
- [ ] "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

## Testing

**Commands run**

- Before the layer 8 merge: `nx run-many -t build,check-types,test,publint,attw` passed for core, react-core, vue, angular, shared, and web-inspector, except for the items below.
- react-core chart tests (`chart.test`, `chart-scatter.test`, `data.test`) and the Vue `build-entries` test failed under full-suite load. They pass when run alone, on this branch and on the base commit.
- `@copilotkit/vue:lint` fails with the same errors on the base commit, in files this PR does not touch.
- `pnpm check:public-api-manifest` passes. `pnpm --filter @copilotkit/v2-migration test` passes (36 of 36).
- On the merged head `89939875ea`: the Angular `inspector.spec.ts` passed 5 of 5 times with `--skip-nx-cache`. It also passed 5 of 5 on a clean `origin/2.0.0`. I did not run the full suites again after the layer 8 merge.

**Manual test**

1. Start the Vue or Angular demo and open it at `http://localhost:<port>`. The Inspector button shows.
2. Open the same app at your LAN address (for example `http://192.168.1.20:<port>`). Before this PR, the Inspector mounted. Now it does not.
3. On `localhost`, hide the Inspector. The "Inspect" action on assistant messages is hidden too.
4. In React, put `useConfigureSuggestions` with static suggestions outside a chat, under `<CopilotKitProvider agentId="support">`. The suggestions show for the `support` agent.

**How this PR makes testing easy**

- Core unit tests: `packages/core/src/core/__tests__/suggestions-binding.test.ts` and `learning-autostart.test.ts`.
- `packages/web-inspector/src/__tests__/mount.spec.ts` and the `shouldEnableInspector` hostname tests in `packages/shared`.
- Adapter tests for each behavior change: Vue `CopilotKitInspector.test.ts` and `CopilotKitProvider.test.ts`, and Angular `inspector.spec.ts`, `configure-suggestions.spec.ts`, and `learning.spec.ts`.

## Risk / rollback

Medium risk for the Inspector in Vue and Angular: developers who open the app on a LAN address or a tunnel no longer see it. Suggestions and learning keep the same public options. To undo, revert this PR. Layer 10 builds on it, so revert layer 10 first.

## Public API change

Angular gets the suggestions and learning options that React and Vue have.

**Before**

```ts
const copilotKit = inject(CopilotKit);
const id = copilotKit.addSuggestionsConfig({ instructions: "Suggest next steps" });
copilotKit.reloadSuggestions("default");
inject(DestroyRef).onDestroy(() => copilotKit.removeSuggestionsConfig(id));
```

**After**

```ts
provideCopilotKit({ runtimeUrl: "/api/copilotkit", learning: true });

readonly suggestions = inject(CopilotKit).configureSuggestions(() => ({
  instructions: `Suggest next steps about ${this.topic()}`,
  available: "always",
}));
```

## Stack

Merge in this order. Each PR's base is the PR above it.

| # | PR | Area | Base |
|---|---|---|---|
| 1 | #8181 | Chat primitives | `2.0.0` |
| 2 | #8173 | Provider config and runtime info | PR 1 |
| 3 | #8176 | Tool-call rendering | PR 2 |
| 4 | #8175 | A2UI, Open Generative UI, MCP Apps | PR 3 |
| 5 | #8174 | Agents, threads, chat configuration | PR 4 |
| 6 | #8179 | Chat sends, attachments, message view | PR 5 |
| 7 | #8178 | Chat input, recorder, DOM controllers | PR 6 |
| 8 | #8177 | Markdown renderer | PR 7 |
| 9 | **#8182 (this PR)** | Suggestions, Inspector, learning | PR 8 |
| 10 | #8180 | Interrupts and human-in-the-loop | PR 9 |

**Stack verification.** After each merge, the stack builder ran these on this layer's head before pushing it, all with `--skip-nx-cache`: build, check-types and tests for core, react-core, vue and angular, plus the packages this layer touches; the codemod tests; oxlint; and `check:public-api-manifest`. On the top layer it also ran publint, attw, and the shell-docs tests and build. All passed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
  * Added a learning option for Angular that can automatically start and manage trajectory capture.
  * Added Angular support for configuring suggestions, including reactive updates and lifecycle cleanup.
  * Added a shared Inspector mounting experience across Angular, React, and Vue, with visibility-aware actions and queued open requests.
  * Inspector display is limited to development on loopback hosts; explicit enablement does not override this restriction.
* **Documentation**
  * Expanded the migration guide with Inspector and suggestions behavior across frameworks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
AlemTuzlak added a commit that referenced this pull request Nov 4, 2026
Interrupts and human-in-the-loop (HITL) now run in `@copilotkit/core`. React, Vue, and Angular only project core state and render it. This also fixes four bugs that were in one or two of the three copies.

This is PR 10 of 10 in the "2.0 core pipeline" stack. Base: `alem/2.0-core-suggestions-inspector-learning`. Merge it last.

## What does this PR do?

Moved into core:

- **`ɵInterruptController`** (`core/interrupt-controller.ts`): collects legacy and standard interrupts per run, runs `enabled` and `handler`, records answers in `ɵInterruptState`, adds tool results, and starts one resume run. `useInterrupt` (React, Vue) and `InterruptController` / `injectInterrupt` (Angular) project its snapshot.
- **A generic interrupt slot** on `CopilotKitCore` (`ɵsetInterruptPayload`). React `setInterruptElement` and Vue `setInterruptState` store their value in it. Their names and events do not change.
- **`ɵHumanInTheLoopRegistry`** (`core/human-in-the-loop.ts`, on `core.ɵhumanInTheLoop`): each HITL call waits by tool call id until `respond`. `ɵbuildHumanInTheLoopTool` and `ɵhitlRenderProps` build the tool and the render props for all three frameworks.
- **Pending HITL calls in the run handler**: when no registration of a tool is left, its waiting calls fail with `Human-in-the-loop interaction aborted`.

Bugs fixed:

- **Angular `"*"` HITL tools hung.** The handler waited for the name `"*"`, but `respond` sent the called tool name.
- **Parallel HITL calls in React and Vue.** One resolver per hook let a second call replace the first, so the first call never finished.
- **Vue interrupt state.** Vue did not use the shared interrupt state. It did not add tool results, use saved frontend results, show pending interrupts after a reload, or catch a throw from `enabled` or `handler`.
- **Waits after unmount.** When a HITL component unmounted with no answer, the run never ended. The Vue chat waits for that run, so the next message stayed queued. Now core rejects the wait and the run ends.

### Breaking behavior changes

The exports and types do not change. Some behavior changes. Each item has a section in the migration guide:

- **HITL calls end on abort:** a call fails with `Human-in-the-loop interaction aborted` when the provider unmounts, when you call `dispose()` on the core, or when its tool is unregistered and no other component registers it. See [Human-in-the-loop tools](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-interrupts-hitl/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#human-in-the-loop-tools).
- **Interrupts in React and Vue:** a `RUN_ERROR` event removes the interrupt, and an answer after a thread change does not resume. See [Interrupts in React and Vue](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-interrupts-hitl/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#interrupts-in-react-and-vue).
- **Interrupts in Vue:** `enabled` runs one time for each interrupt, and the `interrupt` ref is `null` while `enabled` returns `false`. See [Interrupts in Vue](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-interrupts-hitl/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#interrupts-in-vue).
- **Angular scroll threshold:** the chat view uses the core default of 12px from the end. See [Scroll to bottom in Angular](https://github.com/CopilotKit/CopilotKit/blob/alem/2.0-core-interrupts-hitl/showcase/shell-docs/src/content/docs/migrate/chat-2.0.mdx#scroll-to-bottom-in-angular).

BREAKING CHANGE: HITL calls now fail with "Human-in-the-loop interaction aborted" when their tool is unregistered, the provider unmounts, or the core is disposed. React and Vue interrupts clear on RUN_ERROR and after a thread change. Vue runs `enabled` one time per interrupt. To migrate, follow the "Interrupts and human-in-the-loop" section of `migrate/chat-2.0.mdx`. No codemod: no export or type changes.

### Merge notes

These files combine this layer with layer B (tool-call rendering):

- **`core/run-handler.ts`:** keeps this layer's pending-HITL table and microtask check. B's executing-call cleanup sits beside it in the same `finally` block.
- **React `lib/react-core.ts` and Vue `lib/vue-core.ts`:** B's `ɵRendererRegistry` plus this layer's core interrupt slot.
- **Angular `buildHumanInTheLoopToolCall`:** uses B's core-built props and this layer's core `respond`.

### Top-of-stack cleanup commits

- The React and Vue `normalize-auto-scroll.ts` and Vue `is-mobile-viewport.ts` shims are removed.
- Vue `CopilotChatView` uses `ɵisScrolledToBottom`.
- Angular `autoScroll` goes through core's `ɵnormalizeAutoScroll`.
- Angular `[threshold]="10"` is removed, so the chat view uses the core default of 12px. The migration page has a note.

## Related PRs and Issues

- PR 9 of the stack (base): `alem/2.0-core-suggestions-inspector-learning`

## Checklist

- [ ] I have read the [Contribution Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] If the PR changes or adds functionality, I have updated the relevant documentation
- [x] If the PR contains a breaking change, the title has `!` (for example `feat(react-core)!: ...`) and the description has a `BREAKING CHANGE:` line with migration steps. See [VERSIONING.md](https://github.com/CopilotKit/CopilotKit/blob/main/VERSIONING.md)
- [ ] "Allow edits by maintainers" is checked (lets us help iterate on your PR directly — faster turnaround for everyone)

## Testing

**Commands run** on head `b254db2961`:

- `pnpm nx run-many -t test,check-types -p @copilotkit/core @copilotkit/vue @copilotkit/angular @copilotkit/react-core --skip-nx-cache`
  - core: 155 of 155 test files pass.
  - Angular: 74 of 74 test files pass.
  - react-core: 197 test files pass, 2 skipped.
  - Vue: 1459 of 1460 tests pass. `src/__tests__/build-entries.test.ts` hit its 5 s timeout under load. Run alone, it passes (2 of 2).
  - `@copilotkit/markdown:check-types` failed once in this run, because the worktree had a stale install after the stack merge. Re-run on this head with `--skip-nx-cache`, it passes.
- `pnpm nx run-many -t check-types -p @copilotkit/core @copilotkit/vue @copilotkit/angular @copilotkit/react-core --exclude-task-dependencies --skip-nx-cache`: pass.
- `pnpm nx run @copilotkit/v2-migration:test`: 15 tsx and 39 ts cases pass. No codemod change in this layer.
- `pnpm check:public-api-manifest`: current.

**Manual test** (Vue, unanswered prompt):

1. In a Vue app, call `useHumanInTheLoop` in a component that you can hide with `v-if`.
2. Ask the agent to call that tool. The HITL card shows.
3. Hide the component. Do not answer.
4. Send a new message. Before this PR, the first run never ended. Now the call ends with `Human-in-the-loop interaction aborted` and the message sends.

**How this PR makes testing easy:**

- `packages/core/src/core/__tests__/interrupt-controller.test.ts` and `human-in-the-loop.test.ts` test the new core modules.
- `packages/core/src/__tests__/core-hitl-unregister.test.ts` tests rejection on unregister, a same-pass re-registration, and no resurrection.
- `packages/angular/src/lib/human-in-the-loop.spec.ts` covers the `"*"` hang and parallel calls.
- React `use-human-in-the-loop.e2e.test.tsx` and Vue `use-human-in-the-loop.test.ts` cover parallel calls and the Vue unmount case.

## Risk / rollback

- **Risk:** apps that depend on the earlier behavior listed above. For example, a test that expects a HITL call to stay open after its component unmounts.
- **Merge order:** this layer sits on 9 others. Merge it last.
- **Rollback:** revert this PR. The layers below it do not depend on it.

## Stack

Merge in this order. Each PR's base is the PR above it.

| # | PR | Area | Base |
|---|---|---|---|
| 1 | #8181 | Chat primitives | `2.0.0` |
| 2 | #8173 | Provider config and runtime info | PR 1 |
| 3 | #8176 | Tool-call rendering | PR 2 |
| 4 | #8175 | A2UI, Open Generative UI, MCP Apps | PR 3 |
| 5 | #8174 | Agents, threads, chat configuration | PR 4 |
| 6 | #8179 | Chat sends, attachments, message view | PR 5 |
| 7 | #8178 | Chat input, recorder, DOM controllers | PR 6 |
| 8 | #8177 | Markdown renderer | PR 7 |
| 9 | #8182 | Suggestions, Inspector, learning | PR 8 |
| 10 | **#8180 (this PR)** | Interrupts and human-in-the-loop | PR 9 |

**Stack verification.** After each merge, the stack builder ran these on this layer's head before pushing it, all with `--skip-nx-cache`: build, check-types and tests for core, react-core, vue and angular, plus the packages this layer touches; the codemod tests; oxlint; and `check:public-api-manifest`. On the top layer it also ran publint, attw, and the shell-docs tests and build. All passed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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