Merge pull request #3348 from code-yeongyu/refactor/ulw-repo-cleanup-20260411

refactor: simplify nullish guards and remove dead no-op paths
This commit is contained in:
YeonGyu-Kim
2026-04-12 18:04:43 +09:00
committed by GitHub
15 changed files with 156 additions and 46 deletions
-4
View File
@@ -1,4 +1,3 @@
import { normalizeSDKResponse } from "../shared/normalize-sdk-response"
import { getSessionPromptParams } from "../shared/session-prompt-params-state"
import { getModelCapabilities, resolveCompatibleModelSettings } from "../shared"
@@ -58,8 +57,6 @@ function buildChatParamsInput(raw: unknown): ChatParamsHookInput | null {
? model.id
: undefined
const providerId = provider.id
const variant = message.variant
if (typeof providerID !== "string") return null
if (typeof modelID !== "string") return null
if (typeof providerId !== "string") return null
@@ -71,7 +68,6 @@ function buildChatParamsInput(raw: unknown): ChatParamsHookInput | null {
provider: { id: providerId },
message,
rawMessage: message,
...(typeof variant === "string" ? {} : {}),
}
}