feat: auto-execute simple slash commands on Enter (#13985)

This commit is contained in:
Jack Wotherspoon
2025-12-01 12:29:03 -05:00
committed by GitHub
parent 844d3a4dfa
commit f918af82fe
38 changed files with 393 additions and 9 deletions
@@ -52,6 +52,7 @@ export const statsCommand: SlashCommand = {
altNames: ['usage'],
description: 'Check session stats. Usage: /stats [session|model|tools]',
kind: CommandKind.BUILT_IN,
autoExecute: false,
action: async (context: CommandContext) => {
await defaultSessionView(context);
},
@@ -60,6 +61,7 @@ export const statsCommand: SlashCommand = {
name: 'session',
description: 'Show session-specific usage statistics',
kind: CommandKind.BUILT_IN,
autoExecute: true,
action: async (context: CommandContext) => {
await defaultSessionView(context);
},
@@ -68,6 +70,7 @@ export const statsCommand: SlashCommand = {
name: 'model',
description: 'Show model-specific usage statistics',
kind: CommandKind.BUILT_IN,
autoExecute: true,
action: (context: CommandContext) => {
context.ui.addItem(
{
@@ -81,6 +84,7 @@ export const statsCommand: SlashCommand = {
name: 'tools',
description: 'Show tool-specific usage statistics',
kind: CommandKind.BUILT_IN,
autoExecute: true,
action: (context: CommandContext) => {
context.ui.addItem(
{