@vegintech/langchain-react-agent 0.0.13 → 0.0.14

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/dist/index.d.mts CHANGED
@@ -103,6 +103,8 @@ interface SenderCustomizationProps {
103
103
  header?: BaseNode | NodeRender;
104
104
  /** 前缀区域 */
105
105
  prefix?: BaseNode | NodeRender;
106
+ /** 粘贴文件时的回调函数 */
107
+ onPasteFile?: (files: FileList) => void;
106
108
  }
107
109
  /** ChatInput 组件对外暴露的方法 */
108
110
  interface AgentChatInputRef {
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import { Streamdown } from "streamdown";
6
6
  import { HumanMessage } from "@langchain/core/messages";
7
7
  //#region src/components/ChatInput.tsx
8
8
  const slotConfig = [];
9
- const ChatInput = forwardRef(({ onSend, onStop, isLoading = false, disabled = false, placeholder = "输入消息...", className = "", footer, skill: externalSkill, header, prefix }, ref) => {
9
+ const ChatInput = forwardRef(({ onSend, onStop, isLoading = false, disabled = false, placeholder = "输入消息...", className = "", onPasteFile, footer, skill: externalSkill, header, prefix }, ref) => {
10
10
  const senderRef = useRef(null);
11
11
  const [internalSkill, setInternalSkill] = useState(externalSkill);
12
12
  useImperativeHandle(ref, () => ({
@@ -39,6 +39,7 @@ const ChatInput = forwardRef(({ onSend, onStop, isLoading = false, disabled = fa
39
39
  disabled,
40
40
  onSubmit: handleSubmit,
41
41
  onCancel: onStop,
42
+ onPasteFile,
42
43
  autoSize: {
43
44
  minRows: 1,
44
45
  maxRows: 6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vegintech/langchain-react-agent",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "LangChain Agent UI component library for React",
5
5
  "license": "MIT",
6
6
  "files": [