@yourgpt/copilot-sdk 2.1.5-alpha.3 → 2.1.5-alpha.5

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.
Files changed (106) hide show
  1. package/dist/{MessageTree-CoIt_4nB.d.cts → MessageTree-Clhiv_k2.d.ts} +5 -4
  2. package/dist/{MessageTree-CzaN9Eul.d.ts → MessageTree-Dt9qfJ55.d.cts} +5 -4
  3. package/dist/{ThreadManager-BEAECB7Y.d.ts → ThreadManager-D7KwT2FJ.d.ts} +3 -1
  4. package/dist/{ThreadManager-Cw5fwyCN.d.cts → ThreadManager-DK46fVl3.d.cts} +3 -1
  5. package/dist/{chunk-NUXLAZOE.cjs → chunk-3ZDRX7J2.cjs} +2 -2
  6. package/dist/{chunk-NUXLAZOE.cjs.map → chunk-3ZDRX7J2.cjs.map} +1 -1
  7. package/dist/{chunk-RKGRQRZU.js → chunk-533K2Z7C.js} +4 -4
  8. package/dist/{chunk-RKGRQRZU.js.map → chunk-533K2Z7C.js.map} +1 -1
  9. package/dist/chunk-5EGBIQYS.cjs +292 -0
  10. package/dist/chunk-5EGBIQYS.cjs.map +1 -0
  11. package/dist/chunk-5UGWLGFS.cjs +2039 -0
  12. package/dist/chunk-5UGWLGFS.cjs.map +1 -0
  13. package/dist/{chunk-3AONOZLY.js → chunk-AIVXGTWS.js} +2 -2
  14. package/dist/chunk-AIVXGTWS.js.map +1 -0
  15. package/dist/{chunk-LLM7AHMO.js → chunk-DDZLRCVX.js} +2 -2
  16. package/dist/{chunk-LLM7AHMO.js.map → chunk-DDZLRCVX.js.map} +1 -1
  17. package/dist/{chunk-PT2TOHG5.js → chunk-DH6EO6NW.js} +1337 -3049
  18. package/dist/chunk-DH6EO6NW.js.map +1 -0
  19. package/dist/{chunk-WIXFZUEZ.cjs → chunk-KGYDGK3U.cjs} +84 -30
  20. package/dist/chunk-KGYDGK3U.cjs.map +1 -0
  21. package/dist/{chunk-TCPAT3WG.cjs → chunk-LHLVTGIP.cjs} +1339 -3101
  22. package/dist/chunk-LHLVTGIP.cjs.map +1 -0
  23. package/dist/{chunk-TPB7XED6.cjs → chunk-TPDMBDQX.cjs} +2 -2
  24. package/dist/chunk-TPDMBDQX.cjs.map +1 -0
  25. package/dist/chunk-TXQ37MAO.js +287 -0
  26. package/dist/chunk-TXQ37MAO.js.map +1 -0
  27. package/dist/{chunk-MDS23G2S.cjs → chunk-Y2A6AMGO.cjs} +10 -10
  28. package/dist/{chunk-MDS23G2S.cjs.map → chunk-Y2A6AMGO.cjs.map} +1 -1
  29. package/dist/{chunk-WZ2TOZ7M.js → chunk-YLZCTR4O.js} +65 -11
  30. package/dist/chunk-YLZCTR4O.js.map +1 -0
  31. package/dist/chunk-ZAOTYA5L.js +1983 -0
  32. package/dist/chunk-ZAOTYA5L.js.map +1 -0
  33. package/dist/core/index.cjs +93 -93
  34. package/dist/core/index.d.cts +7 -7
  35. package/dist/core/index.d.ts +7 -7
  36. package/dist/core/index.js +5 -5
  37. package/dist/experimental/index.cjs +644 -0
  38. package/dist/experimental/index.cjs.map +1 -0
  39. package/dist/experimental/index.d.cts +924 -0
  40. package/dist/experimental/index.d.ts +924 -0
  41. package/dist/experimental/index.js +611 -0
  42. package/dist/experimental/index.js.map +1 -0
  43. package/dist/{index-D7169xuR.d.ts → index-D8zza1Q8.d.ts} +1 -1
  44. package/dist/{index-CzJB8Ddo.d.cts → index-DCVjTdIZ.d.cts} +1 -1
  45. package/dist/mcp/index.d.cts +3 -3
  46. package/dist/mcp/index.d.ts +3 -3
  47. package/dist/react/index.cjs +136 -123
  48. package/dist/react/index.d.cts +178 -12
  49. package/dist/react/index.d.ts +178 -12
  50. package/dist/react/index.js +7 -6
  51. package/dist/styles.css +45 -0
  52. package/dist/tools/anthropic/index.cjs +3 -3
  53. package/dist/tools/anthropic/index.d.cts +1 -1
  54. package/dist/tools/anthropic/index.d.ts +1 -1
  55. package/dist/tools/anthropic/index.js +2 -2
  56. package/dist/tools/brave/index.cjs +6 -6
  57. package/dist/tools/brave/index.d.cts +1 -1
  58. package/dist/tools/brave/index.d.ts +1 -1
  59. package/dist/tools/brave/index.js +3 -3
  60. package/dist/tools/exa/index.cjs +6 -6
  61. package/dist/tools/exa/index.d.cts +1 -1
  62. package/dist/tools/exa/index.d.ts +1 -1
  63. package/dist/tools/exa/index.js +3 -3
  64. package/dist/tools/google/index.cjs +6 -6
  65. package/dist/tools/google/index.d.cts +1 -1
  66. package/dist/tools/google/index.d.ts +1 -1
  67. package/dist/tools/google/index.js +4 -4
  68. package/dist/tools/openai/index.cjs +6 -6
  69. package/dist/tools/openai/index.d.cts +1 -1
  70. package/dist/tools/openai/index.d.ts +1 -1
  71. package/dist/tools/openai/index.js +3 -3
  72. package/dist/tools/searxng/index.cjs +6 -6
  73. package/dist/tools/searxng/index.d.cts +1 -1
  74. package/dist/tools/searxng/index.d.ts +1 -1
  75. package/dist/tools/searxng/index.js +3 -3
  76. package/dist/tools/serper/index.cjs +6 -6
  77. package/dist/tools/serper/index.d.cts +1 -1
  78. package/dist/tools/serper/index.d.ts +1 -1
  79. package/dist/tools/serper/index.js +3 -3
  80. package/dist/tools/tavily/index.cjs +6 -6
  81. package/dist/tools/tavily/index.d.cts +1 -1
  82. package/dist/tools/tavily/index.d.ts +1 -1
  83. package/dist/tools/tavily/index.js +3 -3
  84. package/dist/tools/web-search/index.cjs +7 -7
  85. package/dist/tools/web-search/index.d.cts +2 -2
  86. package/dist/tools/web-search/index.d.ts +2 -2
  87. package/dist/tools/web-search/index.js +4 -4
  88. package/dist/{tools-tmksfhUo.d.cts → tools-DcS6Aeao.d.cts} +7 -3
  89. package/dist/{tools-tmksfhUo.d.ts → tools-DcS6Aeao.d.ts} +7 -3
  90. package/dist/{types-BqwW3Baj.d.ts → types-BUYni9B8.d.ts} +1 -1
  91. package/dist/{types-BLw7mxtW.d.cts → types-Cvg4DUoc.d.cts} +1 -1
  92. package/dist/{types-BeFBBZ5i.d.ts → types-waEqyE4K.d.cts} +5 -0
  93. package/dist/{types-BeFBBZ5i.d.cts → types-waEqyE4K.d.ts} +5 -0
  94. package/dist/ui/index.cjs +354 -524
  95. package/dist/ui/index.cjs.map +1 -1
  96. package/dist/ui/index.d.cts +22 -4
  97. package/dist/ui/index.d.ts +22 -4
  98. package/dist/ui/index.js +197 -372
  99. package/dist/ui/index.js.map +1 -1
  100. package/package.json +6 -1
  101. package/dist/chunk-3AONOZLY.js.map +0 -1
  102. package/dist/chunk-PT2TOHG5.js.map +0 -1
  103. package/dist/chunk-TCPAT3WG.cjs.map +0 -1
  104. package/dist/chunk-TPB7XED6.cjs.map +0 -1
  105. package/dist/chunk-WIXFZUEZ.cjs.map +0 -1
  106. package/dist/chunk-WZ2TOZ7M.js.map +0 -1
@@ -7,9 +7,9 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
7
7
  import { VariantProps } from 'class-variance-authority';
8
8
  import * as use_stick_to_bottom from 'use-stick-to-bottom';
9
9
  import { d as WebSearchResult, f as WebSearchResponse } from '../types-ZguuKEs_.cjs';
10
- import { a as Thread, c as ThreadStorageAdapter, A as AsyncThreadStorageAdapter } from '../types-BeFBBZ5i.cjs';
11
- import { T as ToolDefinition } from '../tools-tmksfhUo.cjs';
12
- import { B as BranchInfo } from '../MessageTree-CoIt_4nB.cjs';
10
+ import { a as Thread, c as ThreadStorageAdapter, A as AsyncThreadStorageAdapter } from '../types-waEqyE4K.cjs';
11
+ import { T as ToolDefinition } from '../tools-DcS6Aeao.cjs';
12
+ import { B as BranchInfo } from '../MessageTree-Dt9qfJ55.cjs';
13
13
  import { d as MCPUIIntent, n as MCPUIFrameProps, M as MCPUIResource } from '../types-B20VCJXL.cjs';
14
14
  import { ClassValue } from 'clsx';
15
15
 
@@ -1655,6 +1655,9 @@ type ChatProps = {
1655
1655
  };
1656
1656
  /** Custom message renderer */
1657
1657
  renderMessage?: (message: ChatMessage, index: number) => React__default.ReactNode;
1658
+ /** Wrap each DefaultMessage in a custom container — for animations, hover effects, etc.
1659
+ * Unlike renderMessage, this preserves all SDK defaults (toolRenderers, loading, avatars, approval). */
1660
+ wrapMessage?: (content: React__default.ReactNode, message: ChatMessage, index: number) => React__default.ReactNode;
1658
1661
  /** Custom input renderer (replaces entire input area) */
1659
1662
  renderInput?: () => React__default.ReactNode;
1660
1663
  /** Custom header renderer (replaces entire header) */
@@ -1891,7 +1894,7 @@ declare function BackButton({ className, children, disabled, "aria-label": ariaL
1891
1894
  */
1892
1895
  type ThreadPickerCompoundProps = Omit<ThreadPickerProps, "value" | "threads" | "onSelect" | "onNewThread" | "onDeleteThread" | "disabled">;
1893
1896
  declare function ThreadPickerCompound(props: ThreadPickerCompoundProps): react_jsx_runtime.JSX.Element | null;
1894
- declare function ChatComponent({ messages, onSendMessage, onStop, isLoading, children, placeholder, welcomeMessage, title, showHeader, header, threadPicker, logo, name, onClose, showPoweredBy, showUserAvatar, userAvatar: userAvatarProp, assistantAvatar: assistantAvatarProp, loaderVariant, fontSize, maxFileSize, allowedFileTypes, attachmentsEnabled, attachmentsDisabledTooltip, processAttachment: processAttachmentProp, suggestions, onSuggestionClick, welcome, recentThreads, onSelectThread, onDeleteThread, onViewMoreThreads, isProcessing, registeredTools, toolRenderers, mcpToolRenderer, fallbackToolRenderer, onApproveToolExecution, onRejectToolExecution, showFollowUps, followUpClassName, followUpButtonClassName, citations, messageView, renderMessage, renderInput, renderHeader, groupConsecutiveMessages, className, classNames, onNewChat, threads, currentThreadId, onSwitchThread, isThreadBusy, getBranchInfo, onSwitchBranch, onEditMessage, }: ChatProps): react_jsx_runtime.JSX.Element;
1897
+ declare function ChatComponent({ messages, onSendMessage, onStop, isLoading, children, placeholder, welcomeMessage, title, showHeader, header, threadPicker, logo, name, onClose, showPoweredBy, showUserAvatar, userAvatar: userAvatarProp, assistantAvatar: assistantAvatarProp, loaderVariant, fontSize, maxFileSize, allowedFileTypes, attachmentsEnabled, attachmentsDisabledTooltip, processAttachment: processAttachmentProp, suggestions, onSuggestionClick, welcome, recentThreads, onSelectThread, onDeleteThread, onViewMoreThreads, isProcessing, registeredTools, toolRenderers, mcpToolRenderer, fallbackToolRenderer, onApproveToolExecution, onRejectToolExecution, showFollowUps, followUpClassName, followUpButtonClassName, citations, messageView, renderMessage, wrapMessage, renderInput, renderHeader, groupConsecutiveMessages, className, classNames, onNewChat, threads, currentThreadId, onSwitchThread, isThreadBusy, getBranchInfo, onSwitchBranch, onEditMessage, }: ChatProps): react_jsx_runtime.JSX.Element;
1895
1898
  /**
1896
1899
  * Chat component with compound component pattern.
1897
1900
  *
@@ -2275,6 +2278,11 @@ type CopilotChatProps = Omit<ChatProps, "messages" | "onSendMessage" | "onStop"
2275
2278
  * Granular class names for sub-components including thread picker
2276
2279
  */
2277
2280
  classNames?: CopilotChatClassNames;
2281
+ /**
2282
+ * Allow inline editing of user messages.
2283
+ * @default false
2284
+ */
2285
+ allowEdit?: boolean;
2278
2286
  };
2279
2287
  declare function CopilotChatBase(props: CopilotChatProps & {
2280
2288
  children?: React__default.ReactNode;
@@ -2290,6 +2298,11 @@ declare const CopilotChat: typeof CopilotChatBase & {
2290
2298
  Suggestions: typeof SuggestionsCompound;
2291
2299
  BackButton: typeof BackButton;
2292
2300
  ThreadPicker: typeof ThreadPickerCompound;
2301
+ MessageActions: typeof MessageActions;
2302
+ CopyAction: typeof CopyAction;
2303
+ EditAction: typeof EditAction;
2304
+ FeedbackAction: typeof FeedbackAction;
2305
+ Action: typeof Action;
2293
2306
  };
2294
2307
  declare const ConnectedChat: typeof CopilotChatBase & {
2295
2308
  Root: typeof CopilotChatBase;
@@ -2302,6 +2315,11 @@ declare const ConnectedChat: typeof CopilotChatBase & {
2302
2315
  Suggestions: typeof SuggestionsCompound;
2303
2316
  BackButton: typeof BackButton;
2304
2317
  ThreadPicker: typeof ThreadPickerCompound;
2318
+ MessageActions: typeof MessageActions;
2319
+ CopyAction: typeof CopyAction;
2320
+ EditAction: typeof EditAction;
2321
+ FeedbackAction: typeof FeedbackAction;
2322
+ Action: typeof Action;
2305
2323
  };
2306
2324
  type ConnectedChatProps = CopilotChatProps;
2307
2325
 
@@ -7,9 +7,9 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
7
7
  import { VariantProps } from 'class-variance-authority';
8
8
  import * as use_stick_to_bottom from 'use-stick-to-bottom';
9
9
  import { d as WebSearchResult, f as WebSearchResponse } from '../types-ZguuKEs_.js';
10
- import { a as Thread, c as ThreadStorageAdapter, A as AsyncThreadStorageAdapter } from '../types-BeFBBZ5i.js';
11
- import { T as ToolDefinition } from '../tools-tmksfhUo.js';
12
- import { B as BranchInfo } from '../MessageTree-CzaN9Eul.js';
10
+ import { a as Thread, c as ThreadStorageAdapter, A as AsyncThreadStorageAdapter } from '../types-waEqyE4K.js';
11
+ import { T as ToolDefinition } from '../tools-DcS6Aeao.js';
12
+ import { B as BranchInfo } from '../MessageTree-Clhiv_k2.js';
13
13
  import { d as MCPUIIntent, n as MCPUIFrameProps, M as MCPUIResource } from '../types-B20VCJXL.js';
14
14
  import { ClassValue } from 'clsx';
15
15
 
@@ -1655,6 +1655,9 @@ type ChatProps = {
1655
1655
  };
1656
1656
  /** Custom message renderer */
1657
1657
  renderMessage?: (message: ChatMessage, index: number) => React__default.ReactNode;
1658
+ /** Wrap each DefaultMessage in a custom container — for animations, hover effects, etc.
1659
+ * Unlike renderMessage, this preserves all SDK defaults (toolRenderers, loading, avatars, approval). */
1660
+ wrapMessage?: (content: React__default.ReactNode, message: ChatMessage, index: number) => React__default.ReactNode;
1658
1661
  /** Custom input renderer (replaces entire input area) */
1659
1662
  renderInput?: () => React__default.ReactNode;
1660
1663
  /** Custom header renderer (replaces entire header) */
@@ -1891,7 +1894,7 @@ declare function BackButton({ className, children, disabled, "aria-label": ariaL
1891
1894
  */
1892
1895
  type ThreadPickerCompoundProps = Omit<ThreadPickerProps, "value" | "threads" | "onSelect" | "onNewThread" | "onDeleteThread" | "disabled">;
1893
1896
  declare function ThreadPickerCompound(props: ThreadPickerCompoundProps): react_jsx_runtime.JSX.Element | null;
1894
- declare function ChatComponent({ messages, onSendMessage, onStop, isLoading, children, placeholder, welcomeMessage, title, showHeader, header, threadPicker, logo, name, onClose, showPoweredBy, showUserAvatar, userAvatar: userAvatarProp, assistantAvatar: assistantAvatarProp, loaderVariant, fontSize, maxFileSize, allowedFileTypes, attachmentsEnabled, attachmentsDisabledTooltip, processAttachment: processAttachmentProp, suggestions, onSuggestionClick, welcome, recentThreads, onSelectThread, onDeleteThread, onViewMoreThreads, isProcessing, registeredTools, toolRenderers, mcpToolRenderer, fallbackToolRenderer, onApproveToolExecution, onRejectToolExecution, showFollowUps, followUpClassName, followUpButtonClassName, citations, messageView, renderMessage, renderInput, renderHeader, groupConsecutiveMessages, className, classNames, onNewChat, threads, currentThreadId, onSwitchThread, isThreadBusy, getBranchInfo, onSwitchBranch, onEditMessage, }: ChatProps): react_jsx_runtime.JSX.Element;
1897
+ declare function ChatComponent({ messages, onSendMessage, onStop, isLoading, children, placeholder, welcomeMessage, title, showHeader, header, threadPicker, logo, name, onClose, showPoweredBy, showUserAvatar, userAvatar: userAvatarProp, assistantAvatar: assistantAvatarProp, loaderVariant, fontSize, maxFileSize, allowedFileTypes, attachmentsEnabled, attachmentsDisabledTooltip, processAttachment: processAttachmentProp, suggestions, onSuggestionClick, welcome, recentThreads, onSelectThread, onDeleteThread, onViewMoreThreads, isProcessing, registeredTools, toolRenderers, mcpToolRenderer, fallbackToolRenderer, onApproveToolExecution, onRejectToolExecution, showFollowUps, followUpClassName, followUpButtonClassName, citations, messageView, renderMessage, wrapMessage, renderInput, renderHeader, groupConsecutiveMessages, className, classNames, onNewChat, threads, currentThreadId, onSwitchThread, isThreadBusy, getBranchInfo, onSwitchBranch, onEditMessage, }: ChatProps): react_jsx_runtime.JSX.Element;
1895
1898
  /**
1896
1899
  * Chat component with compound component pattern.
1897
1900
  *
@@ -2275,6 +2278,11 @@ type CopilotChatProps = Omit<ChatProps, "messages" | "onSendMessage" | "onStop"
2275
2278
  * Granular class names for sub-components including thread picker
2276
2279
  */
2277
2280
  classNames?: CopilotChatClassNames;
2281
+ /**
2282
+ * Allow inline editing of user messages.
2283
+ * @default false
2284
+ */
2285
+ allowEdit?: boolean;
2278
2286
  };
2279
2287
  declare function CopilotChatBase(props: CopilotChatProps & {
2280
2288
  children?: React__default.ReactNode;
@@ -2290,6 +2298,11 @@ declare const CopilotChat: typeof CopilotChatBase & {
2290
2298
  Suggestions: typeof SuggestionsCompound;
2291
2299
  BackButton: typeof BackButton;
2292
2300
  ThreadPicker: typeof ThreadPickerCompound;
2301
+ MessageActions: typeof MessageActions;
2302
+ CopyAction: typeof CopyAction;
2303
+ EditAction: typeof EditAction;
2304
+ FeedbackAction: typeof FeedbackAction;
2305
+ Action: typeof Action;
2293
2306
  };
2294
2307
  declare const ConnectedChat: typeof CopilotChatBase & {
2295
2308
  Root: typeof CopilotChatBase;
@@ -2302,6 +2315,11 @@ declare const ConnectedChat: typeof CopilotChatBase & {
2302
2315
  Suggestions: typeof SuggestionsCompound;
2303
2316
  BackButton: typeof BackButton;
2304
2317
  ThreadPicker: typeof ThreadPickerCompound;
2318
+ MessageActions: typeof MessageActions;
2319
+ CopyAction: typeof CopyAction;
2320
+ EditAction: typeof EditAction;
2321
+ FeedbackAction: typeof FeedbackAction;
2322
+ Action: typeof Action;
2305
2323
  };
2306
2324
  type ConnectedChatProps = CopilotChatProps;
2307
2325