Skip to main content

SlashCommandContext

type

The context a `slashCommand(...)` handler receives. `session` is what it adds: the conversation the user typed the slash command into. Work from it rather than from `ctx.ai.sessions.create(...)`, so anything you spawn or fork stays a child of this conversation and inherits its model and working directory.

type SlashCommandContext = ContextBase & { auth: AuthViewApi; session: AiSessionHandle; ui: UiCapability }

Import

import { SlashCommandContext } from '@modular/sdk/view';

Notes

category
Context