fix(patch): cherry-pick a404fb8 to release/v0.8.0-pr-10280 to patch version v0.8.0 and create version 0.8.1 (#10681)

Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
gemini-cli-robot
2025-10-07 17:28:56 -07:00
committed by GitHub
parent a07f40a753
commit 024aaf95ec
13 changed files with 599 additions and 361 deletions
@@ -26,6 +26,7 @@ import { ExtensionUpdateState } from '../state/extensions.js';
vi.mock('../../config/extensions/update.js', () => ({
updateExtension: vi.fn(),
updateAllUpdatableExtensions: vi.fn(),
checkForAllExtensionUpdates: vi.fn(),
}));
const mockUpdateExtension = updateExtension as MockedFunction<
@@ -51,6 +52,9 @@ describe('extensionsCommand', () => {
getWorkingDir: () => '/test/dir',
},
},
ui: {
dispatchExtensionStateUpdate: vi.fn(),
},
});
});
@@ -168,10 +172,10 @@ describe('extensionsCommand', () => {
updatedVersion: '1.0.1',
});
mockGetExtensions.mockReturnValue([extension]);
mockContext.ui.extensionsUpdateState.set(
extension.name,
ExtensionUpdateState.UPDATE_AVAILABLE,
);
mockContext.ui.extensionsUpdateState.set(extension.name, {
status: ExtensionUpdateState.UPDATE_AVAILABLE,
processed: false,
});
await updateAction(mockContext, 'ext-one');
expect(mockUpdateExtension).toHaveBeenCalledWith(
extension,