feat: includes history events in panel

This commit is contained in:
Simon
2026-01-15 21:48:14 +08:00
parent 42130d6f1d
commit eab9cf64e8
4 changed files with 22 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ export type PanelUpdate =
| { type: 'completed' }
| { type: 'toolExecuting'; toolName: string; args: any }
| { type: 'toolCompleted'; toolName: string; args: any; result?: string; duration?: number }
| { type: 'observation'; content: string }
/**
* Agent control panel
@@ -196,6 +197,8 @@ export class Panel {
duration: data.duration,
}
}
case 'observation':
return { type: 'observation', displayText: data.content }
}
}
@@ -581,7 +584,7 @@ export class Panel {
typeClass = styles.error
statusIcon = '❌'
} else if (step.type === 'tool_executing') {
statusIcon = '⚙️'
statusIcon = '🔨'
} else if (step.type === 'output') {
typeClass = styles.output
statusIcon = '🤖'
@@ -591,6 +594,9 @@ export class Panel {
} else if (step.type === 'retry') {
typeClass = styles.retry
statusIcon = '🔄'
} else if (step.type === 'observation') {
typeClass = styles.observation
statusIcon = '👁️'
} else {
statusIcon = '🧠'
}