Add text features: trusted triggers, context cache, response policy, MCP config tools
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
*
|
||||
* Usage:
|
||||
* VESKSLOP_SOCKET=/tmp/vesktop-puppet-mock.sock pnpm test:trigger
|
||||
* TEST_TRIGGER_CONTENT="whitelist add @123" pnpm test:trigger
|
||||
* TEST_TRIGGER_CONTENT="whitelist list" pnpm test:trigger
|
||||
* TEST_TRIGGER_GUILD=100000000000000001 pnpm test:trigger # mention in a guild channel
|
||||
*/
|
||||
|
||||
import net from "node:net";
|
||||
@@ -13,16 +14,18 @@ import { coreSocketPath } from "./core-client.js";
|
||||
|
||||
const authorId = process.env.TEST_TRIGGER_AUTHOR ?? "177117296140091393";
|
||||
const content = process.env.TEST_TRIGGER_CONTENT ?? "whitelist list";
|
||||
const guildId = process.env.TEST_TRIGGER_GUILD;
|
||||
const isGuild = !!guildId;
|
||||
|
||||
const event = {
|
||||
type: "MESSAGE_CREATE",
|
||||
id: `30000000000000${Date.now() % 10000}`,
|
||||
channelId: "805255536223715370",
|
||||
guildId: null,
|
||||
channelType: 1,
|
||||
channelId: process.env.TEST_TRIGGER_CHANNEL ?? (isGuild ? "200000000000000010" : "805255536223715370"),
|
||||
guildId: guildId ?? null,
|
||||
channelType: isGuild ? 0 : 1,
|
||||
author: { id: authorId, username: "zzib", bot: false },
|
||||
content,
|
||||
mentions: [],
|
||||
content: isGuild ? `<@999> ${content}` : content,
|
||||
mentions: isGuild ? ["999"] : [],
|
||||
timestamp: new Date().toISOString()
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user