Skip to content

@sqlrooms/documents / StartBlockScopedChatActions

Type Alias: StartBlockScopedChatActions ​

StartBlockScopedChatActions = object

Host-provided actions used by startBlockScopedChat.

Apps adapt their room store into this bag so the shared helper stays free of product-specific store imports.

Properties ​

getArtifact ​

getArtifact: (artifactId) => StartBlockScopedChatArtifact | undefined

Parameters ​

ParameterType
artifactIdstring

Returns ​

StartBlockScopedChatArtifact | undefined


getCurrentArtifactId ​

getCurrentArtifactId: () => string | undefined

Returns ​

string | undefined


setCurrentArtifact ​

setCurrentArtifact: (artifactId) => void

Parameters ​

ParameterType
artifactIdstring

Returns ​

void


getAiSessions ​

getAiSessions: () => ArtifactAiSessionWithContent[]

Returns ​

ArtifactAiSessionWithContent[]


getSessionArtifactLinks: () => ArtifactSessionLink[]

All session↔artifact links. Passed through directly (not collapsed into a one-artifact-per-session map) so sessions linked to multiple artifacts are matched for every artifact they belong to.

Returns ​

ArtifactSessionLink[]


createArtifactScopedSession ​

createArtifactScopedSession: () => string | undefined

Returns ​

string | undefined


switchSession ​

switchSession: (sessionId) => void

Parameters ​

ParameterType
sessionIdstring

Returns ​

void


getSessionDraftContextItemIds ​

getSessionDraftContextItemIds: (sessionId) => string[] | undefined

Parameters ​

ParameterType
sessionIdstring

Returns ​

string[] | undefined


setSessionDraftContextItemIds ​

setSessionDraftContextItemIds: (sessionId, ids) => void

Parameters ​

ParameterType
sessionIdstring
idsstring[]

Returns ​

void


setPrompt ​

setPrompt: (sessionId, prompt) => void

Parameters ​

ParameterType
sessionIdstring
promptstring

Returns ​

void


startAnalysisWhenReady ​

startAnalysisWhenReady: (sessionId) => Promise<boolean>

Parameters ​

ParameterType
sessionIdstring

Returns ​

Promise<boolean>