diff options
Diffstat (limited to 'packages/cli/src/ui/commands/chatCommand.ts')
| -rw-r--r-- | packages/cli/src/ui/commands/chatCommand.ts | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/cli/src/ui/commands/chatCommand.ts b/packages/cli/src/ui/commands/chatCommand.ts index fd56afbd..2f669481 100644 --- a/packages/cli/src/ui/commands/chatCommand.ts +++ b/packages/cli/src/ui/commands/chatCommand.ts @@ -5,7 +5,12 @@ */ import * as fsPromises from 'fs/promises'; -import { CommandContext, SlashCommand, MessageActionReturn } from './types.js'; +import { + CommandContext, + SlashCommand, + MessageActionReturn, + CommandKind, +} from './types.js'; import path from 'path'; import { HistoryItemWithoutId, MessageType } from '../types.js'; @@ -54,6 +59,7 @@ const getSavedChatTags = async ( const listCommand: SlashCommand = { name: 'list', description: 'List saved conversation checkpoints', + kind: CommandKind.BUILT_IN, action: async (context): Promise<MessageActionReturn> => { const chatDetails = await getSavedChatTags(context, false); if (chatDetails.length === 0) { @@ -81,6 +87,7 @@ const saveCommand: SlashCommand = { name: 'save', description: 'Save the current conversation as a checkpoint. Usage: /chat save <tag>', + kind: CommandKind.BUILT_IN, action: async (context, args): Promise<MessageActionReturn> => { const tag = args.trim(); if (!tag) { @@ -122,9 +129,10 @@ const saveCommand: SlashCommand = { const resumeCommand: SlashCommand = { name: 'resume', - altName: 'load', + altNames: ['load'], description: 'Resume a conversation from a checkpoint. Usage: /chat resume <tag>', + kind: CommandKind.BUILT_IN, action: async (context, args) => { const tag = args.trim(); if (!tag) { @@ -193,5 +201,6 @@ const resumeCommand: SlashCommand = { export const chatCommand: SlashCommand = { name: 'chat', description: 'Manage conversation history.', + kind: CommandKind.BUILT_IN, subCommands: [listCommand, saveCommand, resumeCommand], }; |
