Skip to content

Commit 4eb8fd8

Browse files
committed
feat: Enhance logging for direct client and Solana token transfers
1 parent 74fac96 commit 4eb8fd8

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

packages/client-direct/src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,14 @@ export class DirectClient {
373373
template: messageHandlerTemplate,
374374
});
375375

376+
elizaLogger.debug("direct client request:", context);
377+
376378
const response = await generateMessageResponse({
377379
runtime: runtime,
378380
context,
379381
modelClass: ModelClass.LARGE,
380382
});
381-
383+
elizaLogger.debug("direct client response:", response);
382384
if (!response) {
383385
res.status(500).send(
384386
"No response from generateMessageResponse"

packages/plugin-solana/src/actions/transfer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default {
6868
similes: ["TRANSFER_TOKEN", "TRANSFER_TOKENS", "SEND_TOKENS", "PAY_TOKEN", "PAY_TOKENS", "PAY"],
6969
validate: async (runtime: IAgentRuntime, message: Memory) => {
7070
// Always return true for token transfers, letting the handler deal with specifics
71-
elizaLogger.log("Validating token transfer from user:", message.userId);
71+
elizaLogger.log("Validating token transfer from user:", message.userId, message.content);
7272
return true;
7373
},
7474
description: "Transfer SPL tokens from agent's wallet to another address",

packages/plugin-solana/src/actions/transfer_sol.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default {
6363
similes: ["TRANSFER_SOL", "PAY_SOL", "TRANSACT_SOL"],
6464
validate: async (runtime: IAgentRuntime, message: Memory) => {
6565
// Always return true for SOL transfers, letting the handler deal with specifics
66-
elizaLogger.log("Validating SOL transfer from user:", message.userId);
66+
elizaLogger.log("Validating SOL transfer from user:", message.userId, message.content);
6767
return true;
6868
},
6969
description: "Transfer native SOL from agent's wallet to specified address",
@@ -86,14 +86,14 @@ export default {
8686
state,
8787
template: solTransferTemplate,
8888
});
89-
89+
elizaLogger.debug("Transfer request context:", transferContext);
9090
const content = await generateObjectDeprecated({
9191
runtime,
9292
context: transferContext,
9393
modelClass: ModelClass.LARGE,
9494
});
9595

96-
elizaLogger.log("Content:", content);
96+
// elizaLogger.debug("Received content:", content);
9797

9898
if (!isSolTransferContent(content)) {
9999
if (callback) {

0 commit comments

Comments
 (0)