mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 10:34:35 -07:00
Adds executeCommand endpoint with support for /extensions list (#11515)
This commit is contained in:
@@ -25,6 +25,7 @@ describe('extensionsCommand', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
vi.resetAllMocks();
|
||||
mockGetExtensions.mockReturnValue([]);
|
||||
mockContext = createMockCommandContext({
|
||||
services: {
|
||||
config: {
|
||||
@@ -46,6 +47,7 @@ describe('extensionsCommand', () => {
|
||||
expect(mockContext.ui.addItem).toHaveBeenCalledWith(
|
||||
{
|
||||
type: MessageType.EXTENSIONS_LIST,
|
||||
extensions: expect.any(Array),
|
||||
},
|
||||
expect.any(Number),
|
||||
);
|
||||
@@ -113,11 +115,13 @@ describe('extensionsCommand', () => {
|
||||
await updateAction(mockContext, '--all');
|
||||
expect(mockContext.ui.setPendingItem).toHaveBeenCalledWith({
|
||||
type: MessageType.EXTENSIONS_LIST,
|
||||
extensions: expect.any(Array),
|
||||
});
|
||||
expect(mockContext.ui.setPendingItem).toHaveBeenCalledWith(null);
|
||||
expect(mockContext.ui.addItem).toHaveBeenCalledWith(
|
||||
{
|
||||
type: MessageType.EXTENSIONS_LIST,
|
||||
extensions: expect.any(Array),
|
||||
},
|
||||
expect.any(Number),
|
||||
);
|
||||
@@ -130,11 +134,13 @@ describe('extensionsCommand', () => {
|
||||
await updateAction(mockContext, '--all');
|
||||
expect(mockContext.ui.setPendingItem).toHaveBeenCalledWith({
|
||||
type: MessageType.EXTENSIONS_LIST,
|
||||
extensions: expect.any(Array),
|
||||
});
|
||||
expect(mockContext.ui.setPendingItem).toHaveBeenCalledWith(null);
|
||||
expect(mockContext.ui.addItem).toHaveBeenCalledWith(
|
||||
{
|
||||
type: MessageType.EXTENSIONS_LIST,
|
||||
extensions: expect.any(Array),
|
||||
},
|
||||
expect.any(Number),
|
||||
);
|
||||
@@ -202,11 +208,13 @@ describe('extensionsCommand', () => {
|
||||
});
|
||||
expect(mockContext.ui.setPendingItem).toHaveBeenCalledWith({
|
||||
type: MessageType.EXTENSIONS_LIST,
|
||||
extensions: expect.any(Array),
|
||||
});
|
||||
expect(mockContext.ui.setPendingItem).toHaveBeenCalledWith(null);
|
||||
expect(mockContext.ui.addItem).toHaveBeenCalledWith(
|
||||
{
|
||||
type: MessageType.EXTENSIONS_LIST,
|
||||
extensions: expect.any(Array),
|
||||
},
|
||||
expect.any(Number),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user