Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ The `A2AClient` makes it easy to communicate with any A2A-compliant agent.

```typescript
// client.ts
import { A2AClient, SendMessageSuccessResponse } from "@a2a-js/sdk/client";
import { Message, MessageSendParams } from "@a2a-js/sdk";
import { A2AClient } from "@a2a-js/sdk/client";
import { Message, MessageSendParams, SendMessageSuccessResponse } from "@a2a-js/sdk";
import { v4 as uuidv4 } from "uuid";

async function run() {
Expand Down Expand Up @@ -212,8 +212,8 @@ The client sends a message and receives a `Task` object as the result.

```typescript
// client.ts
import { A2AClient, SendMessageSuccessResponse } from "@a2a-js/sdk/client";
import { Message, MessageSendParams, Task } from "@a2a-js/sdk";
import { A2AClient } from "@a2a-js/sdk/client";
import { Message, MessageSendParams, Task, SendMessageSuccessResponse } from "@a2a-js/sdk";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For improved code consistency and readability, it's a good practice to sort named imports alphabetically.1 In this case, SendMessageSuccessResponse should come before Task.

Suggested change
import { Message, MessageSendParams, Task, SendMessageSuccessResponse } from "@a2a-js/sdk";
import { Message, MessageSendParams, SendMessageSuccessResponse, Task } from "@a2a-js/sdk";

Style Guide References

Footnotes

  1. Many style guides, including common ESLint configurations, recommend sorting named imports alphabetically to improve code readability and maintainability by making it easier to find specific imports.

// ... other imports ...

const client = await A2AClient.fromCardUrl("http://localhost:4000/.well-known/agent-card.json");
Expand Down