@surf-kit/agent 0.2.2 → 0.4.0

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 (51) hide show
  1. package/dist/chat/index.cjs +733 -222
  2. package/dist/chat/index.cjs.map +1 -1
  3. package/dist/chat/index.d.cts +13 -7
  4. package/dist/chat/index.d.ts +13 -7
  5. package/dist/chat/index.js +715 -204
  6. package/dist/chat/index.js.map +1 -1
  7. package/dist/{chat-ChYl2XjV.d.cts → chat-BRY3xGg_.d.cts} +11 -2
  8. package/dist/{chat--OifhIRe.d.ts → chat-CcKc6OAR.d.ts} +11 -2
  9. package/dist/{hooks-BGs8-4GK.d.ts → hooks-BLeiVk-x.d.ts} +22 -5
  10. package/dist/{hooks-DLfF18IU.d.cts → hooks-CSGGLd7j.d.cts} +22 -5
  11. package/dist/hooks.cjs +160 -85
  12. package/dist/hooks.cjs.map +1 -1
  13. package/dist/hooks.d.cts +3 -3
  14. package/dist/hooks.d.ts +3 -3
  15. package/dist/hooks.js +160 -85
  16. package/dist/hooks.js.map +1 -1
  17. package/dist/index.cjs +794 -283
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +3 -3
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +758 -247
  22. package/dist/index.js.map +1 -1
  23. package/dist/layouts/index.cjs +754 -243
  24. package/dist/layouts/index.cjs.map +1 -1
  25. package/dist/layouts/index.d.cts +1 -1
  26. package/dist/layouts/index.d.ts +1 -1
  27. package/dist/layouts/index.js +733 -222
  28. package/dist/layouts/index.js.map +1 -1
  29. package/dist/mcp/index.cjs +1 -1
  30. package/dist/mcp/index.cjs.map +1 -1
  31. package/dist/mcp/index.js +2 -2
  32. package/dist/mcp/index.js.map +1 -1
  33. package/dist/response/index.cjs +100 -15
  34. package/dist/response/index.cjs.map +1 -1
  35. package/dist/response/index.d.cts +2 -2
  36. package/dist/response/index.d.ts +2 -2
  37. package/dist/response/index.js +99 -14
  38. package/dist/response/index.js.map +1 -1
  39. package/dist/sources/index.cjs +30 -1
  40. package/dist/sources/index.cjs.map +1 -1
  41. package/dist/sources/index.js +30 -1
  42. package/dist/sources/index.js.map +1 -1
  43. package/dist/streaming/index.cjs +213 -93
  44. package/dist/streaming/index.cjs.map +1 -1
  45. package/dist/streaming/index.d.cts +4 -3
  46. package/dist/streaming/index.d.ts +4 -3
  47. package/dist/streaming/index.js +183 -73
  48. package/dist/streaming/index.js.map +1 -1
  49. package/dist/{streaming-DfT22A0z.d.cts → streaming-BHPXnwwo.d.cts} +3 -1
  50. package/dist/{streaming-DbQxScpi.d.ts → streaming-C6mbU7My.d.ts} +3 -1
  51. package/package.json +17 -5
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as ChatMessage, b as ConversationSummary } from '../chat--OifhIRe.js';
2
+ import { a as ChatMessage, A as Attachment, b as ConversationSummary } from '../chat-CcKc6OAR.js';
3
3
  import React from 'react';
4
4
  import '../agent-BNSmiexZ.js';
5
5
 
@@ -23,12 +23,15 @@ declare function AgentChat({ endpoint, title, welcomeTitle, welcomeMessage, sugg
23
23
  type MessageThreadProps = {
24
24
  messages: ChatMessage[];
25
25
  streamingSlot?: React.ReactNode;
26
+ showAgent?: boolean;
26
27
  showSources?: boolean;
27
28
  showConfidence?: boolean;
28
29
  showVerification?: boolean;
30
+ hideLastAssistant?: boolean;
31
+ userBubbleClassName?: string;
29
32
  className?: string;
30
33
  };
31
- declare function MessageThread({ messages, streamingSlot, showSources, showConfidence, showVerification, className }: MessageThreadProps): react_jsx_runtime.JSX.Element;
34
+ declare function MessageThread({ messages, streamingSlot, showAgent, showSources, showConfidence, showVerification, hideLastAssistant, userBubbleClassName, className }: MessageThreadProps): react_jsx_runtime.JSX.Element;
32
35
 
33
36
  type MessageBubbleProps = {
34
37
  message: ChatMessage;
@@ -37,27 +40,30 @@ type MessageBubbleProps = {
37
40
  showConfidence?: boolean;
38
41
  showVerification?: boolean;
39
42
  animated?: boolean;
43
+ userBubbleClassName?: string;
40
44
  className?: string;
41
45
  };
42
- declare function MessageBubble({ message, showAgent, showSources, showConfidence, showVerification, animated, className, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
46
+ declare function MessageBubble({ message, showAgent, showSources, showConfidence, showVerification, animated, userBubbleClassName, className, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
43
47
 
44
48
  type MessageComposerProps = {
45
- onSend: (content: string) => void;
49
+ onSend: (content: string, attachments?: Attachment[]) => void;
50
+ onStop?: () => void;
46
51
  isLoading?: boolean;
47
52
  placeholder?: string;
48
53
  className?: string;
49
54
  };
50
- declare function MessageComposer({ onSend, isLoading, placeholder, className, }: MessageComposerProps): react_jsx_runtime.JSX.Element;
55
+ declare function MessageComposer({ onSend, onStop, isLoading, placeholder, className, }: MessageComposerProps): react_jsx_runtime.JSX.Element;
51
56
 
52
57
  type WelcomeScreenProps = {
53
58
  title?: string;
54
- message?: string;
59
+ message?: React.ReactNode;
55
60
  icon?: React.ReactNode;
61
+ iconClassName?: string;
56
62
  suggestedQuestions?: string[];
57
63
  onQuestionSelect?: (question: string) => void;
58
64
  className?: string;
59
65
  };
60
- declare function WelcomeScreen({ title, message, icon, suggestedQuestions, onQuestionSelect, className, }: WelcomeScreenProps): react_jsx_runtime.JSX.Element;
66
+ declare function WelcomeScreen({ title, message, icon, iconClassName, suggestedQuestions, onQuestionSelect, className, }: WelcomeScreenProps): react_jsx_runtime.JSX.Element;
61
67
 
62
68
  type ConversationListProps = {
63
69
  conversations: ConversationSummary[];