/**
 * @license
 * Copyright 2025 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { listMemoryFiles, refreshMemory, showMemory, } from '@google/gemini-cli-core';
export class MemoryCommand {
    name = 'memory';
    description = 'Manage memory.';
    subCommands = [
        new ShowMemoryCommand(),
        new RefreshMemoryCommand(),
        new ListMemoryCommand(),
    ];
    topLevel = true;
    requiresWorkspace = true;
    async execute(context, _) {
        return new ShowMemoryCommand().execute(context, _);
    }
}
export class ShowMemoryCommand {
    name = 'memory show';
    description = 'Shows the current memory contents.';
    async execute(context, _) {
        const result = showMemory(context.config);
        return { name: this.name, data: result.content };
    }
}
export class RefreshMemoryCommand {
    name = 'memory refresh';
    description = 'Refreshes the memory from the source.';
    async execute(context, _) {
        const result = await refreshMemory(context.config);
        return { name: this.name, data: result.content };
    }
}
export class ListMemoryCommand {
    name = 'memory list';
    description = 'Lists the paths of the GEMINI.md files in use.';
    async execute(context, _) {
        const result = listMemoryFiles(context.config);
        return { name: this.name, data: result.content };
    }
}
//# sourceMappingURL=memory.js.map