@@ -8,6 +8,8 @@ export const SYSTEM_PROMPT = `I am a Telegram bot powered by PolkadotAgentKit. I
88- Checking WND balance on Westend (e.g., "check balance")
99- Checking proxies (e.g., "check proxies on westend" or "check proxies")
1010- Transfer tokens through XCM (e.g., "transfer 1 WND to 5CSox4ZSN4SGLKUG9NYPtfVK9sByXLtxP4hmoF4UgkM4jgDJ from west to westend_asset_hub ")
11+ - Register identity on People Chain (e.g., "register identity display=\"Gemini AI\" web=\"https://gemini.google.com\" twitter=\"@GoogleAI\" github=\"google\"")
12+ - Register identity on People Chain (e.g., "register identity display=\"Gemini AI\" web=\"https://gemini.google.com\" twitter=\"@GoogleAI\" github=\"google\"")
1113
1214DYNAMIC CHAIN INITIALIZATION:
1315When balance checking, native transfers, or XCM transfer tools fail because a chain is not available/initialized, I should:
@@ -178,6 +180,14 @@ Example: For "claim rewards from pool on paseo", call claimRewardsTool with:
178180 - CRITICAL: If the user says "amount", use that value for 'slashingSpans'.
179181 - Example: User says "withdraw unbonded with 1 amount on Paseo" -> Call 'withdrawUnbondedTool' with { slashingSpans: "1", chain: "paseo" }
180182
183+ 3. To 'register identity' on People Chain:
184+ - Use the 'register_identity' tool.
185+ - - Parameters: any of the optional strings among display, legal, web, matrix, email, image, twitter, github, discord.
186+ - - Example: User says "register identity display="Gemini AI" twitter="@GoogleAI"" -> Call 'register_identity' with { display: "Gemini AI", twitter: "@GoogleAI" }
187+ + - Parameters: provide at least one of: display, legal, web, matrix, email, image, twitter, github, discord (all strings, optional individually).
188+ + - Example A: User says "register identity with email abc@gmail.com" -> Call 'register_identity' with { email: "abc@gmail.com" }
189+ + - Example B: User says "register identity display="Gemini AI" twitter="@GoogleAI"" -> Call 'register_identity' with { display: "Gemini AI", twitter: "@GoogleAI" }
190+
181191--- END OF TOOL-SPECIFIC RULES ---
182192
183193When checking proxies, you can specify the chain (convert to real param) or not specify a chain (the first chain will be used by default)
@@ -196,7 +206,8 @@ export function setupHandlers(
196206 '- Transferring native tokens (e.g., "transfer 1 token to westend_asset_hub to 5CSox4ZSN4SGLKUG9NYPtfVK9sByXLtxP4hmoF4UgkM4jgDJ")\n' +
197207 '- Checking balance (e.g., "check balance on west/polkadot/kusama")\n' +
198208 '- Checking proxies (e.g., "check proxies on westend" or "check proxies")\n' +
199- '- Transfer tokens through XCM (e.g., "transfer 1 WND to 5CSox4ZSN4SGLKUG9NYPtfVK9sByXLtxP4hmoF4UgkM4jgDJ from west to west_asset_hub ")\n' +
209+ '- Transfer tokens through XCM (e.g., "transfer 1 WND to 5CSox4ZSN4SGLKUG9NYPtfVK9sByXLtxP4hmoF4UgkM4jgDJ from west to westend_asset_hub ")\n' +
210+ '- Register identity on People Chain (e.g., "register identity display=\"Gemini AI\" web=\"https://gemini.google.com\" twitter=\"@GoogleAI\" github=\"google\"")' +
200211 '- Bonding to a pool (e.g., "bond 100 DOT on Polkadot")\n' +
201212 '- Re-staking rewards (e.g., "re-stake my rewards on Paseo")\n' +
202213 '- Unbonding tokens from a pool (e.g., "unbond 100 DOT on Polkadot")\n' +
@@ -233,7 +244,8 @@ export function setupHandlers(
233244 await ctx . reply ( `Error: ${ response . message } ` ) ;
234245 } else {
235246 const content = JSON . parse ( response . content || "{}" ) ;
236- await ctx . reply ( content . data || "No message from tool." ) ;
247+ const data = JSON . stringify ( content . data ) ;
248+ await ctx . reply ( data || "No message from tool." ) ;
237249 }
238250 } else {
239251 console . warn ( `Tool not found: ${ toolCall . name } ` ) ;
0 commit comments