@agents24/chat-react 0.5.28 → 0.5.30

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 (37) hide show
  1. package/README.md +23 -1
  2. package/dist/chunk-INO5DSSJ.js +86 -0
  3. package/dist/chunk-INO5DSSJ.js.map +1 -0
  4. package/dist/registry/agents24-chat.json +249 -0
  5. package/dist/runtime/index.cjs +10 -14
  6. package/dist/runtime/index.cjs.map +1 -1
  7. package/dist/runtime/index.js +12 -85
  8. package/dist/runtime/index.js.map +1 -1
  9. package/dist/runtime/input-contract.d.ts +6 -3
  10. package/dist/scaffold/app.d.ts +2 -0
  11. package/dist/scaffold/components/chat/chat-composer.d.ts +2 -3
  12. package/dist/scaffold/components/chat/theme-menu.d.ts +1 -1
  13. package/dist/scaffold/components/theme-provider.d.ts +2 -1
  14. package/dist/scaffold/index.cjs +44 -106
  15. package/dist/scaffold/index.cjs.map +1 -1
  16. package/dist/scaffold/index.d.ts +2 -0
  17. package/dist/scaffold/index.js +41 -107
  18. package/dist/scaffold/index.js.map +1 -1
  19. package/dist/ui/agent-chat-composer.d.ts +7 -2
  20. package/dist/ui/composer-attachments.d.ts +1 -1
  21. package/dist/ui/index.cjs +688 -539
  22. package/dist/ui/index.cjs.map +1 -1
  23. package/dist/ui/index.d.ts +1 -0
  24. package/dist/ui/index.js +650 -540
  25. package/dist/ui/index.js.map +1 -1
  26. package/dist/ui/use-agent-chat-composer.d.ts +48 -0
  27. package/dist/ui/use-audio-recorder.d.ts +1 -1
  28. package/package.json +10 -6
  29. package/scaffold/inherit.css +4 -0
  30. package/scaffold/src/app.tsx +2 -0
  31. package/scaffold/src/chat.css +24 -0
  32. package/scaffold/src/components/chat/chat-composer.tsx +14 -105
  33. package/scaffold/src/components/chat/chat-shell.tsx +2 -1
  34. package/scaffold/src/components/chat/theme-menu.tsx +3 -1
  35. package/scaffold/src/components/theme-provider.tsx +10 -8
  36. package/scaffold/src/index.css +8 -8
  37. package/scaffold/src/index.tsx +5 -0
@@ -1,5 +1,7 @@
1
1
  import * as React from "react";
2
- import { type AgentChatComposerFile } from "./composer-attachments";
2
+ import type { AgentChatComposerFile } from "./composer-attachments";
3
+ import type { AgentChatInputContract } from "../runtime/input-contract";
4
+ import type { ContextWindow } from "@agents24/client/protocol";
3
5
  export type { AgentChatComposerFile } from "./composer-attachments";
4
6
  export type AgentChatComposerSubmit = {
5
7
  text: string;
@@ -7,6 +9,9 @@ export type AgentChatComposerSubmit = {
7
9
  attachmentIds?: string[];
8
10
  };
9
11
  export type AgentChatComposerProps = {
12
+ inputContract?: AgentChatInputContract | null;
13
+ recordingEnabled?: boolean;
14
+ contextWindow?: ContextWindow | null;
10
15
  accept?: string;
11
16
  allowAttachments?: boolean;
12
17
  attachmentLayout?: "flow" | "overlay";
@@ -28,4 +33,4 @@ export type AgentChatComposerProps = {
28
33
  } | null;
29
34
  textareaRef?: React.Ref<HTMLTextAreaElement>;
30
35
  };
31
- export declare function AgentChatComposer({ accept, allowAttachments, attachmentLayout, className, disabled, forceExpanded, focusKey, inputToolbarContent, isRunning, isCancelling, onAttachmentCountChange, onStop, onSubmit, placeholder, restoredDraft, textareaRef, }: AgentChatComposerProps): import("react/jsx-runtime").JSX.Element;
36
+ export declare function AgentChatComposer({ inputContract, recordingEnabled, contextWindow, accept, allowAttachments, attachmentLayout, className, disabled, forceExpanded, focusKey, inputToolbarContent, isRunning, isCancelling, onAttachmentCountChange, onStop, onSubmit, placeholder, restoredDraft, textareaRef, }: AgentChatComposerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { ChatAttachment } from "../types";
2
- import type { ThreadMessage } from "@agents24/client";
2
+ import { type ThreadMessage } from "@agents24/client";
3
3
  export type AgentChatComposerFile = ChatAttachment & {
4
4
  id: string;
5
5
  type: "file";