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

Method lifecycleTargetFields

src/node/services/taskService.ts:6082–6098  ·  view source on GitHub ↗
(resolved: ResolvedWorkspaceLifecycleTarget)

Source from the content-addressed store, hash-verified

6080 }
6081
6082 private lifecycleTargetFields(resolved: ResolvedWorkspaceLifecycleTarget): {
6083 taskId?: string;
6084 workspaceId: string;
6085 displayName?: string;
6086 } {
6087 // Match the sidebar label so completed lifecycle tool rows remain understandable after
6088 // archive/remove hides the child workspace from the active list.
6089 const displayName =
6090 coerceNonEmptyString(resolved.metadata?.title) ??
6091 coerceNonEmptyString(resolved.metadata?.name) ??
6092 coerceNonEmptyString(resolved.taskTitle);
6093 return {
6094 ...(resolved.taskId != null ? { taskId: resolved.taskId } : {}),
6095 workspaceId: resolved.workspaceId,
6096 ...(displayName != null ? { displayName } : {}),
6097 };
6098 }
6099
6100 private async findWorkspaceLifecycleMetadata(
6101 workspaceId: string

Calls 1

coerceNonEmptyStringFunction · 0.90

Tested by

no test coverage detected