feat: update historical event types
This commit is contained in:
@@ -99,8 +99,7 @@ export class PageAgentCore extends EventTarget {
|
||||
this.emitActivity({ type: 'retrying', attempt, maxAttempts })
|
||||
// Also push to history for panel rendering
|
||||
this.history.push({
|
||||
type: 'error',
|
||||
errorType: 'retry',
|
||||
type: 'retry',
|
||||
message: `LLM retry attempt ${attempt} of ${maxAttempts}`,
|
||||
attempt,
|
||||
maxAttempts,
|
||||
@@ -114,7 +113,6 @@ export class PageAgentCore extends EventTarget {
|
||||
// Also push to history for panel rendering
|
||||
this.history.push({
|
||||
type: 'error',
|
||||
errorType: 'error',
|
||||
message,
|
||||
rawResponse: (error as InvokeError).rawResponse,
|
||||
})
|
||||
|
||||
@@ -69,14 +69,21 @@ export interface UserTakeoverEvent {
|
||||
}
|
||||
|
||||
/**
|
||||
* Error event (retry or error from LLM)
|
||||
* Retry event - LLM call is being retried
|
||||
*/
|
||||
export interface RetryEvent {
|
||||
type: 'retry'
|
||||
message: string
|
||||
attempt: number
|
||||
maxAttempts: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Error event - fatal error from LLM or execution
|
||||
*/
|
||||
export interface AgentErrorEvent {
|
||||
type: 'error'
|
||||
errorType: 'retry' | 'error'
|
||||
message: string
|
||||
attempt?: number
|
||||
maxAttempts?: number
|
||||
rawResponse?: unknown
|
||||
}
|
||||
|
||||
@@ -87,6 +94,7 @@ export type HistoricalEvent =
|
||||
| AgentStepEvent
|
||||
| ObservationEvent
|
||||
| UserTakeoverEvent
|
||||
| RetryEvent
|
||||
| AgentErrorEvent
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user