feat: update historical event types
This commit is contained in:
@@ -608,6 +608,13 @@ export class Panel {
|
||||
)
|
||||
} else if (event.type === 'user_takeover') {
|
||||
cards.push(createCard({ icon: '👤', content: 'User takeover', meta, type: 'input' }))
|
||||
} else if (event.type === 'retry') {
|
||||
const retryInfo = `${event.message || 'Retrying'} (${event.attempt}/${event.maxAttempts})`
|
||||
cards.push(createCard({ icon: '🔄', content: retryInfo, meta, type: 'observation' }))
|
||||
} else if (event.type === 'error') {
|
||||
cards.push(
|
||||
createCard({ icon: '❌', content: event.message || 'Error', meta, type: 'observation' })
|
||||
)
|
||||
}
|
||||
|
||||
return cards
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface PanelAgentAdapter extends EventTarget {
|
||||
|
||||
/** History of agent events */
|
||||
readonly history: readonly {
|
||||
type: 'step' | 'observation' | 'user_takeover' | 'error'
|
||||
type: 'step' | 'observation' | 'user_takeover' | 'retry' | 'error'
|
||||
stepIndex?: number
|
||||
/** For 'step' type */
|
||||
reflection?: {
|
||||
@@ -49,6 +49,11 @@ export interface PanelAgentAdapter extends EventTarget {
|
||||
}
|
||||
/** For 'observation' type */
|
||||
content?: string
|
||||
/** For 'retry' type */
|
||||
attempt?: number
|
||||
maxAttempts?: number
|
||||
/** For 'retry' and 'error' types */
|
||||
message?: string
|
||||
}[]
|
||||
|
||||
/** Current task being executed */
|
||||
|
||||
Reference in New Issue
Block a user