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 & { /** The chat session the command was typed into. */ readonly session: AiSessionHandle; /** Notifications, dialogs, quick input, and progress. */ readonly ui: UiCapability; /** Sign in and read sessions from auth providers. */ readonly auth: AuthViewApi; }

Import

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