create-message-kit 1.1.7-beta.5 → 1.1.7-beta.7
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/templates/agent/src/handler/ens.ts +3 -9
- package/templates/agent/src/index.ts +2 -2
- package/templates/agent/src/prompt.ts +7 -2
- package/templates/agent/src/skills.ts +1 -1
- package/templates/group/src/handler/agent.ts +1 -1
- package/templates/group/src/handler/tipping.ts +1 -1
- package/templates/group/src/handler/transaction.ts +1 -1
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { HandlerContext, SkillResponse } from "@xmtp/message-kit";
|
2
|
-
import { getUserInfo, clearInfoCache, isOnXMTP } from "
|
2
|
+
import { getUserInfo, clearInfoCache, isOnXMTP } from "@xmtp/message-kit";
|
3
3
|
import { isAddress } from "viem";
|
4
|
-
import { clearMemory } from "
|
4
|
+
import { clearMemory } from "@xmtp/message-kit";
|
5
5
|
|
6
6
|
export const frameUrl = "https://ens.steer.fun/";
|
7
7
|
export const ensUrl = "https://app.ens.domains/";
|
@@ -86,13 +86,7 @@ export async function handleEns(
|
|
86
86
|
}
|
87
87
|
message += `\n\nWould you like to tip the domain owner for getting there first 🤣?`;
|
88
88
|
message = message.trim();
|
89
|
-
if (
|
90
|
-
await isOnXMTP(
|
91
|
-
context.v2client,
|
92
|
-
data?.ensInfo?.ens,
|
93
|
-
data?.ensInfo?.address,
|
94
|
-
)
|
95
|
-
) {
|
89
|
+
if (await isOnXMTP(context.client, context.v2client, sender?.address)) {
|
96
90
|
await context.send(
|
97
91
|
`Ah, this domains is in XMTP, you can message it directly: https://converse.xyz/dm/${domain}`,
|
98
92
|
);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { run, HandlerContext } from "@xmtp/message-kit";
|
2
|
-
import { textGeneration, processMultilineResponse } from "
|
2
|
+
import { textGeneration, processMultilineResponse } from "@xmtp/message-kit";
|
3
3
|
import { agent_prompt } from "./prompt.js";
|
4
|
-
import { getUserInfo } from "
|
4
|
+
import { getUserInfo } from "@xmtp/message-kit";
|
5
5
|
|
6
6
|
run(async (context: HandlerContext) => {
|
7
7
|
/*All the skills are handled through the skills file*/
|
@@ -1,6 +1,11 @@
|
|
1
1
|
import { skills } from "./skills.js";
|
2
|
-
import {
|
3
|
-
|
2
|
+
import {
|
3
|
+
getUserInfo,
|
4
|
+
UserInfo,
|
5
|
+
PROMPT_USER_CONTENT,
|
6
|
+
PROMPT_RULES,
|
7
|
+
PROMPT_SKILLS_AND_EXAMPLES,
|
8
|
+
} from "@xmtp/message-kit";
|
4
9
|
|
5
10
|
export async function agent_prompt(userInfo: UserInfo) {
|
6
11
|
let { address, ensDomain, converseUsername, preferredName } = userInfo;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { HandlerContext, AbstractedMember } from "@xmtp/message-kit";
|
2
|
-
import { textGeneration } from "
|
2
|
+
import { textGeneration } from "@xmtp/message-kit";
|
3
3
|
|
4
4
|
export async function handler(context: HandlerContext) {
|
5
5
|
if (!process?.env?.OPEN_AI_API_KEY) {
|