@astermind/cybernetic-chatbot-client 1.0.15 → 2.2.3
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/CyberneticClient.d.ts +14 -1
- package/dist/CyberneticClient.d.ts.map +1 -1
- package/dist/cybernetic-chatbot-client-full.esm.js +35 -0
- package/dist/cybernetic-chatbot-client-full.esm.js.map +1 -1
- package/dist/cybernetic-chatbot-client-full.min.js +1 -1
- package/dist/cybernetic-chatbot-client-full.min.js.map +1 -1
- package/dist/cybernetic-chatbot-client-full.umd.js +35 -0
- package/dist/cybernetic-chatbot-client-full.umd.js.map +1 -1
- package/dist/cybernetic-chatbot-client.esm.js +35 -0
- package/dist/cybernetic-chatbot-client.esm.js.map +1 -1
- package/dist/cybernetic-chatbot-client.min.js +1 -1
- package/dist/cybernetic-chatbot-client.min.js.map +1 -1
- package/dist/cybernetic-chatbot-client.umd.js +35 -0
- package/dist/cybernetic-chatbot-client.umd.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +27 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1655,6 +1655,13 @@ LJ5AZXvOhHaXdHzMuYKX5BpK4w7TqbPvJ6QPvKmLKvHh1VKcUJ6mJQgJJw==
|
|
|
1655
1655
|
agentic: config.agentic ?? null,
|
|
1656
1656
|
offline: config.offline ?? null,
|
|
1657
1657
|
sitemap: config.sitemap ?? null,
|
|
1658
|
+
sources: {
|
|
1659
|
+
enabled: config.sources?.enabled ?? true,
|
|
1660
|
+
showSummary: config.sources?.showSummary ?? true,
|
|
1661
|
+
showDownload: config.sources?.showDownload ?? true,
|
|
1662
|
+
includeFullContent: config.sources?.includeFullContent ?? false,
|
|
1663
|
+
maxSources: config.sources?.maxSources ?? 5
|
|
1664
|
+
},
|
|
1658
1665
|
onStatusChange: config.onStatusChange || (() => { }),
|
|
1659
1666
|
onError: config.onError || (() => { })
|
|
1660
1667
|
};
|
|
@@ -1730,6 +1737,34 @@ LJ5AZXvOhHaXdHzMuYKX5BpK4w7TqbPvJ6QPvKmLKvHh1VKcUJ6mJQgJJw==
|
|
|
1730
1737
|
getAgenticConfig() {
|
|
1731
1738
|
return this.config.agentic;
|
|
1732
1739
|
}
|
|
1740
|
+
// ==================== SOURCES CONFIGURATION ====================
|
|
1741
|
+
/**
|
|
1742
|
+
* Get sources configuration
|
|
1743
|
+
* Returns merged configuration with all defaults applied
|
|
1744
|
+
*/
|
|
1745
|
+
getSourcesConfig() {
|
|
1746
|
+
return { ...this.config.sources };
|
|
1747
|
+
}
|
|
1748
|
+
/**
|
|
1749
|
+
* Check if a specific source feature is available
|
|
1750
|
+
* Takes into account configuration, connection status, and requirements
|
|
1751
|
+
*
|
|
1752
|
+
* @param feature - The feature to check ('summary' or 'download')
|
|
1753
|
+
* @returns Whether the feature is available
|
|
1754
|
+
*/
|
|
1755
|
+
isSourceFeatureAvailable(feature) {
|
|
1756
|
+
if (!this.config.sources.enabled) {
|
|
1757
|
+
return false;
|
|
1758
|
+
}
|
|
1759
|
+
if (feature === 'summary') {
|
|
1760
|
+
return this.config.sources.showSummary;
|
|
1761
|
+
}
|
|
1762
|
+
if (feature === 'download') {
|
|
1763
|
+
// Download only works when online
|
|
1764
|
+
return this.config.sources.showDownload && this.status === 'online';
|
|
1765
|
+
}
|
|
1766
|
+
return false;
|
|
1767
|
+
}
|
|
1733
1768
|
/**
|
|
1734
1769
|
* Classify user message intent for agentic action
|
|
1735
1770
|
* Only works if agentic capabilities are registered and enabled
|