chore: fix type error

This commit is contained in:
d-kimsuon
2025-10-31 01:26:24 +09:00
parent 066047a1a4
commit 2ae3123cef
2 changed files with 23 additions and 2 deletions

View File

@@ -283,8 +283,29 @@ const LayerImpl = Effect.gen(function* () {
try {
for await (const message of messageIter) {
if (
message.type === "system" &&
message.subtype === "hook_response"
) {
continue;
}
if (
message.type === "system" &&
message.subtype === "compact_boundary"
) {
continue;
}
const result = await Runtime.runPromise(runtime)(
handleMessage(message),
handleMessage(
message.type === "system"
? {
...message,
plugins: [],
}
: message,
),
).catch((error) => {
// iter 自体が落ちてなければ継続したいので握りつぶす
Effect.runFork(

View File

@@ -1,7 +1,7 @@
import type {
SDKResultMessage,
SDKSystemMessage,
} from "@anthropic-ai/claude-code";
} from "@anthropic-ai/claude-agent-sdk";
import { Effect } from "effect";
import { describe, expect, it } from "vitest";
import { testPlatformLayer } from "../../../../testing/layers/testPlatformLayer";