Skip to main content

convertSpaceItemsToModels

Agent Runtimes


Agent Runtimes / client/utils/spacerUtils / convertSpaceItemsToModels

Function: convertSpaceItemsToModels()

convertSpaceItemsToModels(items, client): (LexicalDTO | NotebookDTO)[]

Defined in: src/client/utils/spacerUtils.ts:26

Convert raw space items from API response to model instances. This utility function is shared between Space.getItems() and SpacerMixin.getSpaceItems() to avoid code duplication.

Parameters

items

SpaceItem[]

client

AgentRuntimesClient

Client instance to pass to model constructors

Returns

(LexicalDTO | NotebookDTO)[]

Array of Notebook and Lexical model instances