prefactor(commands): Command Service Prefactor for Extensible Commands (#4511)

This commit is contained in:
Abhi
2025-07-20 16:57:34 -04:00
committed by GitHub
parent 7a9821607b
commit 2a95c8287e
36 changed files with 919 additions and 720 deletions

View File

@@ -5,11 +5,16 @@
*/
import { copyToClipboard } from '../utils/commandUtils.js';
import { SlashCommand, SlashCommandActionReturn } from './types.js';
import {
CommandKind,
SlashCommand,
SlashCommandActionReturn,
} from './types.js';
export const copyCommand: SlashCommand = {
name: 'copy',
description: 'Copy the last result or code snippet to clipboard',
kind: CommandKind.BUILT_IN,
action: async (context, _args): Promise<SlashCommandActionReturn | void> => {
const chat = await context.services.config?.getGeminiClient()?.getChat();
const history = chat?.getHistory();