mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-12-05 15:41:56 +00:00
fix:修复sessions会话问题
This commit is contained in:
parent
e8243e13c3
commit
2a901e65bf
@ -194,7 +194,10 @@ async function handleMixMode(userMessage, e, aiConfig) {
|
|||||||
} else {
|
} else {
|
||||||
const matchResult = await KeywordMatcher.matchKeywords(userMessage, 'ai');
|
const matchResult = await KeywordMatcher.matchKeywords(userMessage, 'ai');
|
||||||
if (matchResult && matchResult.matched) {
|
if (matchResult && matchResult.matched) {
|
||||||
return [
|
const session = SessionManager.createOrGetSession(e.group_id, e.user_id,e);
|
||||||
|
const historyLen = aiConfig.chatHistory;
|
||||||
|
const chatHistory = session.chatHistory.slice(-historyLen|-10);
|
||||||
|
const res = [
|
||||||
{
|
{
|
||||||
type: 'message',
|
type: 'message',
|
||||||
data: matchResult.text,
|
data: matchResult.text,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user