fix(core): dynamic session ID injection to resolve resume bugs (#24972)

This commit is contained in:
Tommaso Sciortino
2026-04-08 23:27:24 +00:00
committed by GitHub
parent 80764c8bb5
commit d06dba3538
33 changed files with 165 additions and 189 deletions
@@ -158,6 +158,7 @@ Implement a comprehensive authentication system with multiple providers.
getIdeMode: () => false,
isTrustedFolder: () => true,
getPreferredEditor: () => undefined,
getSessionId: () => 'test-session-id',
storage: {
getPlansDir: () => mockPlansDir,
},
@@ -464,6 +465,7 @@ Implement a comprehensive authentication system with multiple providers.
getTargetDir: () => mockTargetDir,
getIdeMode: () => false,
isTrustedFolder: () => true,
getSessionId: () => 'test-session-id',
storage: {
getPlansDir: () => mockPlansDir,
},
@@ -82,6 +82,7 @@ const mockConfigPlain = {
getExtensionRegistryURI: () => undefined,
getContentGeneratorConfig: () => ({ authType: undefined }),
getSandboxEnabled: () => false,
getSessionId: () => 'test-session-id',
};
const mockConfig = mockConfigPlain as unknown as Config;
@@ -124,7 +124,7 @@ describe('<HistoryItemDisplay />', () => {
duration: '1s',
};
const { lastFrame, unmount } = await renderWithProviders(
<SessionStatsProvider>
<SessionStatsProvider sessionId="test-session-id">
<HistoryItemDisplay {...baseItem} item={item} />
</SessionStatsProvider>,
);
@@ -157,7 +157,7 @@ describe('<HistoryItemDisplay />', () => {
type: 'model_stats',
};
const { lastFrame, unmount } = await renderWithProviders(
<SessionStatsProvider>
<SessionStatsProvider sessionId="test-session-id">
<HistoryItemDisplay {...baseItem} item={item} />
</SessionStatsProvider>,
);
@@ -173,7 +173,7 @@ describe('<HistoryItemDisplay />', () => {
type: 'tool_stats',
};
const { lastFrame, unmount } = await renderWithProviders(
<SessionStatsProvider>
<SessionStatsProvider sessionId="test-session-id">
<HistoryItemDisplay {...baseItem} item={item} />
</SessionStatsProvider>,
);
@@ -190,7 +190,7 @@ describe('<HistoryItemDisplay />', () => {
duration: '1s',
};
const { lastFrame, unmount } = await renderWithProviders(
<SessionStatsProvider>
<SessionStatsProvider sessionId="test-session-id">
<HistoryItemDisplay {...baseItem} item={item} />
</SessionStatsProvider>,
);
@@ -86,6 +86,7 @@ describe('<ModelDialog />', () => {
getProModelNoAccess: mockGetProModelNoAccess,
getProModelNoAccessSync: mockGetProModelNoAccessSync,
getLastRetrievedQuota: () => ({ buckets: [] }),
getSessionId: () => 'test-session-id',
};
beforeEach(() => {
@@ -55,6 +55,7 @@ describe('ToolConfirmationQueue', () => {
getFileSystemService: () => ({
readFile: vi.fn().mockResolvedValue('Plan content'),
}),
getSessionId: () => 'test-session-id',
storage: {
getPlansDir: () => '/mock/temp/plans',
},