@tiledesk/tiledesk-server 2.28.2 → 3.0.0
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/CHANGELOG.md +20 -0
- package/app.js +6 -35
- package/config/native_mcp/native_mcp_servers.json +7 -0
- package/controllers/chatbot.controller.js +659 -0
- package/controllers/intents.controller.js +139 -0
- package/errorCodes.js +2 -1
- package/event/botEvent.js +43 -3
- package/middleware/errorHandler.js +41 -0
- package/models/chatbotTemplates.js +4 -0
- package/models/faq.js +10 -0
- package/models/faq_kb.js +49 -0
- package/package.json +2 -2
- package/pubmodules/aiGenerations/README.md +154 -0
- package/pubmodules/aiGenerations/index.js +7 -0
- package/pubmodules/aiGenerations/listeners.js +96 -0
- package/pubmodules/aiGenerations/models/faqKbRevision.js +51 -0
- package/pubmodules/aiGenerations/routes/aiGenerations.js +426 -0
- package/pubmodules/aiGenerations/services/agentWriter.js +286 -0
- package/pubmodules/aiGenerations/services/atomic.js +70 -0
- package/pubmodules/aiGenerations/services/references.js +78 -0
- package/pubmodules/aiGenerations/services/revisionService.js +169 -0
- package/pubmodules/aiGenerations/services/snapshot.js +109 -0
- package/pubmodules/aiGenerations/test/aiGenerationsRoute.js +503 -0
- package/pubmodules/pubModulesManager.js +17 -0
- package/routes/faq.js +10 -3
- package/routes/faq_kb.js +716 -411
- package/services/chatbotService.js +84 -5
- package/services/faqService.js +159 -45
- package/services/v3FlowService.js +416 -0
- package/template/chatbot/blank.js +21 -3
- package/template/chatbot/blank_subagent.js +139 -0
- package/template/chatbot/blank_voice.js +21 -4
- package/template/chatbot/blank_voice_twilio.js +21 -5
- package/template/chatbot/index.js +1 -0
- package/template/chatbot/subagent_notes.js +30 -0
- package/test/faqRoute.js +83 -0
- package/test/faqkbRoute.js +982 -523
- package/test/faqkbV3Route.js +436 -0
- package/test/fixtures/example-json-with-subagents.txt +1 -0
- package/test/nativemcp.test.js +6 -1
- package/test/v3FlowService.js +187 -0
- package/test/webhookRoute.js +2 -1
- package/utils/AppError.js +9 -0
- package/utils/asyncHandler.js +10 -0
package/routes/faq.js
CHANGED
|
@@ -655,9 +655,16 @@ router.get('/', roleChecker.hasRoleOrTypes('agent', ['bot', 'subscription']), fu
|
|
|
655
655
|
// console.log("result: ", result);
|
|
656
656
|
// })
|
|
657
657
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
658
|
+
// Every block carries `faq_kb`, the whole bot read again from the database (virtual of the
|
|
659
|
+
// model). A caller that already has the bot, such as the Design Studio V3, asks for the blocks
|
|
660
|
+
// without it (`populate=false`): a list of blocks then weighs the blocks alone, not the bot
|
|
661
|
+
// repeated in every row. Without the parameter, or with any other value, nothing changes.
|
|
662
|
+
let faqQuery = Faq.find(query)
|
|
663
|
+
.skip(skip).limit(limit);
|
|
664
|
+
if (req.query.populate !== 'false') {
|
|
665
|
+
faqQuery = faqQuery.populate({ path: 'faq_kb' });
|
|
666
|
+
}
|
|
667
|
+
return faqQuery
|
|
661
668
|
.lean()
|
|
662
669
|
.exec(function (err, faqs) {
|
|
663
670
|
|