codicent-app-sdk 0.3.80 → 0.3.82

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react"),require("../services/codicent.js"),require("./Markdown.js"),require("./Textarea.js"),require("./Button.js"),require("./Spinner.js"),require("./TextHeader.js"),require("./TypingIndicator.js"),require("./Dialog.js"),require("./ChatInput.js"),require("./CombinedPlaceholderDialog.js"),require("./ChatMessage.js"),require("./Header.js"),require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js");var r=require("../config/index.js");require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("./FileThumbnail.js"),require("./MessageInput.js"),require("./UploadFile.js"),require("./Profile.js"),require("./MessageItem.js"),require("./Content.js"),require("./AiInput.js"),require("./SearchBox.js"),require("./HtmlView.js"),require("./Footer.js"),require("./Page.js"),require("../pages/AppFrame.js"),require("../pages/Snap.js"),require("../pages/Search.js"),require("../pages/Login.js"),require("../pages/CrmPage.js"),require("../pages/ImageView.js"),require("../pages/FormInvite.js"),require("../pages/FormAccept.js"),require("../pages/Sales.js"),require("../stores/chatStore.js");var s=require("../hooks/useLocalization.js");require("../hooks/useAppStyles.js");var i=require("../node_modules/@griffel/react/makeStyles.esm.js"),o=require("../node_modules/@griffel/core/index.esm.js"),n=require("../node_modules/@fluentui/tokens/lib/tokens.js"),t=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-8.js"),a=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-3.js"),l=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-10.js");const u=i.makeStyles({footer:{...o.shorthands.padding("14px"),backgroundColor:r.getConfigValue("APP_HEADER_COLOR")||n.tokens.colorBrandBackground,color:r.getConfigValue("APP_HEADER_TEXT_COLOR")||n.tokens.colorNeutralForegroundOnBrand,textAlign:"center",display:"flex",justifyContent:"space-around",alignItems:"center",position:"sticky",bottom:0,zIndex:1e3,paddingBottom:"22px",width:"100%"},container:{display:"flex",justifyContent:"space-around",alignItems:"center",maxWidth:"480px",width:"100%"},button:{color:n.tokens.colorNeutralForegroundOnBrand,height:"24px",width:"24px",...o.shorthands.borderWidth("0")},link:{textDecoration:"none",color:"inherit","&.selected":{border:"none"},"&:hover":{textDecoration:"none"},minWidth:"48px"},buttonText:{fontSize:"12px"}});exports.default=({onHome:r,onTakePhoto:i,onSwichCamera:o,audio:n,tag:c})=>{const d=u(),{isRecording:j,isSoundCaptured:q,startRecording:m,stopRecording:p}=n,{t:g}=s.default();return e.jsx("footer",{className:d.footer,children:e.jsxs("div",{className:d.container,children:[e.jsxs("div",{className:d.link,onClick:r,children:[e.jsx(t.Home24Regular,{}),e.jsx("p",{className:d.buttonText,children:g("Hem")})]}),e.jsxs("div",{className:d.link,children:[j&&q&&e.jsx(l.MicPulse24Filled,{onClick:p}),j&&!q&&e.jsx(l.MicRecord24Filled,{onClick:p}),!j&&e.jsx(l.Mic24Regular,{onClick:()=>m(c)}),e.jsx("p",{className:d.buttonText,children:g("Ljud")})]}),e.jsxs("div",{className:d.link,onClick:()=>{j?(p(),i(),m(c)):i()},children:[e.jsx(a.Camera24Regular,{}),e.jsx("p",{className:d.buttonText,children:g("Ta kort")})]}),e.jsxs("div",{className:d.link,onClick:o,children:[e.jsx(a.CameraSwitch24Regular,{}),e.jsx("p",{className:d.buttonText,children:g("Byt kamera")})]})]})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("react"),require("../services/codicent.js"),require("./Markdown.js"),require("./Textarea.js"),require("./Button.js"),require("./Spinner.js"),require("./TextHeader.js"),require("./TypingIndicator.js"),require("./Dialog.js"),require("./ChatInput.js"),require("./CombinedPlaceholderDialog.js"),require("./ChatMessage.js"),require("./Header.js"),require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_virtual/index.js");var r=require("../config/index.js");require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),require("./FileThumbnail.js"),require("./MessageInput.js"),require("./UploadFile.js"),require("./Profile.js"),require("./MessageItem.js"),require("./Content.js"),require("./AiInput.js"),require("./SearchBox.js"),require("./HtmlView.js"),require("./Footer.js"),require("./Page.js"),require("../pages/AppFrame.js"),require("../pages/Snap.js"),require("../pages/Search.js"),require("../pages/Login.js"),require("../pages/CrmPage.js"),require("../pages/ImageView.js"),require("../pages/FormInvite.js"),require("../pages/FormAccept.js"),require("../pages/Sales.js"),require("../stores/chatStore.js");var s=require("../hooks/useLocalization.js");require("../hooks/useAppStyles.js");var i=require("../node_modules/@griffel/react/makeStyles.esm.js"),o=require("../node_modules/@griffel/core/index.esm.js"),n=require("../node_modules/@fluentui/tokens/lib/tokens.js"),t=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-8.js"),a=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-3.js"),l=require("../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-10.js");const u=i.makeStyles({footer:{...o.shorthands.padding("14px"),backgroundColor:r.getConfigValue("APP_HEADER_COLOR")||n.tokens.colorBrandBackground,color:r.getConfigValue("APP_HEADER_TEXT_COLOR")||n.tokens.colorNeutralForegroundOnBrand,textAlign:"center",display:"flex",justifyContent:"space-around",alignItems:"center",position:"sticky",bottom:0,zIndex:1e3,paddingBottom:"22px",width:"100%"},container:{display:"flex",justifyContent:"space-around",alignItems:"center",maxWidth:"480px",width:"100%"},button:{color:n.tokens.colorNeutralForegroundOnBrand,height:"24px",width:"24px",...o.shorthands.borderWidth("0")},link:{textDecoration:"none",color:"inherit","&.selected":{border:"none"},"&:hover":{textDecoration:"none"},minWidth:"48px"},buttonText:{fontSize:"12px"}});exports.default=({onHome:i,onTakePhoto:o,onSwichCamera:n,audio:c,tag:d})=>{const j=u(),{isRecording:q,isSoundCaptured:g,startRecording:m,stopRecording:p}=c,{t:x}=s.default();return e.jsx("footer",{className:j.footer,children:e.jsxs("div",{className:j.container,children:[e.jsxs("div",{className:j.link,onClick:i,children:[e.jsx(t.Home24Regular,{}),e.jsx("p",{className:j.buttonText,children:x("Hem")})]}),e.jsxs("div",{className:j.link,children:[q&&g&&e.jsx(l.MicPulse24Filled,{onClick:p}),q&&!g&&e.jsx(l.MicRecord24Filled,{onClick:p}),!q&&e.jsx(l.Mic24Regular,{onClick:()=>m(d)}),e.jsx("p",{className:j.buttonText,children:x("Ljud")})]}),e.jsxs("div",{className:j.link,onClick:()=>{r.getConfigValue("RESTART_AUDIO_ON_TAKE_PHOTO")&&q?(p(),o(),m(d)):o()},children:[e.jsx(a.Camera24Regular,{}),e.jsx("p",{className:j.buttonText,children:x("Ta kort")})]}),e.jsxs("div",{className:j.link,onClick:n,children:[e.jsx(a.CameraSwitch24Regular,{}),e.jsx("p",{className:j.buttonText,children:x("Byt kamera")})]})]})})};
@@ -120,6 +120,7 @@ export interface AppConfigOptions {
120
120
  LOGIN_LOGO_URL: string | undefined;
121
121
  HIDE_CHAT_ADD_FILE_BUTTON: boolean;
122
122
  FORM_ACCEPT_MARKDOWN: undefined | string;
123
+ RESTART_AUDIO_ON_TAKE_PHOTO: boolean;
123
124
  }
124
125
  export declare function getConfigValue<K extends keyof AppConfigOptions>(key: K): AppConfigOptions[K];
125
126
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;;IAKpB,iBAAiB,EAAE,MAAM,CAAM;IAC/B,2BAA2B,EAAE,MAAM,CAAM;IACzC,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAA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AE,MAAM,GAAG,SAAS,CAAC;IACnC,yBAAyB,EAAE,OAAO,CAAC;IACnC,oBAAoB,EAAE,SAAS,GAAG,MAAM,CAAC;IACzC,2BAA2B,EAAE,OAAO,CAAC;CACtC;AAuHD,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,gBAAgB,EAC7D,GAAG,EAAE,CAAC,GACL,gBAAgB,CAAC,CAAC,CAAC,CAGrB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM,QAUtE"}
@@ -1 +1 @@
1
- "use strict";var _=require("../node_modules/mermaid/dist/mermaid.core.js");class O{constructor(){this.CHAT_INSTRUCTIONS="",this.REALTIME_VOICE_INSTRUCTIONS="",this.apps={}}}const T={LOGIN_REDIRECT:!1,ABOUT_TEXT:"Codicent APP SDK",ANONYMOUS_CODICENT:void 0,ANONYMOUS_TOKEN:void 0,API_BASE_URL:"https://codicent.com/",APP_BUTTONS:void 0,APP_CHAT_TEXT_PLACEHOLDER:void 0,APP_CHAT_TITLE:void 0,APP_CONFIG:new O,APP_FOOTER_COLOR:void 0,APP_FOOTER_SELECTED_COLOR:void 0,APP_FOOTER_TEXT_COLOR:void 0,APP_HEADER_COLOR:void 0,APP_HEADER_ICON_URL:void 0,APP_HEADER_TEXT_COLOR:void 0,APP_ICON_URL:void 0,APP_LOG_CODICENT:"",APP_LOG_TOKEN:"",APP_LOGBOOK_TITLE:void 0,APP_MENU_TITLE:void 0,APP_NAME:void 0,APP_PREFIX:void 0,APP_SAVE_TITLE:void 0,APP_SEARCH_TITLE:void 0,APP_SLOGAN:void 0,APP_SPLASH_TEXT:void 0,APP_SPLASH_URL:void 0,APP_TEMPLATE:"",APP_TITLE:void 0,AUTH_REDIRECT_URL:void 0,AUTH0_AUDIENCE:"https://codicent.com/api",AUTH0_CLIENT_ID:"80STzWmmzN3Tgf76HgFRyv54keYmvnaw",AUTH0_DOMAIN:"auth.codicent.com",AUTH0_PROVIDER_SCOPE:"read:current_user update:current_user_metadata openid profile email",AUTH0_SCOPE:"read:current_user",AUTH0_USER_DOMAIN:void 0,BUTTON_ACTIVE_COLOR:void 0,BUTTON_BACKGROUND_COLOR:void 0,BUTTON_BORDER_RADIUS:void 0,BUTTON_HOVER_COLOR:void 0,BUTTON_TAG:"app-button",BUTTON_TEXT_COLOR:void 0,CHAT_BACKGROUND_IMAGE_URL:void 0,CHAT_BOT_BACKGROUND_COLOR:void 0,CHAT_BOT_TEXT_COLOR:void 0,CHAT_INSTRUCTIONS:void 0,CHAT_USER_BACKGROUND_COLOR:void 0,CHAT_USER_TEXT_COLOR:void 0,CHAT_WELCOME:"Welcome",COMPOSE_BACKGROUND_IMAGE_URL:void 0,COMPOSE_HIDE_LOCATION:void 0,COMPOSE_SIMPLE_ATTACH_FILE:void 0,DEFAULT_LANGUAGE:"en",HIDE_CHAT_BUTTON:!1,HIDE_MENU_BUTTON:!1,HIDE_REGISTER_BUTTON:!1,HIDE_SAVE_BUTTON:!1,HOME_BACKGROUND_IMAGE_URL:void 0,INDEX_TITLE:void 0,LOGBOOK_TAG_DEFINITIONS:{},LOGBOOK_TAGS:"[]",MENU_BACKGROUND_IMAGE_URL:void 0,MESSAGE_HIDE_BAR:!1,MODULE_VOICE:!1,PUBLIC_FLOW_CODICENT:void 0,REALTIME_VOICE_API_KEY:"",SEND_BUTTON_ROUND_BACKGROUND:!1,SHOW_CANVAS_BUTTON:!1,SHOW_CHAT_PROMPTS:!1,SHOW_HELP_BUTTON:!1,SHOW_LOGBOOK_BUTTON:!1,SHOW_MICROPHONE_BUTTON:!1,SHOW_SETTINGS_BUTTON:!1,SHOW_SNAP_BUTTON:!1,SHOW_VOICE_BUTTON:!1,STRIP_CUSTOMER_PORTAL:"",STRIPE_PRICE_ID:"",STRIPE_PUBLIC_KEY:"",SUBSCRIPTION_NEEDED:!1,THEME_WELCOME:void 0,USER_PREFIX:void 0,WELCOME_STATUS_PROMPT:"",SHOW_SEND_BUTTON_TEXT:!1,SHOW_SAVE_BUTTON_TEXT:!1,FORM_BACKGROUND_IMAGE_URL:void 0,AUTO_TRANSLATE:!0,FORCE_LANGUAGE:void 0,LOGIN_WELCOME_TEXT:void 0,LOGIN_HIDE_WELCOME:!1,LOGIN_LOGO_URL:void 0,HIDE_CHAT_ADD_FILE_BUTTON:!1,FORM_ACCEPT_MARKDOWN:void 0};const E=function(_){return new Proxy(_,{get:(_,O,T)=>Reflect.get(_,O,T)})}(T);exports.AppConfig=O,exports.getConfigValue=function(_){return E[_]},exports.initCodicentApp=function(O={}){for(const[_,E]of Object.entries(O))void 0!==E&&(T[_]=E);_.default.initialize({startOnLoad:!1})};
1
+ "use strict";var _=require("../node_modules/mermaid/dist/mermaid.core.js");class O{constructor(){this.CHAT_INSTRUCTIONS="",this.REALTIME_VOICE_INSTRUCTIONS="",this.apps={}}}const T={LOGIN_REDIRECT:!1,ABOUT_TEXT:"Codicent APP SDK",ANONYMOUS_CODICENT:void 0,ANONYMOUS_TOKEN:void 0,API_BASE_URL:"https://codicent.com/",APP_BUTTONS:void 0,APP_CHAT_TEXT_PLACEHOLDER:void 0,APP_CHAT_TITLE:void 0,APP_CONFIG:new O,APP_FOOTER_COLOR:void 0,APP_FOOTER_SELECTED_COLOR:void 0,APP_FOOTER_TEXT_COLOR:void 0,APP_HEADER_COLOR:void 0,APP_HEADER_ICON_URL:void 0,APP_HEADER_TEXT_COLOR:void 0,APP_ICON_URL:void 0,APP_LOG_CODICENT:"",APP_LOG_TOKEN:"",APP_LOGBOOK_TITLE:void 0,APP_MENU_TITLE:void 0,APP_NAME:void 0,APP_PREFIX:void 0,APP_SAVE_TITLE:void 0,APP_SEARCH_TITLE:void 0,APP_SLOGAN:void 0,APP_SPLASH_TEXT:void 0,APP_SPLASH_URL:void 0,APP_TEMPLATE:"",APP_TITLE:void 0,AUTH_REDIRECT_URL:void 0,AUTH0_AUDIENCE:"https://codicent.com/api",AUTH0_CLIENT_ID:"80STzWmmzN3Tgf76HgFRyv54keYmvnaw",AUTH0_DOMAIN:"auth.codicent.com",AUTH0_PROVIDER_SCOPE:"read:current_user update:current_user_metadata openid profile email",AUTH0_SCOPE:"read:current_user",AUTH0_USER_DOMAIN:void 0,BUTTON_ACTIVE_COLOR:void 0,BUTTON_BACKGROUND_COLOR:void 0,BUTTON_BORDER_RADIUS:void 0,BUTTON_HOVER_COLOR:void 0,BUTTON_TAG:"app-button",BUTTON_TEXT_COLOR:void 0,CHAT_BACKGROUND_IMAGE_URL:void 0,CHAT_BOT_BACKGROUND_COLOR:void 0,CHAT_BOT_TEXT_COLOR:void 0,CHAT_INSTRUCTIONS:void 0,CHAT_USER_BACKGROUND_COLOR:void 0,CHAT_USER_TEXT_COLOR:void 0,CHAT_WELCOME:"Welcome",COMPOSE_BACKGROUND_IMAGE_URL:void 0,COMPOSE_HIDE_LOCATION:void 0,COMPOSE_SIMPLE_ATTACH_FILE:void 0,DEFAULT_LANGUAGE:"en",HIDE_CHAT_BUTTON:!1,HIDE_MENU_BUTTON:!1,HIDE_REGISTER_BUTTON:!1,HIDE_SAVE_BUTTON:!1,HOME_BACKGROUND_IMAGE_URL:void 0,INDEX_TITLE:void 0,LOGBOOK_TAG_DEFINITIONS:{},LOGBOOK_TAGS:"[]",MENU_BACKGROUND_IMAGE_URL:void 0,MESSAGE_HIDE_BAR:!1,MODULE_VOICE:!1,PUBLIC_FLOW_CODICENT:void 0,REALTIME_VOICE_API_KEY:"",SEND_BUTTON_ROUND_BACKGROUND:!1,SHOW_CANVAS_BUTTON:!1,SHOW_CHAT_PROMPTS:!1,SHOW_HELP_BUTTON:!1,SHOW_LOGBOOK_BUTTON:!1,SHOW_MICROPHONE_BUTTON:!1,SHOW_SETTINGS_BUTTON:!1,SHOW_SNAP_BUTTON:!1,SHOW_VOICE_BUTTON:!1,STRIP_CUSTOMER_PORTAL:"",STRIPE_PRICE_ID:"",STRIPE_PUBLIC_KEY:"",SUBSCRIPTION_NEEDED:!1,THEME_WELCOME:void 0,USER_PREFIX:void 0,WELCOME_STATUS_PROMPT:"",SHOW_SEND_BUTTON_TEXT:!1,SHOW_SAVE_BUTTON_TEXT:!1,FORM_BACKGROUND_IMAGE_URL:void 0,AUTO_TRANSLATE:!0,FORCE_LANGUAGE:void 0,LOGIN_WELCOME_TEXT:void 0,LOGIN_HIDE_WELCOME:!1,LOGIN_LOGO_URL:void 0,HIDE_CHAT_ADD_FILE_BUTTON:!1,FORM_ACCEPT_MARKDOWN:void 0,RESTART_AUDIO_ON_TAKE_PHOTO:!1};const E=function(_){return new Proxy(_,{get:(_,O,T)=>Reflect.get(_,O,T)})}(T);exports.AppConfig=O,exports.getConfigValue=function(_){return E[_]},exports.initCodicentApp=function(O={}){for(const[_,E]of Object.entries(O))void 0!==E&&(T[_]=E);_.default.initialize({startOnLoad:!1})};
@@ -1 +1 @@
1
- "use strict";var e=require("react"),t=require("../stores/chatStore.js");require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js");var s=require("../utils/logging.js");require("react/jsx-runtime"),require("../_virtual/index.js"),require("../config/index.js"),require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),exports.useChat=function(r){const[a,o]=e.useState(t.chatStore.getState()),{service:n}=r;e.useEffect((()=>t.chatStore.subscribe(o)),[n]);const i=e.useCallback((async()=>{const e=t.chatStore.getConversationId();if(e){console.log("Reloading chat history to check for missed messages...");try{const r=await n.getChatHistory(e),a=t.chatStore.getMessages();return r.length>a.length?(console.log(`Found ${r.length-a.length} missed messages, updating chat...`),t.chatStore.reset(),r.forEach(((e,s)=>{const r={id:e.id,sender:s%2==0?"user":"bot",content:e.content};t.chatStore.addMessage(r)})),t.chatStore.setConversationId(e),s.default("chat-history-reloaded"),!0):(console.log("No missed messages found"),!1)}catch(e){return console.error("Failed to reload chat history:",e),!1}}return!1}),[n]),c=e.useCallback(((e,r=0)=>{if(""===e.trim())return;const o=`$user-msg-${Date.now()}`,l={id:o,sender:"user",content:e},d=a.messages.length>0?a.messages[a.messages.length-1].id:void 0;t.chatStore.addMessage(l),t.chatStore.setBotTyping(!0),s.default("chat-send");const u=Promise.race([n.chat(e,d),new Promise(((e,t)=>{setTimeout((()=>t(new Error("Request timeout - please try again"))),3e4)}))]).then((e=>{const{id:r,content:a}=e,o={id:r,sender:"bot",content:a,isNew:!0};t.chatStore.setConversationId(r),t.chatStore.addMessage(o),t.chatStore.setBotTyping(!1),s.default("chat-receive"),a.startsWith("Error code: ")&&s.default("chat-error: "+a)})).catch((async a=>{console.error("Chat error details:",{error:a,message:a?.message,name:a?.name,stack:a?.stack,tempId:o,lastMessageId:d,retryCount:r,timestamp:(new Date).toISOString()});if(0===r&&("AbortError"===a?.name||a?.message?.includes("timeout")||a?.message?.includes("Failed to fetch")||a?.message?.includes("NetworkError")))return console.log("Auto-retrying chat request..."),t.chatStore.removeMessage(o),t.chatStore.setBotTyping(!1),void setTimeout((()=>c(e,r+1)),2e3);function l(){let e="An error occurred while sending the message. Please try again.";if(n.onUnauthorized&&a?.toString().includes("401"))return alert("Session expired. Please log in again."),void n.onUnauthorized();"AbortError"===a?.name||a?.message?.includes("timeout")?(e="Request timed out. Please check your connection and try again.",s.default("chat-timeout")):a?.message?.includes("HTTP error: 500")?(e="Server error. Please try again in a moment.",s.default("chat-server-error")):(a?.message?.includes("Failed to fetch")||a?.message?.includes("NetworkError"))&&(e="Network error. Please check your connection and try again.",s.default("chat-network-error")),alert(e),t.chatStore.removeMessage(o),t.chatStore.setBotTyping(!1),s.default("chat-error")}"AbortError"===a?.name||a?.message?.includes("timeout")||a?.message?.includes("Failed to fetch")||a?.message?.includes("NetworkError")||a?.message?.includes("WebSocket")||a?.message?.includes("SignalR")||a?.message?.includes("Connection")?(console.log("Potential SignalR/connection issue detected, checking for missed messages..."),setTimeout((async()=>{if(await i())return t.chatStore.removeMessage(o),t.chatStore.setBotTyping(!1),console.log("Recovered missed message(s) from server"),void s.default("chat-recovered");l()}),2e3)):l()}));t.chatStore.addPendingRequest(o,u)}),[n,a.messages,i]),l=e.useCallback((()=>{t.chatStore.reset(),t.chatStore.clearMessages(),s.default("new-chat")}),[]),d=e.useCallback((e=>{t.chatStore.reset(),t.chatStore.clearMessages(),s.default("open-chat"),n.getChatHistory(e).then((e=>{e.forEach(((e,s)=>{const r={id:e.id,sender:s%2==0?"user":"bot",content:e.content};t.chatStore.addMessage(r)}))}))}),[n]);return{messages:a.messages,isBotTyping:a.isBotTyping,handleSend:c,newChat:l,openChat:d,reloadChatHistory:i}};
1
+ "use strict";var e=require("react"),t=require("../stores/chatStore.js");require("../utils/MessageContent.js"),require("../node_modules/tinycolor2/esm/tinycolor.js");var s=require("../utils/logging.js");require("react/jsx-runtime"),require("../_virtual/index.js"),require("../config/index.js"),require("../lib/wavtools/lib/wav_packer.js"),require("../lib/wavtools/lib/analysis/audio_analysis.js"),require("../lib/wavtools/lib/wav_stream_player.js"),require("../lib/wavtools/lib/wav_recorder.js"),exports.useChat=function(r){const[o,a]=e.useState(t.chatStore.getState()),{service:n}=r;e.useEffect((()=>t.chatStore.subscribe(a)),[n]);const i=e.useCallback((async()=>{const e=t.chatStore.getConversationId();if(e){console.log("Reloading chat history to check for missed messages...");try{const r=await n.getChatHistory(e),o=t.chatStore.getMessages();return r.length>o.length?(console.log(`Found ${r.length-o.length} missed messages, updating chat...`),t.chatStore.reset(),r.forEach(((e,s)=>{const r={id:e.id,sender:s%2==0?"user":"bot",content:e.content};t.chatStore.addMessage(r)})),t.chatStore.setConversationId(e),s.default("chat-history-reloaded"),!0):(console.log("No missed messages found"),!1)}catch(e){return console.error("Failed to reload chat history:",e),!1}}return!1}),[n]),c=e.useCallback(((e,r=0)=>{if(""===e.trim())return;const a=`$user-msg-${Date.now()}`,l={id:a,sender:"user",content:e},d=o.messages.length>0?o.messages[o.messages.length-1].id:void 0;t.chatStore.addMessage(l),t.chatStore.setBotTyping(!0),s.default("chat-send");const u=Promise.race([n.chat(e,d),new Promise(((e,t)=>{setTimeout((()=>t(new Error("Request timeout - please try again"))),3e4)}))]).then((e=>{const{id:r,content:o}=e,a={id:r,sender:"bot",content:o,isNew:!0};t.chatStore.setConversationId(r),t.chatStore.addMessage(a),t.chatStore.setBotTyping(!1),s.default("chat-receive"),o.startsWith("Error code: ")&&s.default("chat-error: "+o)})).catch((async o=>{console.error("Chat error details:",{error:o,message:o?.message,name:o?.name,stack:o?.stack,tempId:a,lastMessageId:d,retryCount:r,timestamp:(new Date).toISOString()});if(0===r&&("AbortError"===o?.name||o?.message?.includes("timeout")||o?.message?.includes("Failed to fetch")||o?.message?.includes("NetworkError")))return console.log("Auto-retrying chat request..."),t.chatStore.removeMessage(a),t.chatStore.setBotTyping(!1),void setTimeout((()=>c(e,r+1)),2e3);function l(){let e="An error occurred while sending the message. Please try again.";if(n.onUnauthorized&&o?.toString().includes("401"))return alert("Session expired. Please log in again."),void n.onUnauthorized();"AbortError"===o?.name||o?.message?.includes("timeout")?(e="Request timed out. Please check your connection and try again.",s.default("chat-timeout")):o?.message?.includes("HTTP error: 500")?(e="Server error. Please try again in a moment.",s.default("chat-server-error")):(o?.message?.includes("Failed to fetch")||o?.message?.includes("NetworkError"))&&(e="Network error. Please check your connection and try again.",s.default("chat-network-error")),console.warn(e),t.chatStore.removeMessage(a),t.chatStore.setBotTyping(!1),s.default("chat-error")}"AbortError"===o?.name||o?.message?.includes("timeout")||o?.message?.includes("Failed to fetch")||o?.message?.includes("NetworkError")||o?.message?.includes("WebSocket")||o?.message?.includes("SignalR")||o?.message?.includes("Connection")?(console.log("Potential SignalR/connection issue detected, checking for missed messages..."),setTimeout((async()=>{if(await i())return t.chatStore.removeMessage(a),t.chatStore.setBotTyping(!1),console.log("Recovered missed message(s) from server"),void s.default("chat-recovered");l()}),2e3)):l()}));t.chatStore.addPendingRequest(a,u)}),[n,o.messages,i]),l=e.useCallback((()=>{t.chatStore.reset(),t.chatStore.clearMessages(),s.default("new-chat")}),[]),d=e.useCallback((e=>{t.chatStore.reset(),t.chatStore.clearMessages(),s.default("open-chat"),n.getChatHistory(e).then((e=>{e.forEach(((e,s)=>{const r={id:e.id,sender:s%2==0?"user":"bot",content:e.content};t.chatStore.addMessage(r)}))}))}),[n]);return{messages:o.messages,isBotTyping:o.isBotTyping,handleSend:c,newChat:l,openChat:d,reloadChatHistory:i}};
@@ -1 +1 @@
1
- import{jsx as o,jsxs as e}from"react/jsx-runtime";import"react";import"../services/codicent.js";import"./Markdown.js";import"./Textarea.js";import"./Button.js";import"./Spinner.js";import"./TextHeader.js";import"./TypingIndicator.js";import"./Dialog.js";import"./ChatInput.js";import"./CombinedPlaceholderDialog.js";import"./ChatMessage.js";import"./Header.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import{getConfigValue as t}from"../config/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import"./FileThumbnail.js";import"./MessageInput.js";import"./UploadFile.js";import"./Profile.js";import"./MessageItem.js";import"./Content.js";import"./AiInput.js";import"./SearchBox.js";import"./HtmlView.js";import"./Footer.js";import"./Page.js";import"../pages/AppFrame.js";import"../pages/Snap.js";import"../pages/Search.js";import"../pages/Login.js";import"../pages/CrmPage.js";import"../pages/ImageView.js";import"../pages/FormInvite.js";import"../pages/FormAccept.js";import"../pages/Sales.js";import"../stores/chatStore.js";import i from"../hooks/useLocalization.js";import"../hooks/useAppStyles.js";import{makeStyles as r}from"../node_modules/@griffel/react/makeStyles.esm.js";import{shorthands as s}from"../node_modules/@griffel/core/index.esm.js";import{tokens as n}from"../node_modules/@fluentui/tokens/lib/tokens.js";import{Home24Regular as a}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-8.js";import{Camera24Regular as m,CameraSwitch24Regular as l}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-3.js";import{MicPulse24Filled as p,MicRecord24Filled as c,Mic24Regular as d}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-10.js";const j=r({footer:{...s.padding("14px"),backgroundColor:t("APP_HEADER_COLOR")||n.colorBrandBackground,color:t("APP_HEADER_TEXT_COLOR")||n.colorNeutralForegroundOnBrand,textAlign:"center",display:"flex",justifyContent:"space-around",alignItems:"center",position:"sticky",bottom:0,zIndex:1e3,paddingBottom:"22px",width:"100%"},container:{display:"flex",justifyContent:"space-around",alignItems:"center",maxWidth:"480px",width:"100%"},button:{color:n.colorNeutralForegroundOnBrand,height:"24px",width:"24px",...s.borderWidth("0")},link:{textDecoration:"none",color:"inherit","&.selected":{border:"none"},"&:hover":{textDecoration:"none"},minWidth:"48px"},buttonText:{fontSize:"12px"}}),u=({onHome:t,onTakePhoto:r,onSwichCamera:s,audio:n,tag:u})=>{const g=j(),{isRecording:h,isSoundCaptured:f,startRecording:k,stopRecording:x}=n,{t:b}=i();return o("footer",{className:g.footer,children:e("div",{className:g.container,children:[e("div",{className:g.link,onClick:t,children:[o(a,{}),o("p",{className:g.buttonText,children:b("Hem")})]}),e("div",{className:g.link,children:[h&&f&&o(p,{onClick:x}),h&&!f&&o(c,{onClick:x}),!h&&o(d,{onClick:()=>k(u)}),o("p",{className:g.buttonText,children:b("Ljud")})]}),e("div",{className:g.link,onClick:()=>{h?(x(),r(),k(u)):r()},children:[o(m,{}),o("p",{className:g.buttonText,children:b("Ta kort")})]}),e("div",{className:g.link,onClick:s,children:[o(l,{}),o("p",{className:g.buttonText,children:b("Byt kamera")})]})]})})};export{u as default};
1
+ import{jsx as o,jsxs as e}from"react/jsx-runtime";import"react";import"../services/codicent.js";import"./Markdown.js";import"./Textarea.js";import"./Button.js";import"./Spinner.js";import"./TextHeader.js";import"./TypingIndicator.js";import"./Dialog.js";import"./ChatInput.js";import"./CombinedPlaceholderDialog.js";import"./ChatMessage.js";import"./Header.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import"../_virtual/index.js";import{getConfigValue as t}from"../config/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";import"./FileThumbnail.js";import"./MessageInput.js";import"./UploadFile.js";import"./Profile.js";import"./MessageItem.js";import"./Content.js";import"./AiInput.js";import"./SearchBox.js";import"./HtmlView.js";import"./Footer.js";import"./Page.js";import"../pages/AppFrame.js";import"../pages/Snap.js";import"../pages/Search.js";import"../pages/Login.js";import"../pages/CrmPage.js";import"../pages/ImageView.js";import"../pages/FormInvite.js";import"../pages/FormAccept.js";import"../pages/Sales.js";import"../stores/chatStore.js";import i from"../hooks/useLocalization.js";import"../hooks/useAppStyles.js";import{makeStyles as r}from"../node_modules/@griffel/react/makeStyles.esm.js";import{shorthands as s}from"../node_modules/@griffel/core/index.esm.js";import{tokens as n}from"../node_modules/@fluentui/tokens/lib/tokens.js";import{Home24Regular as a}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-8.js";import{Camera24Regular as m,CameraSwitch24Regular as l}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-3.js";import{MicPulse24Filled as p,MicRecord24Filled as c,Mic24Regular as d}from"../node_modules/@fluentui/react-icons/lib/sizedIcons/chunk-10.js";const j=r({footer:{...s.padding("14px"),backgroundColor:t("APP_HEADER_COLOR")||n.colorBrandBackground,color:t("APP_HEADER_TEXT_COLOR")||n.colorNeutralForegroundOnBrand,textAlign:"center",display:"flex",justifyContent:"space-around",alignItems:"center",position:"sticky",bottom:0,zIndex:1e3,paddingBottom:"22px",width:"100%"},container:{display:"flex",justifyContent:"space-around",alignItems:"center",maxWidth:"480px",width:"100%"},button:{color:n.colorNeutralForegroundOnBrand,height:"24px",width:"24px",...s.borderWidth("0")},link:{textDecoration:"none",color:"inherit","&.selected":{border:"none"},"&:hover":{textDecoration:"none"},minWidth:"48px"},buttonText:{fontSize:"12px"}}),u=({onHome:r,onTakePhoto:s,onSwichCamera:n,audio:u,tag:g})=>{const h=j(),{isRecording:f,isSoundCaptured:k,startRecording:x,stopRecording:b}=u,{t:_}=i();return o("footer",{className:h.footer,children:e("div",{className:h.container,children:[e("div",{className:h.link,onClick:r,children:[o(a,{}),o("p",{className:h.buttonText,children:_("Hem")})]}),e("div",{className:h.link,children:[f&&k&&o(p,{onClick:b}),f&&!k&&o(c,{onClick:b}),!f&&o(d,{onClick:()=>x(g)}),o("p",{className:h.buttonText,children:_("Ljud")})]}),e("div",{className:h.link,onClick:()=>{t("RESTART_AUDIO_ON_TAKE_PHOTO")&&f?(b(),s(),x(g)):s()},children:[o(m,{}),o("p",{className:h.buttonText,children:_("Ta kort")})]}),e("div",{className:h.link,onClick:n,children:[o(l,{}),o("p",{className:h.buttonText,children:_("Byt kamera")})]})]})})};export{u as default};
@@ -120,6 +120,7 @@ export interface AppConfigOptions {
120
120
  LOGIN_LOGO_URL: string | undefined;
121
121
  HIDE_CHAT_ADD_FILE_BUTTON: boolean;
122
122
  FORM_ACCEPT_MARKDOWN: undefined | string;
123
+ RESTART_AUDIO_ON_TAKE_PHOTO: boolean;
123
124
  }
124
125
  export declare function getConfigValue<K extends keyof AppConfigOptions>(key: K): AppConfigOptions[K];
125
126
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAGA,qBAAa,SAAS;;IAKpB,iBAAiB,EAAE,MAAM,CAAM;IAC/B,2BAA2B,EAAE,MAAM,CAAM;IACzC,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,OAAO,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,GAAG,EAAE,MAAM,CAAA;aAAE,EAAE,CAAC;YAC1C,KAAK,EAAE;gBAAE,EAAE,EAAE,MAAM,CAAC;gBAAC,KAAK,EAAE,MAAM,CAAC;gBAAC,OAAO,EAAE,M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D,GAAG,EAAE,CAAC,GACL,gBAAgB,CAAC,CAAC,CAAC,CAGrB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAE,OAAO,CAAC,gBAAgB,CAAM,QAUtE"}
@@ -1 +1 @@
1
- import _ from"../node_modules/mermaid/dist/mermaid.core.js";class O{constructor(){this.CHAT_INSTRUCTIONS="",this.REALTIME_VOICE_INSTRUCTIONS="",this.apps={}}}const T={LOGIN_REDIRECT:!1,ABOUT_TEXT:"Codicent APP SDK",ANONYMOUS_CODICENT:void 0,ANONYMOUS_TOKEN:void 0,API_BASE_URL:"https://codicent.com/",APP_BUTTONS:void 0,APP_CHAT_TEXT_PLACEHOLDER:void 0,APP_CHAT_TITLE:void 0,APP_CONFIG:new O,APP_FOOTER_COLOR:void 0,APP_FOOTER_SELECTED_COLOR:void 0,APP_FOOTER_TEXT_COLOR:void 0,APP_HEADER_COLOR:void 0,APP_HEADER_ICON_URL:void 0,APP_HEADER_TEXT_COLOR:void 0,APP_ICON_URL:void 0,APP_LOG_CODICENT:"",APP_LOG_TOKEN:"",APP_LOGBOOK_TITLE:void 0,APP_MENU_TITLE:void 0,APP_NAME:void 0,APP_PREFIX:void 0,APP_SAVE_TITLE:void 0,APP_SEARCH_TITLE:void 0,APP_SLOGAN:void 0,APP_SPLASH_TEXT:void 0,APP_SPLASH_URL:void 0,APP_TEMPLATE:"",APP_TITLE:void 0,AUTH_REDIRECT_URL:void 0,AUTH0_AUDIENCE:"https://codicent.com/api",AUTH0_CLIENT_ID:"80STzWmmzN3Tgf76HgFRyv54keYmvnaw",AUTH0_DOMAIN:"auth.codicent.com",AUTH0_PROVIDER_SCOPE:"read:current_user update:current_user_metadata openid profile email",AUTH0_SCOPE:"read:current_user",AUTH0_USER_DOMAIN:void 0,BUTTON_ACTIVE_COLOR:void 0,BUTTON_BACKGROUND_COLOR:void 0,BUTTON_BORDER_RADIUS:void 0,BUTTON_HOVER_COLOR:void 0,BUTTON_TAG:"app-button",BUTTON_TEXT_COLOR:void 0,CHAT_BACKGROUND_IMAGE_URL:void 0,CHAT_BOT_BACKGROUND_COLOR:void 0,CHAT_BOT_TEXT_COLOR:void 0,CHAT_INSTRUCTIONS:void 0,CHAT_USER_BACKGROUND_COLOR:void 0,CHAT_USER_TEXT_COLOR:void 0,CHAT_WELCOME:"Welcome",COMPOSE_BACKGROUND_IMAGE_URL:void 0,COMPOSE_HIDE_LOCATION:void 0,COMPOSE_SIMPLE_ATTACH_FILE:void 0,DEFAULT_LANGUAGE:"en",HIDE_CHAT_BUTTON:!1,HIDE_MENU_BUTTON:!1,HIDE_REGISTER_BUTTON:!1,HIDE_SAVE_BUTTON:!1,HOME_BACKGROUND_IMAGE_URL:void 0,INDEX_TITLE:void 0,LOGBOOK_TAG_DEFINITIONS:{},LOGBOOK_TAGS:"[]",MENU_BACKGROUND_IMAGE_URL:void 0,MESSAGE_HIDE_BAR:!1,MODULE_VOICE:!1,PUBLIC_FLOW_CODICENT:void 0,REALTIME_VOICE_API_KEY:"",SEND_BUTTON_ROUND_BACKGROUND:!1,SHOW_CANVAS_BUTTON:!1,SHOW_CHAT_PROMPTS:!1,SHOW_HELP_BUTTON:!1,SHOW_LOGBOOK_BUTTON:!1,SHOW_MICROPHONE_BUTTON:!1,SHOW_SETTINGS_BUTTON:!1,SHOW_SNAP_BUTTON:!1,SHOW_VOICE_BUTTON:!1,STRIP_CUSTOMER_PORTAL:"",STRIPE_PRICE_ID:"",STRIPE_PUBLIC_KEY:"",SUBSCRIPTION_NEEDED:!1,THEME_WELCOME:void 0,USER_PREFIX:void 0,WELCOME_STATUS_PROMPT:"",SHOW_SEND_BUTTON_TEXT:!1,SHOW_SAVE_BUTTON_TEXT:!1,FORM_BACKGROUND_IMAGE_URL:void 0,AUTO_TRANSLATE:!0,FORCE_LANGUAGE:void 0,LOGIN_WELCOME_TEXT:void 0,LOGIN_HIDE_WELCOME:!1,LOGIN_LOGO_URL:void 0,HIDE_CHAT_ADD_FILE_BUTTON:!1,FORM_ACCEPT_MARKDOWN:void 0};const E=function(_){return new Proxy(_,{get:(_,O,T)=>Reflect.get(_,O,T)})}(T);function A(_){return E[_]}function R(O={}){for(const[_,E]of Object.entries(O))void 0!==E&&(T[_]=E);_.initialize({startOnLoad:!1})}export{O as AppConfig,A as getConfigValue,R as initCodicentApp};
1
+ import _ from"../node_modules/mermaid/dist/mermaid.core.js";class O{constructor(){this.CHAT_INSTRUCTIONS="",this.REALTIME_VOICE_INSTRUCTIONS="",this.apps={}}}const T={LOGIN_REDIRECT:!1,ABOUT_TEXT:"Codicent APP SDK",ANONYMOUS_CODICENT:void 0,ANONYMOUS_TOKEN:void 0,API_BASE_URL:"https://codicent.com/",APP_BUTTONS:void 0,APP_CHAT_TEXT_PLACEHOLDER:void 0,APP_CHAT_TITLE:void 0,APP_CONFIG:new O,APP_FOOTER_COLOR:void 0,APP_FOOTER_SELECTED_COLOR:void 0,APP_FOOTER_TEXT_COLOR:void 0,APP_HEADER_COLOR:void 0,APP_HEADER_ICON_URL:void 0,APP_HEADER_TEXT_COLOR:void 0,APP_ICON_URL:void 0,APP_LOG_CODICENT:"",APP_LOG_TOKEN:"",APP_LOGBOOK_TITLE:void 0,APP_MENU_TITLE:void 0,APP_NAME:void 0,APP_PREFIX:void 0,APP_SAVE_TITLE:void 0,APP_SEARCH_TITLE:void 0,APP_SLOGAN:void 0,APP_SPLASH_TEXT:void 0,APP_SPLASH_URL:void 0,APP_TEMPLATE:"",APP_TITLE:void 0,AUTH_REDIRECT_URL:void 0,AUTH0_AUDIENCE:"https://codicent.com/api",AUTH0_CLIENT_ID:"80STzWmmzN3Tgf76HgFRyv54keYmvnaw",AUTH0_DOMAIN:"auth.codicent.com",AUTH0_PROVIDER_SCOPE:"read:current_user update:current_user_metadata openid profile email",AUTH0_SCOPE:"read:current_user",AUTH0_USER_DOMAIN:void 0,BUTTON_ACTIVE_COLOR:void 0,BUTTON_BACKGROUND_COLOR:void 0,BUTTON_BORDER_RADIUS:void 0,BUTTON_HOVER_COLOR:void 0,BUTTON_TAG:"app-button",BUTTON_TEXT_COLOR:void 0,CHAT_BACKGROUND_IMAGE_URL:void 0,CHAT_BOT_BACKGROUND_COLOR:void 0,CHAT_BOT_TEXT_COLOR:void 0,CHAT_INSTRUCTIONS:void 0,CHAT_USER_BACKGROUND_COLOR:void 0,CHAT_USER_TEXT_COLOR:void 0,CHAT_WELCOME:"Welcome",COMPOSE_BACKGROUND_IMAGE_URL:void 0,COMPOSE_HIDE_LOCATION:void 0,COMPOSE_SIMPLE_ATTACH_FILE:void 0,DEFAULT_LANGUAGE:"en",HIDE_CHAT_BUTTON:!1,HIDE_MENU_BUTTON:!1,HIDE_REGISTER_BUTTON:!1,HIDE_SAVE_BUTTON:!1,HOME_BACKGROUND_IMAGE_URL:void 0,INDEX_TITLE:void 0,LOGBOOK_TAG_DEFINITIONS:{},LOGBOOK_TAGS:"[]",MENU_BACKGROUND_IMAGE_URL:void 0,MESSAGE_HIDE_BAR:!1,MODULE_VOICE:!1,PUBLIC_FLOW_CODICENT:void 0,REALTIME_VOICE_API_KEY:"",SEND_BUTTON_ROUND_BACKGROUND:!1,SHOW_CANVAS_BUTTON:!1,SHOW_CHAT_PROMPTS:!1,SHOW_HELP_BUTTON:!1,SHOW_LOGBOOK_BUTTON:!1,SHOW_MICROPHONE_BUTTON:!1,SHOW_SETTINGS_BUTTON:!1,SHOW_SNAP_BUTTON:!1,SHOW_VOICE_BUTTON:!1,STRIP_CUSTOMER_PORTAL:"",STRIPE_PRICE_ID:"",STRIPE_PUBLIC_KEY:"",SUBSCRIPTION_NEEDED:!1,THEME_WELCOME:void 0,USER_PREFIX:void 0,WELCOME_STATUS_PROMPT:"",SHOW_SEND_BUTTON_TEXT:!1,SHOW_SAVE_BUTTON_TEXT:!1,FORM_BACKGROUND_IMAGE_URL:void 0,AUTO_TRANSLATE:!0,FORCE_LANGUAGE:void 0,LOGIN_WELCOME_TEXT:void 0,LOGIN_HIDE_WELCOME:!1,LOGIN_LOGO_URL:void 0,HIDE_CHAT_ADD_FILE_BUTTON:!1,FORM_ACCEPT_MARKDOWN:void 0,RESTART_AUDIO_ON_TAKE_PHOTO:!1};const E=function(_){return new Proxy(_,{get:(_,O,T)=>Reflect.get(_,O,T)})}(T);function A(_){return E[_]}function R(O={}){for(const[_,E]of Object.entries(O))void 0!==E&&(T[_]=E);_.initialize({startOnLoad:!1})}export{O as AppConfig,A as getConfigValue,R as initCodicentApp};
@@ -1 +1 @@
1
- import{useState as e,useEffect as s,useCallback as t}from"react";import{chatStore as o}from"../stores/chatStore.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import r from"../utils/logging.js";import"react/jsx-runtime";import"../_virtual/index.js";import"../config/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";function n(n){const[a,i]=e(o.getState()),{service:c}=n;s((()=>o.subscribe(i)),[c]);const d=t((async()=>{const e=o.getConversationId();if(e){console.log("Reloading chat history to check for missed messages...");try{const s=await c.getChatHistory(e),t=o.getMessages();return s.length>t.length?(console.log(`Found ${s.length-t.length} missed messages, updating chat...`),o.reset(),s.forEach(((e,s)=>{const t={id:e.id,sender:s%2==0?"user":"bot",content:e.content};o.addMessage(t)})),o.setConversationId(e),r("chat-history-reloaded"),!0):(console.log("No missed messages found"),!1)}catch(e){return console.error("Failed to reload chat history:",e),!1}}return!1}),[c]),g=t(((e,s=0)=>{if(""===e.trim())return;const t=`$user-msg-${Date.now()}`,n={id:t,sender:"user",content:e},i=a.messages.length>0?a.messages[a.messages.length-1].id:void 0;o.addMessage(n),o.setBotTyping(!0),r("chat-send");const l=Promise.race([c.chat(e,i),new Promise(((e,s)=>{setTimeout((()=>s(new Error("Request timeout - please try again"))),3e4)}))]).then((e=>{const{id:s,content:t}=e,n={id:s,sender:"bot",content:t,isNew:!0};o.setConversationId(s),o.addMessage(n),o.setBotTyping(!1),r("chat-receive"),t.startsWith("Error code: ")&&r("chat-error: "+t)})).catch((async n=>{console.error("Chat error details:",{error:n,message:n?.message,name:n?.name,stack:n?.stack,tempId:t,lastMessageId:i,retryCount:s,timestamp:(new Date).toISOString()});if(0===s&&("AbortError"===n?.name||n?.message?.includes("timeout")||n?.message?.includes("Failed to fetch")||n?.message?.includes("NetworkError")))return console.log("Auto-retrying chat request..."),o.removeMessage(t),o.setBotTyping(!1),void setTimeout((()=>g(e,s+1)),2e3);function a(){let e="An error occurred while sending the message. Please try again.";if(c.onUnauthorized&&n?.toString().includes("401"))return alert("Session expired. Please log in again."),void c.onUnauthorized();"AbortError"===n?.name||n?.message?.includes("timeout")?(e="Request timed out. Please check your connection and try again.",r("chat-timeout")):n?.message?.includes("HTTP error: 500")?(e="Server error. Please try again in a moment.",r("chat-server-error")):(n?.message?.includes("Failed to fetch")||n?.message?.includes("NetworkError"))&&(e="Network error. Please check your connection and try again.",r("chat-network-error")),alert(e),o.removeMessage(t),o.setBotTyping(!1),r("chat-error")}"AbortError"===n?.name||n?.message?.includes("timeout")||n?.message?.includes("Failed to fetch")||n?.message?.includes("NetworkError")||n?.message?.includes("WebSocket")||n?.message?.includes("SignalR")||n?.message?.includes("Connection")?(console.log("Potential SignalR/connection issue detected, checking for missed messages..."),setTimeout((async()=>{if(await d())return o.removeMessage(t),o.setBotTyping(!1),console.log("Recovered missed message(s) from server"),void r("chat-recovered");a()}),2e3)):a()}));o.addPendingRequest(t,l)}),[c,a.messages,d]),l=t((()=>{o.reset(),o.clearMessages(),r("new-chat")}),[]),m=t((e=>{o.reset(),o.clearMessages(),r("open-chat"),c.getChatHistory(e).then((e=>{e.forEach(((e,s)=>{const t={id:e.id,sender:s%2==0?"user":"bot",content:e.content};o.addMessage(t)}))}))}),[c]);return{messages:a.messages,isBotTyping:a.isBotTyping,handleSend:g,newChat:l,openChat:m,reloadChatHistory:d}}export{n as useChat};
1
+ import{useState as e,useEffect as s,useCallback as t}from"react";import{chatStore as o}from"../stores/chatStore.js";import"../utils/MessageContent.js";import"../node_modules/tinycolor2/esm/tinycolor.js";import r from"../utils/logging.js";import"react/jsx-runtime";import"../_virtual/index.js";import"../config/index.js";import"../lib/wavtools/lib/wav_packer.js";import"../lib/wavtools/lib/analysis/audio_analysis.js";import"../lib/wavtools/lib/wav_stream_player.js";import"../lib/wavtools/lib/wav_recorder.js";function n(n){const[a,i]=e(o.getState()),{service:c}=n;s((()=>o.subscribe(i)),[c]);const d=t((async()=>{const e=o.getConversationId();if(e){console.log("Reloading chat history to check for missed messages...");try{const s=await c.getChatHistory(e),t=o.getMessages();return s.length>t.length?(console.log(`Found ${s.length-t.length} missed messages, updating chat...`),o.reset(),s.forEach(((e,s)=>{const t={id:e.id,sender:s%2==0?"user":"bot",content:e.content};o.addMessage(t)})),o.setConversationId(e),r("chat-history-reloaded"),!0):(console.log("No missed messages found"),!1)}catch(e){return console.error("Failed to reload chat history:",e),!1}}return!1}),[c]),g=t(((e,s=0)=>{if(""===e.trim())return;const t=`$user-msg-${Date.now()}`,n={id:t,sender:"user",content:e},i=a.messages.length>0?a.messages[a.messages.length-1].id:void 0;o.addMessage(n),o.setBotTyping(!0),r("chat-send");const l=Promise.race([c.chat(e,i),new Promise(((e,s)=>{setTimeout((()=>s(new Error("Request timeout - please try again"))),3e4)}))]).then((e=>{const{id:s,content:t}=e,n={id:s,sender:"bot",content:t,isNew:!0};o.setConversationId(s),o.addMessage(n),o.setBotTyping(!1),r("chat-receive"),t.startsWith("Error code: ")&&r("chat-error: "+t)})).catch((async n=>{console.error("Chat error details:",{error:n,message:n?.message,name:n?.name,stack:n?.stack,tempId:t,lastMessageId:i,retryCount:s,timestamp:(new Date).toISOString()});if(0===s&&("AbortError"===n?.name||n?.message?.includes("timeout")||n?.message?.includes("Failed to fetch")||n?.message?.includes("NetworkError")))return console.log("Auto-retrying chat request..."),o.removeMessage(t),o.setBotTyping(!1),void setTimeout((()=>g(e,s+1)),2e3);function a(){let e="An error occurred while sending the message. Please try again.";if(c.onUnauthorized&&n?.toString().includes("401"))return alert("Session expired. Please log in again."),void c.onUnauthorized();"AbortError"===n?.name||n?.message?.includes("timeout")?(e="Request timed out. Please check your connection and try again.",r("chat-timeout")):n?.message?.includes("HTTP error: 500")?(e="Server error. Please try again in a moment.",r("chat-server-error")):(n?.message?.includes("Failed to fetch")||n?.message?.includes("NetworkError"))&&(e="Network error. Please check your connection and try again.",r("chat-network-error")),console.warn(e),o.removeMessage(t),o.setBotTyping(!1),r("chat-error")}"AbortError"===n?.name||n?.message?.includes("timeout")||n?.message?.includes("Failed to fetch")||n?.message?.includes("NetworkError")||n?.message?.includes("WebSocket")||n?.message?.includes("SignalR")||n?.message?.includes("Connection")?(console.log("Potential SignalR/connection issue detected, checking for missed messages..."),setTimeout((async()=>{if(await d())return o.removeMessage(t),o.setBotTyping(!1),console.log("Recovered missed message(s) from server"),void r("chat-recovered");a()}),2e3)):a()}));o.addPendingRequest(t,l)}),[c,a.messages,d]),l=t((()=>{o.reset(),o.clearMessages(),r("new-chat")}),[]),m=t((e=>{o.reset(),o.clearMessages(),r("open-chat"),c.getChatHistory(e).then((e=>{e.forEach(((e,s)=>{const t={id:e.id,sender:s%2==0?"user":"bot",content:e.content};o.addMessage(t)}))}))}),[c]);return{messages:a.messages,isBotTyping:a.isBotTyping,handleSend:g,newChat:l,openChat:m,reloadChatHistory:d}}export{n as useChat};
package/dist/index.d.ts CHANGED
@@ -826,6 +826,7 @@ interface AppConfigOptions {
826
826
  LOGIN_LOGO_URL: string | undefined;
827
827
  HIDE_CHAT_ADD_FILE_BUTTON: boolean;
828
828
  FORM_ACCEPT_MARKDOWN: undefined | string;
829
+ RESTART_AUDIO_ON_TAKE_PHOTO: boolean;
829
830
  }
830
831
  declare function getConfigValue<K extends keyof AppConfigOptions>(key: K): AppConfigOptions[K];
831
832
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codicent-app-sdk",
3
- "version": "0.3.80",
3
+ "version": "0.3.82",
4
4
  "description": "SDK for building AI-powered applications with Codicent",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",