mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 05:55:17 -07:00
Disallow unsafe type assertions (#18688)
This commit is contained in:
committed by
GitHub
parent
bce1caefd0
commit
fd65416a2f
@@ -111,6 +111,7 @@ export function logUserPrompt(config: Config, event: UserPromptEvent): void {
|
||||
}
|
||||
|
||||
export function logToolCall(config: Config, event: ToolCallEvent): void {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
const uiEvent = {
|
||||
...event,
|
||||
'event.name': EVENT_TOOL_CALL,
|
||||
@@ -242,6 +243,7 @@ export function logRipgrepFallback(
|
||||
}
|
||||
|
||||
export function logApiError(config: Config, event: ApiErrorEvent): void {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
const uiEvent = {
|
||||
...event,
|
||||
'event.name': EVENT_API_ERROR,
|
||||
@@ -273,6 +275,7 @@ export function logApiError(config: Config, event: ApiErrorEvent): void {
|
||||
}
|
||||
|
||||
export function logApiResponse(config: Config, event: ApiResponseEvent): void {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
const uiEvent = {
|
||||
...event,
|
||||
'event.name': EVENT_API_RESPONSE,
|
||||
@@ -372,6 +375,7 @@ export function logSlashCommand(
|
||||
}
|
||||
|
||||
export function logRewind(config: Config, event: RewindEvent): void {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
const uiEvent = {
|
||||
...event,
|
||||
'event.name': EVENT_REWIND,
|
||||
|
||||
Reference in New Issue
Block a user