From c176e1e859805d09a718c70e6433021e6fa171db Mon Sep 17 00:00:00 2001 From: jacob-tucker Date: Wed, 11 Dec 2024 14:51:30 -0500 Subject: [PATCH] remove walletinfo from template --- packages/plugin-story/src/actions/attachTerms.ts | 7 ------- packages/plugin-story/src/actions/licenseIP.ts | 7 ------- packages/plugin-story/src/actions/registerIP.ts | 9 +-------- packages/plugin-story/src/templates/index.ts | 12 +++--------- 4 files changed, 4 insertions(+), 31 deletions(-) diff --git a/packages/plugin-story/src/actions/attachTerms.ts b/packages/plugin-story/src/actions/attachTerms.ts index 41e39c5c64..3e49369301 100644 --- a/packages/plugin-story/src/actions/attachTerms.ts +++ b/packages/plugin-story/src/actions/attachTerms.ts @@ -93,13 +93,6 @@ export const attachTermsAction = { state = await runtime.updateRecentMessageState(state); } - const walletInfo = await storyWalletProvider.get( - runtime, - message, - state - ); - state.walletInfo = walletInfo; - const attachTermsContext = composeContext({ state, template: attachTermsTemplate, diff --git a/packages/plugin-story/src/actions/licenseIP.ts b/packages/plugin-story/src/actions/licenseIP.ts index 17922a24d6..c2bfd03a20 100644 --- a/packages/plugin-story/src/actions/licenseIP.ts +++ b/packages/plugin-story/src/actions/licenseIP.ts @@ -64,13 +64,6 @@ export const licenseIPAction = { state = await runtime.updateRecentMessageState(state); } - const walletInfo = await storyWalletProvider.get( - runtime, - message, - state - ); - state.walletInfo = walletInfo; - const licenseIPContext = composeContext({ state, template: licenseIPTemplate, diff --git a/packages/plugin-story/src/actions/registerIP.ts b/packages/plugin-story/src/actions/registerIP.ts index 8907bddf66..282ce40d9e 100644 --- a/packages/plugin-story/src/actions/registerIP.ts +++ b/packages/plugin-story/src/actions/registerIP.ts @@ -12,8 +12,8 @@ import { storyWalletProvider, WalletProvider } from "../providers/wallet"; import { registerIPTemplate } from "../templates"; import { RegisterIPParams } from "../types"; import { RegisterIpResponse } from "@story-protocol/core-sdk"; -import { PinataProvider } from "../providers/pinata"; import { createHash } from "crypto"; +import { PinataProvider } from "../providers/pinata"; export { registerIPTemplate }; @@ -88,13 +88,6 @@ export const registerIPAction = { state = await runtime.updateRecentMessageState(state); } - const walletInfo = await storyWalletProvider.get( - runtime, - message, - state - ); - state.walletInfo = walletInfo; - const registerIPContext = composeContext({ state, template: registerIPTemplate, diff --git a/packages/plugin-story/src/templates/index.ts b/packages/plugin-story/src/templates/index.ts index d38084098a..f73f329c10 100644 --- a/packages/plugin-story/src/templates/index.ts +++ b/packages/plugin-story/src/templates/index.ts @@ -1,9 +1,7 @@ -export const registerIPTemplate = `Given the recent messages and wallet information below: +export const registerIPTemplate = `Given the recent messages below: {{recentMessages}} -{{walletInfo}} - Extract the following information about the requested IP registration: - Field "title": The title of your IP - Field "description": The description of your IP @@ -22,12 +20,10 @@ Respond with a JSON markdown block containing only the extracted values. A user \`\`\` `; -export const licenseIPTemplate = `Given the recent messages and wallet information below: +export const licenseIPTemplate = `Given the recent messages below: {{recentMessages}} -{{walletInfo}} - Extract the following information about the requested IP licensing: - Field "licensorIpId": The IP Asset that you want to mint a license from - Field "licenseTermsId": The license terms that you want to mint a license for @@ -44,12 +40,10 @@ Respond with a JSON markdown block containing only the extracted values. A user \`\`\` `; -export const attachTermsTemplate = `Given the recent messages and wallet information below: +export const attachTermsTemplate = `Given the recent messages below: {{recentMessages}} -{{walletInfo}} - Extract the following information about attaching license terms to an IP Asset: - Field "ipId": The IP Asset that you want to attach the license terms to - Field "mintingFee": The fee to mint this license from the IP Asset.