summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/commands/memoryCommand.ts
diff options
context:
space:
mode:
authorAbhi <[email protected]>2025-07-20 16:57:34 -0400
committerGitHub <[email protected]>2025-07-20 20:57:34 +0000
commit2a95c8287ed3b6fc38e7dcec5f0a19b9e2d843e7 (patch)
tree1a9ffb6be8468aa44e54bfcb8ae2f961b970cf9a /packages/cli/src/ui/commands/memoryCommand.ts
parent7a9821607bafcbb98cf059705aaab358d46e711c (diff)
prefactor(commands): Command Service Prefactor for Extensible Commands (#4511)
Diffstat (limited to 'packages/cli/src/ui/commands/memoryCommand.ts')
-rw-r--r--packages/cli/src/ui/commands/memoryCommand.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/cli/src/ui/commands/memoryCommand.ts b/packages/cli/src/ui/commands/memoryCommand.ts
index 18ca96bb..afa43031 100644
--- a/packages/cli/src/ui/commands/memoryCommand.ts
+++ b/packages/cli/src/ui/commands/memoryCommand.ts
@@ -6,15 +6,21 @@
import { getErrorMessage } from '@google/gemini-cli-core';
import { MessageType } from '../types.js';
-import { SlashCommand, SlashCommandActionReturn } from './types.js';
+import {
+ CommandKind,
+ SlashCommand,
+ SlashCommandActionReturn,
+} from './types.js';
export const memoryCommand: SlashCommand = {
name: 'memory',
description: 'Commands for interacting with memory.',
+ kind: CommandKind.BUILT_IN,
subCommands: [
{
name: 'show',
description: 'Show the current memory contents.',
+ kind: CommandKind.BUILT_IN,
action: async (context) => {
const memoryContent = context.services.config?.getUserMemory() || '';
const fileCount = context.services.config?.getGeminiMdFileCount() || 0;
@@ -36,6 +42,7 @@ export const memoryCommand: SlashCommand = {
{
name: 'add',
description: 'Add content to the memory.',
+ kind: CommandKind.BUILT_IN,
action: (context, args): SlashCommandActionReturn | void => {
if (!args || args.trim() === '') {
return {
@@ -63,6 +70,7 @@ export const memoryCommand: SlashCommand = {
{
name: 'refresh',
description: 'Refresh the memory from the source.',
+ kind: CommandKind.BUILT_IN,
action: async (context) => {
context.ui.addItem(
{