Skip to content

Commit 1996763

Browse files
committed
Minor linting/prettier fixes
1 parent 5d3b541 commit 1996763

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
lines changed

frontend/src/components/chat/ChatMessage.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ interface ChatMessageProps {
1414
}
1515

1616
// eslint-disable-next-line @typescript-eslint/no-unused-vars
17-
export function ChatMessage({ message, sessionId: _sessionId, onFeedbackSubmit }: ChatMessageProps) {
17+
export function ChatMessage({
18+
message,
19+
sessionId: _sessionId,
20+
onFeedbackSubmit,
21+
}: ChatMessageProps) {
1822
const [isDialogOpen, setIsDialogOpen] = useState(false)
1923
const [selectedFeedbackType, setSelectedFeedbackType] = useState<"positive" | "negative">(
2024
"positive"
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
import type { ChunkParser } from "../types";
4+
import type { ChunkParser } from "../types"
55

66
/**
77
* Parses SSE chunks from Claude Agent SDK agents.
@@ -13,44 +13,44 @@ import type { ChunkParser } from "../types";
1313
* - {"claude_session_id": "..."} → session ID for resumption
1414
*/
1515
export const parseClaudeAgentSdkChunk: ChunkParser = (line, callback) => {
16-
if (!line.startsWith("data: ")) return;
16+
if (!line.startsWith("data: ")) return
1717

18-
const data = line.substring(6).trim();
19-
if (!data) return;
18+
const data = line.substring(6).trim()
19+
if (!data) return
2020

2121
try {
22-
const json = JSON.parse(data);
22+
const json = JSON.parse(data)
2323

2424
// Text streaming
2525
if (typeof json.data === "string") {
26-
callback({ type: "text", content: json.data });
27-
return;
26+
callback({ type: "text", content: json.data })
27+
return
2828
}
2929

3030
// Tool use — claude-agent-sdk sends complete tool info per event
3131
if (json.current_tool_use) {
32-
const tool = json.current_tool_use;
32+
const tool = json.current_tool_use
3333
callback({
3434
type: "tool_use_start",
3535
toolUseId: tool.toolUseId,
3636
name: tool.name,
37-
});
37+
})
3838
if (tool.input) {
3939
callback({
4040
type: "tool_use_delta",
4141
toolUseId: tool.toolUseId,
4242
input: JSON.stringify(tool.input),
43-
});
43+
})
4444
}
45-
return;
45+
return
4646
}
4747

4848
// Claude session ID for conversation resumption
4949
if (json.claude_session_id) {
50-
callback({ type: "lifecycle", event: "session_id" });
51-
return;
50+
callback({ type: "lifecycle", event: "session_id" })
51+
return
5252
}
5353
} catch {
54-
console.debug("Failed to parse claude-agent-sdk event:", data);
54+
console.debug("Failed to parse claude-agent-sdk event:", data)
5555
}
56-
};
56+
}

frontend/src/lib/agentcore-client/types.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
/** Supported agent framework patterns */
5-
export type AgentPattern = "strands-single-agent" | "langgraph-single-agent" | "claude-agent-sdk-single-agent" | "claude-agent-sdk-multi-agent"
5+
export type AgentPattern =
6+
| "strands-single-agent"
7+
| "langgraph-single-agent"
8+
| "claude-agent-sdk-single-agent"
9+
| "claude-agent-sdk-multi-agent"
610

711
/** Configuration for AgentCoreClient */
812
export interface AgentCoreConfig {

0 commit comments

Comments
 (0)