mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Refactor: Streamline memoryUtils and update slash commands (#478)
This commit is contained in:
@@ -77,13 +77,13 @@ describe('useSlashCommandProcessor', () => {
|
||||
|
||||
performAddMemoryEntrySpy.mockReset();
|
||||
(open as Mock).mockClear();
|
||||
vi.spyOn(memoryUtils, 'deleteLastMemoryEntry').mockImplementation(vi.fn());
|
||||
vi.spyOn(memoryUtils, 'deleteAllAddedMemoryEntries').mockImplementation(
|
||||
vi.fn(),
|
||||
);
|
||||
// vi.spyOn(memoryUtils, 'deleteLastMemoryEntry').mockImplementation(vi.fn());
|
||||
// vi.spyOn(memoryUtils, 'deleteAllAddedMemoryEntries').mockImplementation(
|
||||
// vi.fn(),
|
||||
// );
|
||||
|
||||
vi.mocked(memoryUtils.deleteLastMemoryEntry).mockClear();
|
||||
vi.mocked(memoryUtils.deleteAllAddedMemoryEntries).mockClear();
|
||||
// vi.mocked(memoryUtils.deleteLastMemoryEntry).mockClear();
|
||||
// vi.mocked(memoryUtils.deleteAllAddedMemoryEntries).mockClear();
|
||||
|
||||
mockProcessExit.mockClear();
|
||||
(ShowMemoryCommandModule.createShowMemoryAction as Mock).mockClear();
|
||||
|
||||
@@ -113,7 +113,7 @@ export const useSlashCommandProcessor = (
|
||||
{
|
||||
name: 'memory',
|
||||
description:
|
||||
'Manage memory. Usage: /memory <show|refresh|add|delete_last|delete_all_added> [text for add]',
|
||||
'Manage memory. Usage: /memory <show|refresh|add> [text for add]',
|
||||
action: (mainCommand, subCommand, args) => {
|
||||
switch (subCommand) {
|
||||
case 'show':
|
||||
|
||||
Reference in New Issue
Block a user