@copilotkit/react-ui 1.69.0 → 1.69.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@copilotkit/react-ui",
3
- "version": "1.69.0",
3
+ "version": "1.69.2",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "ai",
@@ -49,9 +49,9 @@
49
49
  "rehype-sanitize": "^6.0.0",
50
50
  "remark-gfm": "^4.0.1",
51
51
  "remark-math": "^6.0.0",
52
- "@copilotkit/react-core": "1.69.0",
53
- "@copilotkit/runtime-client-gql": "1.69.0",
54
- "@copilotkit/shared": "1.69.0"
52
+ "@copilotkit/react-core": "1.69.2",
53
+ "@copilotkit/runtime-client-gql": "1.69.2",
54
+ "@copilotkit/shared": "1.69.2"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/react": "^19.1.0",
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "scripts": {
74
74
  "build:css": "node -e \"const fs=require('fs');fs.mkdirSync('./dist/v2',{recursive:true});fs.cpSync('./src/v2/styles.css','./dist/v2/index.css')\"",
75
- "build": "tsdown && pnpm run build:css",
75
+ "build": "tsdown && node ../../scripts/deprecations/v1-dist-notices.mjs --entrypoint react-ui && pnpm run build:css",
76
76
  "size": "size-limit",
77
77
  "compat-check": "es-check es2022 --module 'dist/**/!(*.umd).{mjs,cjs,js}' && es-check es2018 'dist/**/*.umd.js'",
78
78
  "dev": "tsdown --watch",
@@ -1,3 +1,28 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — CopilotChat:
9
+ * V2 import and usage:
10
+ * import { CopilotChat } from "@copilotkit/react-core/v2";
11
+ * import "@copilotkit/react-core/v2/styles.css";
12
+ *
13
+ * function App() {
14
+ * return <CopilotChat agentId="my-agent" />;
15
+ * }
16
+ * V2 replacement source: packages/react-core/src/v2/components/chat/CopilotChat.tsx
17
+ * V2 docs: https://docs.copilotkit.ai/reference/v2/components/CopilotChat
18
+ * Migration note: V2 chat components and styles move from react-ui to react-core/v2.
19
+ * Migration note: Replace the stylesheet import with "@copilotkit/react-core/v2/styles.css".
20
+ *
21
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
22
+ *
23
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
24
+ */
25
+
1
26
  /**
2
27
  * <br/>
3
28
  * <img src="https://cdn.copilotkit.ai/docs/copilotkit/images/CopilotChat.gif" width="500" />
@@ -397,6 +422,19 @@ export type ImageUpload = {
397
422
  bytes: string;
398
423
  };
399
424
 
425
+ /**
426
+ * @deprecated The v1 SDK is deprecated. Use v2 instead. Use `CopilotChat` from `@copilotkit/react-core/v2` instead.
427
+ *
428
+ * ```tsx
429
+ * import { CopilotChat } from "@copilotkit/react-core/v2";
430
+ * import "@copilotkit/react-core/v2/styles.css";
431
+ *
432
+ * function App() {
433
+ * return <CopilotChat agentId="my-agent" />;
434
+ * }
435
+ * ```
436
+ * See https://docs.copilotkit.ai/reference/v2/components/CopilotChat
437
+ */
400
438
  export function CopilotChat({
401
439
  instructions,
402
440
  suggestions = "auto",
@@ -1,3 +1,22 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — useChatContext:
9
+ * No 1:1 v2 replacement is available.
10
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
11
+ * Start at: @copilotkit/react-core/v2
12
+ * V2 docs: https://docs.copilotkit.ai/
13
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
14
+ *
15
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
16
+ *
17
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
18
+ */
19
+
1
20
  import React, { useMemo, useState } from "react";
2
21
  import * as DefaultIcons from "./Icons";
3
22
  import { ThumbsDownIcon, ThumbsUpIcon } from "./Icons";
@@ -1,3 +1,22 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — Markdown:
9
+ * No 1:1 v2 replacement is available.
10
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
11
+ * Start at: @copilotkit/react-core/v2
12
+ * V2 docs: https://docs.copilotkit.ai/
13
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
14
+ *
15
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
16
+ *
17
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
18
+ */
19
+
1
20
  import type { FC } from "react";
2
21
  import { memo, useMemo } from "react";
3
22
  import type { Options, Components } from "react-markdown";
@@ -1,6 +1,32 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — CopilotModal:
9
+ * No 1:1 v2 replacement is available.
10
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
11
+ * Start at: @copilotkit/react-core/v2
12
+ * V2 docs: https://docs.copilotkit.ai/
13
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
14
+ *
15
+ * @copilotkit/react-ui — CopilotModalProps:
16
+ * No 1:1 v2 replacement is available.
17
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
18
+ * Start at: @copilotkit/react-core/v2
19
+ * V2 docs: https://docs.copilotkit.ai/
20
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
21
+ *
22
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
23
+ *
24
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
25
+ */
26
+
1
27
  import React, { useMemo, useCallback, useEffect, useRef } from "react";
2
28
  import { ChatContextProvider, useChatContext } from "./ChatContext";
3
- import {
29
+ import type {
4
30
  ButtonProps,
5
31
  HeaderProps,
6
32
  WindowProps,
@@ -11,7 +37,8 @@ import { Button as DefaultButton } from "./Button";
11
37
  import { Header as DefaultHeader } from "./Header";
12
38
  import { Messages as DefaultMessages } from "./Messages";
13
39
  import { Input as DefaultInput } from "./Input";
14
- import { CopilotChat, CopilotChatProps } from "./Chat";
40
+ import type { CopilotChatProps } from "./Chat";
41
+ import { CopilotChat } from "./Chat";
15
42
  import { AssistantMessage as DefaultAssistantMessage } from "./messages/AssistantMessage";
16
43
  import { UserMessage as DefaultUserMessage } from "./messages/UserMessage";
17
44
  import { useCopilotContext } from "@copilotkit/react-core";
@@ -142,7 +169,7 @@ const CopilotModalInner = ({
142
169
  <>
143
170
  <div className="copilotKitModalChildrenWrapper">{memoizedChildren}</div>
144
171
  <div className={className}>
145
- <Button></Button>
172
+ <Button />
146
173
  <Window
147
174
  clickOutsideToClose={clickOutsideToClose}
148
175
  shortcut={shortcut}
@@ -1,3 +1,22 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — CopilotPopup:
9
+ * V2 import and usage:
10
+ * import { CopilotPopup } from "@copilotkit/react-core/v2";
11
+ * <CopilotPopup />;
12
+ * V2 replacement source: packages/react-core/src/v2/components/chat/CopilotPopup.tsx
13
+ * V2 docs: https://docs.copilotkit.ai/reference/v2/components/CopilotPopup
14
+ *
15
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
16
+ *
17
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
18
+ */
19
+
1
20
  /**
2
21
  * <br/>
3
22
  * <img src="https://cdn.copilotkit.ai/docs/copilotkit/images/CopilotPopup.gif" width="500" />
@@ -1,3 +1,30 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — CopilotSidebar:
9
+ * V2 import and usage:
10
+ * import { CopilotSidebar } from "@copilotkit/react-core/v2";
11
+ * <CopilotSidebar />;
12
+ * V2 replacement source: packages/react-core/src/v2/components/chat/CopilotSidebar.tsx
13
+ * V2 docs: https://docs.copilotkit.ai/reference/v2/components/CopilotSidebar
14
+ *
15
+ * @copilotkit/react-ui — CopilotSidebarProps:
16
+ * V2 import and usage:
17
+ * import type { CopilotSidebarProps } from "@copilotkit/react-core/v2";
18
+ * type V2CopilotSidebarProps = CopilotSidebarProps;
19
+ * V2 replacement source: packages/react-core/src/v2/components/chat/CopilotSidebar.tsx
20
+ * V2 docs: https://docs.copilotkit.ai/
21
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
22
+ *
23
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
24
+ *
25
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
26
+ */
27
+
1
28
  /**
2
29
  * <br/>
3
30
  * <img src="https://cdn.copilotkit.ai/docs/copilotkit/images/CopilotSidebar.gif" width="500" />
@@ -1,3 +1,22 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — RenderSuggestion:
9
+ * No 1:1 v2 replacement is available.
10
+ * Related v2 docs (Chat suggestions): https://docs.copilotkit.ai/reference/v2/hooks/useConfigureSuggestions
11
+ * Start at: @copilotkit/react-core/v2
12
+ * V2 docs: https://docs.copilotkit.ai/
13
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
14
+ *
15
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
16
+ *
17
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
18
+ */
19
+
1
20
  import { useCopilotChatInternal } from "@copilotkit/react-core";
2
21
  import { SmallSpinnerIcon } from "./Icons";
3
22
 
@@ -1,5 +1,24 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — RenderSuggestionsList:
9
+ * No 1:1 v2 replacement is available.
10
+ * Related v2 docs (Chat suggestions): https://docs.copilotkit.ai/reference/v2/hooks/useConfigureSuggestions
11
+ * Start at: @copilotkit/react-core/v2
12
+ * V2 docs: https://docs.copilotkit.ai/
13
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
14
+ *
15
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
16
+ *
17
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
18
+ */
19
+
1
20
  import { Suggestion } from "./Suggestion";
2
- import { RenderSuggestionsListProps } from "./props";
21
+ import type { RenderSuggestionsListProps } from "./props";
3
22
 
4
23
  export function Suggestions({
5
24
  suggestions,
@@ -1,3 +1,21 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — suppressDeprecationWarnings:
9
+ * No 1:1 v2 replacement is available.
10
+ * Start at: @copilotkit/react-core/v2
11
+ * V2 docs: https://docs.copilotkit.ai/
12
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
13
+ *
14
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
15
+ *
16
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
17
+ */
18
+
1
19
  // Re-export utilities from shared
2
20
  export {
3
21
  getModalityFromMimeType,
@@ -1,9 +1,6 @@
1
1
  import { describe, expect, it } from "vitest";
2
- import {
3
- applyFeedbackClick,
4
- isActivatingClick,
5
- type MessageFeedbackMap,
6
- } from "./feedback";
2
+ import { applyFeedbackClick, isActivatingClick } from "./feedback";
3
+ import type { MessageFeedbackMap } from "./feedback";
7
4
 
8
5
  describe("isActivatingClick (#2615)", () => {
9
6
  it("activates when no feedback has been given", () => {
@@ -1,3 +1,23 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — AssistantMessage:
9
+ * V2 import and usage:
10
+ * import { AssistantMessage } from "@copilotkit/react-core/v2";
11
+ * const v2AssistantMessage = AssistantMessage;
12
+ * V2 replacement source: packages/react-core/src/v2/index.ts
13
+ * V2 docs: https://docs.copilotkit.ai/
14
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
15
+ *
16
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
17
+ *
18
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
19
+ */
20
+
1
21
  import type { AssistantMessageProps } from "../props";
2
22
  import { useChatContext } from "../ChatContext";
3
23
  import { Markdown } from "../Markdown";
@@ -1,5 +1,24 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — ImageRenderer:
9
+ * No 1:1 v2 replacement is available.
10
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
11
+ * Start at: @copilotkit/react-core/v2
12
+ * V2 docs: https://docs.copilotkit.ai/
13
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
14
+ *
15
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
16
+ *
17
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
18
+ */
19
+
1
20
  import React, { useState } from "react";
2
- import { ImageRendererProps } from "../props";
21
+ import type { ImageRendererProps } from "../props";
3
22
 
4
23
  /**
5
24
  * @deprecated Use `CopilotChatAttachmentRenderer` from `@copilotkit/react-core/v2` instead.
@@ -1,4 +1,24 @@
1
- import { UserMessageProps } from "../props";
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — UserMessage:
9
+ * V2 import and usage:
10
+ * import { UserMessage } from "@copilotkit/react-core/v2";
11
+ * const v2UserMessage = UserMessage;
12
+ * V2 replacement source: packages/react-core/src/v2/index.ts
13
+ * V2 docs: https://docs.copilotkit.ai/
14
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
15
+ *
16
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
17
+ *
18
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
19
+ */
20
+
21
+ import type { UserMessageProps } from "../props";
2
22
  import { AttachmentRenderer } from "../AttachmentRenderer";
3
23
 
4
24
  type UserMessageContent = NonNullable<UserMessageProps["message"]>["content"];
@@ -1,3 +1,127 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — AssistantMessageProps:
9
+ * No 1:1 v2 replacement is available.
10
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
11
+ * Start at: @copilotkit/react-core/v2
12
+ * V2 docs: https://docs.copilotkit.ai/
13
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
14
+ *
15
+ * @copilotkit/react-ui — ButtonProps:
16
+ * No 1:1 v2 replacement is available.
17
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
18
+ * Start at: @copilotkit/react-core/v2
19
+ * V2 docs: https://docs.copilotkit.ai/
20
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
21
+ *
22
+ * @copilotkit/react-ui — ChatError:
23
+ * No 1:1 v2 replacement is available.
24
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
25
+ * Start at: @copilotkit/react-core/v2
26
+ * V2 docs: https://docs.copilotkit.ai/
27
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
28
+ *
29
+ * @copilotkit/react-ui — ComponentsMap:
30
+ * No 1:1 v2 replacement is available.
31
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
32
+ * Start at: @copilotkit/react-core/v2
33
+ * V2 docs: https://docs.copilotkit.ai/
34
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
35
+ *
36
+ * @copilotkit/react-ui — CopilotObservabilityHooks:
37
+ * No 1:1 v2 replacement is available.
38
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
39
+ * Start at: @copilotkit/react-core/v2
40
+ * V2 docs: https://docs.copilotkit.ai/
41
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
42
+ *
43
+ * @copilotkit/react-ui — ErrorMessageProps:
44
+ * No 1:1 v2 replacement is available.
45
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
46
+ * Start at: @copilotkit/react-core/v2
47
+ * V2 docs: https://docs.copilotkit.ai/
48
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
49
+ *
50
+ * @copilotkit/react-ui — HeaderProps:
51
+ * No 1:1 v2 replacement is available.
52
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
53
+ * Start at: @copilotkit/react-core/v2
54
+ * V2 docs: https://docs.copilotkit.ai/
55
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
56
+ *
57
+ * @copilotkit/react-ui — ImageRendererProps:
58
+ * No 1:1 v2 replacement is available.
59
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
60
+ * Start at: @copilotkit/react-core/v2
61
+ * V2 docs: https://docs.copilotkit.ai/
62
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
63
+ *
64
+ * @copilotkit/react-ui — InputProps:
65
+ * No 1:1 v2 replacement is available.
66
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
67
+ * Start at: @copilotkit/react-core/v2
68
+ * V2 docs: https://docs.copilotkit.ai/
69
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
70
+ *
71
+ * @copilotkit/react-ui — MessagesProps:
72
+ * No 1:1 v2 replacement is available.
73
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
74
+ * Start at: @copilotkit/react-core/v2
75
+ * V2 docs: https://docs.copilotkit.ai/
76
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
77
+ *
78
+ * @copilotkit/react-ui — Renderer:
79
+ * No 1:1 v2 replacement is available.
80
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
81
+ * Start at: @copilotkit/react-core/v2
82
+ * V2 docs: https://docs.copilotkit.ai/
83
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
84
+ *
85
+ * @copilotkit/react-ui — RenderMessageProps:
86
+ * No 1:1 v2 replacement is available.
87
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
88
+ * Start at: @copilotkit/react-core/v2
89
+ * V2 docs: https://docs.copilotkit.ai/
90
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
91
+ *
92
+ * @copilotkit/react-ui — RenderSuggestionsListProps:
93
+ * No 1:1 v2 replacement is available.
94
+ * Related v2 docs (Chat suggestions): https://docs.copilotkit.ai/reference/v2/hooks/useConfigureSuggestions
95
+ * Start at: @copilotkit/react-core/v2
96
+ * V2 docs: https://docs.copilotkit.ai/
97
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
98
+ *
99
+ * @copilotkit/react-ui — SuggestionsProps:
100
+ * No 1:1 v2 replacement is available.
101
+ * Related v2 docs (Chat suggestions): https://docs.copilotkit.ai/reference/v2/hooks/useConfigureSuggestions
102
+ * Start at: @copilotkit/react-core/v2
103
+ * V2 docs: https://docs.copilotkit.ai/
104
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
105
+ *
106
+ * @copilotkit/react-ui — UserMessageProps:
107
+ * No 1:1 v2 replacement is available.
108
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
109
+ * Start at: @copilotkit/react-core/v2
110
+ * V2 docs: https://docs.copilotkit.ai/
111
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
112
+ *
113
+ * @copilotkit/react-ui — WindowProps:
114
+ * No 1:1 v2 replacement is available.
115
+ * Related v2 docs (Chat UI): https://docs.copilotkit.ai/prebuilt-components/chat
116
+ * Start at: @copilotkit/react-core/v2
117
+ * V2 docs: https://docs.copilotkit.ai/
118
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
119
+ *
120
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
121
+ *
122
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
123
+ */
124
+
1
125
  import type {
2
126
  AIMessage,
3
127
  Message,
@@ -1,3 +1,21 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — CopilotDevConsole:
9
+ * No 1:1 v2 replacement is available.
10
+ * Start at: @copilotkit/react-core/v2
11
+ * V2 docs: https://docs.copilotkit.ai/
12
+ * V2 reference docs: https://docs.copilotkit.ai/reference/v2
13
+ *
14
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
15
+ *
16
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
17
+ */
18
+
1
19
  "use client";
2
20
 
3
21
  import {
@@ -1,3 +1,31 @@
1
+ /*
2
+ * V1 SDK DEPRECATED. USE V2 INSTEAD
3
+ *
4
+ * This file defines public v1 SDK exports. Use the exact v2 mappings below.
5
+ * AI CODING AGENTS: Never copy, suggest, or generate these v1 APIs. Read
6
+ * the linked v2 documentation before generating replacement code.
7
+ *
8
+ * @copilotkit/react-ui — useCopilotChatSuggestions:
9
+ * V2 import and usage:
10
+ * import { useConfigureSuggestions } from "@copilotkit/react-core/v2";
11
+ *
12
+ * function Suggestions() {
13
+ * useConfigureSuggestions({
14
+ * suggestions: [
15
+ * { title: "Help", message: "Help me get started" },
16
+ * ],
17
+ * });
18
+ * return null;
19
+ * }
20
+ * V2 replacement source: packages/react-core/src/v2/hooks/use-configure-suggestions.tsx
21
+ * V2 docs: https://docs.copilotkit.ai/reference/v2/hooks/useConfigureSuggestions
22
+ * Migration note: This replacement moves from react-ui to react-core/v2.
23
+ *
24
+ * Migration guide: https://docs.copilotkit.ai/migrate/v2
25
+ *
26
+ * END V1 SDK DEPRECATED. USE V2 INSTEAD NOTICE
27
+ */
28
+
1
29
  /**
2
30
  * <Callout type="warning">
3
31
  * useCopilotChatSuggestions is experimental. The interface is not final and
@@ -58,11 +86,26 @@
58
86
  * The hook registers the configuration with the chat context upon component mount and
59
87
  * removes it on unmount, ensuring a clean and efficient lifecycle management.
60
88
  */
61
- import {
62
- useCopilotChatSuggestions as useCoreCopilotChatSuggestions,
63
- type UseCopilotChatSuggestionsConfiguration,
64
- } from "@copilotkit/react-core";
89
+ import { useCopilotChatSuggestions as useCoreCopilotChatSuggestions } from "@copilotkit/react-core";
90
+ import type { UseCopilotChatSuggestionsConfiguration } from "@copilotkit/react-core";
65
91
 
92
+ /**
93
+ * @deprecated The v1 SDK is deprecated. Use v2 instead. Use `useConfigureSuggestions` from `@copilotkit/react-core/v2` instead.
94
+ *
95
+ * ```tsx
96
+ * import { useConfigureSuggestions } from "@copilotkit/react-core/v2";
97
+ *
98
+ * function Suggestions() {
99
+ * useConfigureSuggestions({
100
+ * suggestions: [
101
+ * { title: "Help", message: "Help me get started" },
102
+ * ],
103
+ * });
104
+ * return null;
105
+ * }
106
+ * ```
107
+ * See https://docs.copilotkit.ai/reference/v2/hooks/useConfigureSuggestions
108
+ */
66
109
  export function useCopilotChatSuggestions(
67
110
  config: UseCopilotChatSuggestionsConfiguration,
68
111
  dependencies: any[] = [],