@formmy.app/chat 0.0.22 → 0.0.23
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/hooks/use-formmy-chat.js +1 -1
- package/dist/hooks/use-formmy-conversations.js +2 -2
- package/dist/hooks/use-formmy-voice.js +2 -2
- package/dist/index.js +2 -2
- package/dist/react.js +6 -6
- package/dist/ui/chat-bubble.js +1 -1
- package/dist/voice/voice-client.js +1 -1
- package/package.json +2 -2
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
import { useChat } from "@ai-sdk/react";
|
|
25
25
|
import { DefaultChatTransport } from "ai";
|
|
26
26
|
import { useMemo, useCallback, useState, useEffect } from "react";
|
|
27
|
-
import { useFormmy } from "../ui/provider";
|
|
27
|
+
import { useFormmy } from "../ui/provider.js";
|
|
28
28
|
// Session ID storage key prefix
|
|
29
29
|
const SESSION_KEY_PREFIX = "formmy_session_";
|
|
30
30
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback, useRef, useMemo } from "react";
|
|
2
|
-
import { useFormmy } from "../ui/provider";
|
|
3
|
-
import { Formmy } from "../core/client";
|
|
2
|
+
import { useFormmy } from "../ui/provider.js";
|
|
3
|
+
import { Formmy } from "../core/client.js";
|
|
4
4
|
export function useFormmyConversations(agentId) {
|
|
5
5
|
const config = useFormmy();
|
|
6
6
|
const client = useMemo(() => {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
import { useState, useRef, useCallback, useEffect } from "react";
|
|
31
|
-
import { useFormmy } from "../ui/provider";
|
|
32
|
-
import { FormmyVoiceClient } from "../voice/voice-client";
|
|
31
|
+
import { useFormmy } from "../ui/provider.js";
|
|
32
|
+
import { FormmyVoiceClient } from "../voice/voice-client.js";
|
|
33
33
|
export function useFormmyVoice({ agentId, voiceId, sensitivity, systemPrompt, tools, onToolUse, onStatusChange: onStatusChangeCb, onError: onErrorCb, onTranscript: onTranscriptCb, wsUrl, audioDestination, onMicAudio, onServerEvent }) {
|
|
34
34
|
const { publishableKey, baseUrl } = useFormmy();
|
|
35
35
|
const clientRef = useRef(null);
|
package/dist/index.js
CHANGED
package/dist/react.js
CHANGED
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
19
19
|
// Provider & Context
|
|
20
20
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
21
|
-
export { FormmyProvider, useFormmy, useFormmyOptional } from "./ui/provider";
|
|
21
|
+
export { FormmyProvider, useFormmy, useFormmyOptional } from "./ui/provider.js";
|
|
22
22
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
23
23
|
// Hooks
|
|
24
24
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
25
|
-
export { useFormmyChat, getMessageText } from "./hooks/use-formmy-chat";
|
|
26
|
-
export { useFormmyVoice } from "./hooks/use-formmy-voice";
|
|
27
|
-
export { useFormmyConversations } from "./hooks/use-formmy-conversations";
|
|
28
|
-
export { VISEMES } from "./voice/viseme-analyser";
|
|
25
|
+
export { useFormmyChat, getMessageText } from "./hooks/use-formmy-chat.js";
|
|
26
|
+
export { useFormmyVoice } from "./hooks/use-formmy-voice.js";
|
|
27
|
+
export { useFormmyConversations } from "./hooks/use-formmy-conversations.js";
|
|
28
|
+
export { VISEMES } from "./voice/viseme-analyser.js";
|
|
29
29
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
30
30
|
// UI Components
|
|
31
31
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
32
|
-
export { ChatBubble } from "./ui/chat-bubble";
|
|
32
|
+
export { ChatBubble } from "./ui/chat-bubble.js";
|
|
33
33
|
//# sourceMappingURL=react.js.map
|
package/dist/ui/chat-bubble.js
CHANGED
|
@@ -23,7 +23,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
import { useState, useRef, useEffect } from "react";
|
|
26
|
-
import { useFormmyChat, getMessageText } from "../hooks/use-formmy-chat";
|
|
26
|
+
import { useFormmyChat, getMessageText } from "../hooks/use-formmy-chat.js";
|
|
27
27
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
28
28
|
// Styles (inline to avoid external dependencies)
|
|
29
29
|
// ═══════════════════════════════════════════════════════════════════════════
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formmy.app/chat",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.23",
|
|
4
4
|
"description": "Official React SDK for Formmy Chat - AI chatbot widgets and headless hooks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"LICENSE"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build": "tsc",
|
|
26
|
+
"build": "tsc && node -e \"const{readdirSync,readFileSync,writeFileSync,statSync}=require('fs');const{join}=require('path');function fix(d){for(const f of readdirSync(d)){const p=join(d,f);if(statSync(p).isDirectory()){fix(p)}else if(p.endsWith('.js')){writeFileSync(p,readFileSync(p,'utf8').replace(/from \\\"(\\.\\.?\\/[^\\\"]+)\\\"/g,(m,i)=>i.endsWith('.js')?m:\\`from \\\"\\${i}.js\\\"\\`))}}}fix('./dist');\"",
|
|
27
27
|
"dev": "tsc --watch",
|
|
28
28
|
"clean": "rm -rf dist",
|
|
29
29
|
"prepublishOnly": "npm run clean && npm run build"
|