mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 15:10:59 -07:00
chore: simplify naming
This commit is contained in:
@@ -37,7 +37,7 @@ describe('processUtils', () => {
|
||||
expect(handleAutoUpdate.waitForUpdateCompletion).toHaveBeenCalledTimes(1);
|
||||
expect(runExitCleanup).toHaveBeenCalledTimes(1);
|
||||
expect(process.send).toHaveBeenCalledWith({
|
||||
type: 'relaunch-resume-session',
|
||||
type: 'relaunch-session',
|
||||
sessionId: expect.any(String),
|
||||
});
|
||||
expect(processExit).toHaveBeenCalledWith(RELAUNCH_EXIT_CODE);
|
||||
@@ -53,7 +53,7 @@ describe('processUtils', () => {
|
||||
expect(handleAutoUpdate.waitForUpdateCompletion).toHaveBeenCalledTimes(1);
|
||||
expect(runExitCleanup).toHaveBeenCalledTimes(1);
|
||||
expect(process.send).toHaveBeenCalledWith({
|
||||
type: 'relaunch-resume-session',
|
||||
type: 'relaunch-session',
|
||||
sessionId: 'custom-session-id',
|
||||
});
|
||||
expect(processExit).toHaveBeenCalledWith(RELAUNCH_EXIT_CODE);
|
||||
|
||||
@@ -31,7 +31,7 @@ export async function relaunchApp(sessionIdOverride?: string): Promise<void> {
|
||||
|
||||
if (process.send) {
|
||||
process.send({
|
||||
type: 'relaunch-resume-session',
|
||||
type: 'relaunch-session',
|
||||
sessionId: sessionIdOverride ?? sessionId,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ describe('relaunchAppInChildProcess', () => {
|
||||
expect(processExitSpy).toHaveBeenCalledWith(1);
|
||||
});
|
||||
|
||||
it('should append --resume <sessionId> on the next spawn if relaunch-resume-session message is received', async () => {
|
||||
it('should append --resume <sessionId> on the next spawn if relaunch-session message is received', async () => {
|
||||
process.argv = ['/usr/bin/node', '/app/cli.js', '--some-flag'];
|
||||
|
||||
let spawnCount = 0;
|
||||
@@ -328,7 +328,7 @@ describe('relaunchAppInChildProcess', () => {
|
||||
// First run: send the resume session ID, then exit with RELAUNCH_EXIT_CODE
|
||||
setImmediate(() => {
|
||||
mockChild.emit('message', {
|
||||
type: 'relaunch-resume-session',
|
||||
type: 'relaunch-session',
|
||||
sessionId: 'test-session-123',
|
||||
});
|
||||
mockChild.emit('close', RELAUNCH_EXIT_CODE);
|
||||
@@ -378,7 +378,7 @@ describe('relaunchAppInChildProcess', () => {
|
||||
if (spawnCount === 1) {
|
||||
setImmediate(() => {
|
||||
mockChild.emit('message', {
|
||||
type: 'relaunch-resume-session',
|
||||
type: 'relaunch-session',
|
||||
sessionId: 'new-session-456',
|
||||
});
|
||||
mockChild.emit('close', RELAUNCH_EXIT_CODE);
|
||||
|
||||
@@ -90,7 +90,7 @@ export async function relaunchAppInChildProcess(
|
||||
(msg: { type?: string; settings?: unknown; sessionId?: string }) => {
|
||||
if (msg.type === 'admin-settings-update' && msg.settings) {
|
||||
latestAdminSettings = msg.settings as AdminControlsSettings;
|
||||
} else if (msg.type === 'relaunch-resume-session' && msg.sessionId) {
|
||||
} else if (msg.type === 'relaunch-session' && msg.sessionId) {
|
||||
resumeSessionId = msg.sessionId;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user