@emqo/claudebridge 0.1.8 → 0.1.9
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/adapters/discord.js
CHANGED
|
@@ -224,9 +224,14 @@ export class DiscordAdapter {
|
|
|
224
224
|
return;
|
|
225
225
|
}
|
|
226
226
|
if (intent.type === "memory" && intent.description) {
|
|
227
|
-
this
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
if (/上面|之前|刚才|这个|那个|above|previous|earlier|this|that/.test(intent.description)) {
|
|
228
|
+
// Fall through to Claude conversation for context resolution
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
this.store.addMemory(msg.author.id, intent.description, "nlp");
|
|
232
|
+
await msg.reply(t(this.locale, "intent_memory_saved", { desc: intent.description }));
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
230
235
|
}
|
|
231
236
|
if (intent.type === "forget") {
|
|
232
237
|
this.store.clearMemories(msg.author.id);
|
|
@@ -270,9 +270,16 @@ export class TelegramAdapter {
|
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
272
|
if (intent.type === "memory" && intent.description) {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
// If description contains references to context ("上面", "this", "that", etc.),
|
|
274
|
+
// fall through to Claude conversation so it can resolve from session history
|
|
275
|
+
if (/上面|之前|刚才|这个|那个|above|previous|earlier|this|that/.test(intent.description)) {
|
|
276
|
+
// Don't intercept — let Claude handle it with full context
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
this.store.addMemory(String(uid), intent.description, "nlp");
|
|
280
|
+
await this.reply(chatId, t(this.locale, "intent_memory_saved", { desc: intent.description }));
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
276
283
|
}
|
|
277
284
|
if (intent.type === "forget") {
|
|
278
285
|
this.store.clearMemories(String(uid));
|