Merge origin/main into refactor/read-many-files-util

Resolved conflicts by:
- index.ts: Adopted main's organized structure, added readManyFiles.js export
- atCommandProcessor.ts: Kept refactored readManyFiles utility approach
- atCommandProcessor.test.ts: Kept tests for refactored approach
This commit is contained in:
tanzhenxin 2026-02-05 19:27:29 +08:00
commit 42da41381a
350 changed files with 20541 additions and 5735 deletions

View file

@ -477,7 +477,6 @@ describe('gemini.tsx main function kitty protocol', () => {
webSearchDefault: undefined,
screenReader: undefined,
vlmSwitchMode: undefined,
useSmartEdit: undefined,
inputFormat: undefined,
outputFormat: undefined,
includePartialMessages: undefined,
@ -642,9 +641,20 @@ describe('startInteractiveUI', () => {
expect(checkForUpdates).toHaveBeenCalledTimes(1);
});
it('should not check for updates when update nag is disabled', async () => {
it('should not call checkForUpdates when enableAutoUpdate is false', async () => {
const { checkForUpdates } = await import('./ui/utils/updateCheck.js');
const settingsWithAutoUpdateDisabled = {
merged: {
general: {
enableAutoUpdate: false,
},
ui: {
hideWindowTitle: false,
},
},
} as LoadedSettings;
const mockInitializationResult = {
authError: null,
themeError: null,
@ -652,26 +662,17 @@ describe('startInteractiveUI', () => {
geminiMdFileCount: 0,
};
const settingsWithUpdateNagDisabled = {
merged: {
general: {
disableUpdateNag: true,
},
ui: {
hideWindowTitle: false,
},
},
} as LoadedSettings;
await startInteractiveUI(
mockConfig,
settingsWithUpdateNagDisabled,
settingsWithAutoUpdateDisabled,
mockStartupWarnings,
mockWorkspaceRoot,
mockInitializationResult,
);
await new Promise((resolve) => setTimeout(resolve, 0));
// checkForUpdates should NOT be called when enableAutoUpdate is false
expect(checkForUpdates).not.toHaveBeenCalled();
});
});