chore(ext): react misc

This commit is contained in:
Simon
2026-01-28 14:11:44 +08:00
parent dd593f77e9
commit 77a771f0b6
2 changed files with 10 additions and 10 deletions

View File

@@ -82,7 +82,8 @@ export function useAgent(): UseAgentResult {
const execute = useCallback(async (task: string) => {
const agent = agentRef.current
if (!agent) return
console.log('Fire task:', task, agent)
if (!agent) throw new Error('Agent not initialized')
setCurrentTask(task)
setHistory([])