mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 10:34:35 -07:00
feat: auto-execute on slash command completion functions (#14584)
This commit is contained in:
@@ -157,7 +157,7 @@ const resumeCommand: SlashCommand = {
|
||||
description:
|
||||
'Resume a conversation from a checkpoint. Usage: /chat resume <tag>',
|
||||
kind: CommandKind.BUILT_IN,
|
||||
autoExecute: false,
|
||||
autoExecute: true,
|
||||
action: async (context, args) => {
|
||||
const tag = args.trim();
|
||||
if (!tag) {
|
||||
@@ -241,7 +241,7 @@ const deleteCommand: SlashCommand = {
|
||||
name: 'delete',
|
||||
description: 'Delete a conversation checkpoint. Usage: /chat delete <tag>',
|
||||
kind: CommandKind.BUILT_IN,
|
||||
autoExecute: false,
|
||||
autoExecute: true,
|
||||
action: async (context, args): Promise<MessageActionReturn> => {
|
||||
const tag = args.trim();
|
||||
if (!tag) {
|
||||
|
||||
@@ -228,6 +228,7 @@ const enableCommand: SlashCommand = {
|
||||
name: 'enable',
|
||||
description: 'Enable a hook by name',
|
||||
kind: CommandKind.BUILT_IN,
|
||||
autoExecute: true,
|
||||
action: enableAction,
|
||||
completion: completeHookNames,
|
||||
};
|
||||
@@ -236,6 +237,7 @@ const disableCommand: SlashCommand = {
|
||||
name: 'disable',
|
||||
description: 'Disable a hook by name',
|
||||
kind: CommandKind.BUILT_IN,
|
||||
autoExecute: true,
|
||||
action: disableAction,
|
||||
completion: completeHookNames,
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ const authCommand: SlashCommand = {
|
||||
name: 'auth',
|
||||
description: 'Authenticate with an OAuth-enabled MCP server',
|
||||
kind: CommandKind.BUILT_IN,
|
||||
autoExecute: false,
|
||||
autoExecute: true,
|
||||
action: async (
|
||||
context: CommandContext,
|
||||
args: string,
|
||||
|
||||
@@ -189,7 +189,7 @@ export const restoreCommand = (config: Config | null): SlashCommand | null => {
|
||||
description:
|
||||
'Restore a tool call. This will reset the conversation and file history to the state it was in when the tool call was suggested',
|
||||
kind: CommandKind.BUILT_IN,
|
||||
autoExecute: false,
|
||||
autoExecute: true,
|
||||
action: restoreAction,
|
||||
completion,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user