MCPcopy
hub / github.com/coder/mux / coerceNonEmptyString

Function coerceNonEmptyString

src/node/services/taskUtils.ts:11–15  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

9import { resolveModelFallbackChain } from "@/common/utils/ai/modelFallbacks";
10
11export function coerceNonEmptyString(value: unknown): string | undefined {
12 if (typeof value !== "string") return undefined;
13 const trimmed = value.trim();
14 return trimmed.length > 0 ? trimmed : undefined;
15}
16
17export async function tryReadGitHeadCommitSha(
18 runtime: Runtime,

Callers 15

maybeStartGenerationMethod · 0.90
generateMethod · 0.90
ensureProjectArtifactMethod · 0.90
resolveTaskAISettingsMethod · 0.90
initializeMethod · 0.90
createManyMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected