Appearance
v8 ... v9
Breaking changes
deepdeskSDK.on events
The following events are all removed:
js
deepdeskSDK.on('select-text-suggestion', callback);
deepdeskSDK.on('select-search-suggestion', callback);
deepdeskSDK.on('select-url-suggestion', callback);
deepdeskSDK.on('select-pinned-message', callback);
And replaced by one event:
js
deepdeskSDK.on('select-suggestion', callback);
WARNING
The following API has changed again in v10.
The callback function argument contains a action
property. The action
property tells you which action to perform with the suggestion text. For example:
js
deepdeskSDK.on('select-suggestion', ({ text, action }) => {
switch(action) {
case 'append':
inputElement.value = inputElement.value + text
break;
case 'insert':
// TODO: insert at caret position
break;
case 'replace':
default:
inputElement.value = text;
break;
}
});
setPlatformAgentId
The setPlatformAgentId
method is removed. The logic is moved to the setAgentInfo
method.