mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-17 15:23:08 -07:00
fix: resolve inherited strict typing violations
This commit is contained in:
@@ -32,9 +32,7 @@ describe('AgentSession', () => {
|
||||
await session.abort();
|
||||
expect(
|
||||
session.events.some(
|
||||
(e) =>
|
||||
e.type === 'agent_end' &&
|
||||
(e as AgentEvent<'agent_end'>).reason === 'aborted',
|
||||
(e) => e.type === 'agent_end' && e.reason === 'aborted',
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
@@ -86,6 +86,7 @@ export class MockAgentProtocol implements AgentProtocol {
|
||||
) {
|
||||
const now = new Date().toISOString();
|
||||
for (const eventData of events) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
const event: AgentEvent = {
|
||||
...eventData,
|
||||
id: eventData.id ?? `e-${this._nextEventId++}`,
|
||||
@@ -126,6 +127,7 @@ export class MockAgentProtocol implements AgentProtocol {
|
||||
|
||||
// Helper to normalize and prepare for emission
|
||||
const normalize = (eventData: MockAgentEvent): AgentEvent =>
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
({
|
||||
...eventData,
|
||||
id: eventData.id ?? `e-${this._nextEventId++}`,
|
||||
|
||||
Reference in New Issue
Block a user