Skip to content

Commit 014dc1e

Browse files
Fix AI engine to read imported rules from database and match against complaints
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c8fb342 commit 014dc1e

2 files changed

Lines changed: 285 additions & 402 deletions

File tree

src/api/appClient.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,14 @@ class LocalIntegrations {
251251
this.Core = {
252252
InvokeLLM: async (params) => {
253253
const engine = await this._getEngine();
254-
return engine.routeInvokeLLM(params);
254+
let dbRules = [];
255+
try {
256+
const store = ipc ? new IPCEntityStore('TriageRule') : new LocalEntityStore('TriageRule');
257+
dbRules = await store.list() || [];
258+
} catch {
259+
// rules unavailable; engine will use built-in knowledge only
260+
}
261+
return engine.routeInvokeLLM(params, dbRules);
255262
},
256263
SendEmail: async (params) => { console.log('[TriageLink] Email queued:', params); return { success: true, message: 'Email logged locally' }; },
257264
SendSMS: async (params) => { console.log('[TriageLink] SMS queued:', params); return { success: true, message: 'SMS logged locally' }; },

0 commit comments

Comments
 (0)