Skip to content

Commit

Permalink
chore: eslint import order (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xRAG authored and John-peterson-coinbase committed Feb 1, 2025
1 parent 6276b58 commit 51e0fdc
Show file tree
Hide file tree
Showing 4 changed files with 1,602 additions and 51 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"plugin:prettier/recommended",
"plugin:jsdoc/recommended"
],
"plugins": ["@typescript-eslint", "prettier"],
"plugins": ["@typescript-eslint", "prettier", "import"],
"env": {
"node": true,
"es6": true
Expand All @@ -16,6 +16,7 @@
"sourceType": "module"
},
"rules": {
"import/first": "error",
"multiline-comment-style": ["error", "starred-block"],
"prettier/prettier": "error",
"@typescript-eslint/member-ordering": "error",
Expand Down
28 changes: 13 additions & 15 deletions cdp-langchain/examples/chatbot-typescript/chatbot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ import { HumanMessage } from "@langchain/core/messages";
import * as dotenv from "dotenv";
import * as readline from "readline";

import {
AgentKit,
ViemWalletProvider,
cdpActionProvider,
erc721ActionProvider,
pythActionProvider,
walletActionProvider,
} from "@coinbase/cdp-agentkit-core";
import { createWalletClient, http } from "viem";
import { baseSepolia } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";

dotenv.config();

/**
Expand All @@ -26,12 +38,11 @@ async function initializeAgent() {
});
const erc721 = erc721ActionProvider();
const pyth = pythActionProvider();
const twitter = twitterActionProvider();
const wallet = walletActionProvider();

const agentKit = new AgentKit({
walletProvider,
actionProviders: [cdp, erc721, pyth, twitter, wallet],
actionProviders: [cdp, erc721, pyth, wallet],
});
const actions = agentKit.getActions();
for (const action of actions) {
Expand Down Expand Up @@ -191,19 +202,6 @@ async function chooseMode(): Promise<"chat" | "auto"> {
}
}

import {
AgentKit,
ViemWalletProvider,
cdpActionProvider,
erc721ActionProvider,
pythActionProvider,
twitterActionProvider,
walletActionProvider,
} from "@coinbase/cdp-agentkit-core";
import { createWalletClient, http } from "viem";
import { baseSepolia } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(
"0x4c0883a69102937d6231471b5dbb6208ffd70c02a813d7f2da1c54f2e3be9f38",
);
Expand Down
Loading

0 comments on commit 51e0fdc

Please sign in to comment.