I want to edit the default setting for the n8n chat widget. The doc show the file contents to edit, but I cannot find the file on docker installed self hosted instance.
The path should be something like this, but I there is no deafults.ts file so I must be looking in the wrong place
The file you have linked to is the defaults we use, When you embed the widget on your site you would overwrite the defaults there in the createChat() function.
You can find how do this in the documentation for the widget itself here: https://www.npmjs.com/package/@n8n/chat#options but there could be some parts that need tweaking depending on what you are using to add it to your site.
Took me a while to figure out what you were telling me. Now I get. The code snippet that is added to the site has place to add in the extra code lines (function) to control the widget.
For any other dummies like me out there. In the snippet that you add to your site
webhookConfig: {
method: 'POST',
headers: {}
},
target: '#n8n-chat',
mode: 'window',
defaultLanguage: 'en',
initialMessages: [
'Hi there! 👋',
'My name is Nathan. How can I assist you today?'
],
i18n: {
en: {
title: 'Hi there! 👋',
subtitle: "Start a chat. We're here to help you 24/7.",
footer: '',
getStarted: 'New Conversation',
inputPlaceholder: 'Type your question..',
},
},
You can edit the code above to modify how you want the chat widget to present, Fir example change Nathan to Alex to change the name of the assistant.