feat!: Refine lifecycle hooks; fix abortSignal

- add `stop` method. agent can be reused after stopped
- agent can not be reused after disposed
- extension DO NOT exposes `dispose` anymore. only `stop`.
- update panel for new `stop` method
- fix MultiPageAgent dispose event
- better handling abortSignal
This commit is contained in:
Simon
2026-02-13 17:57:12 +08:00
parent 4dc332a32c
commit dffcb53db9
13 changed files with 80 additions and 68 deletions

View File

@@ -84,7 +84,7 @@ export function useAgent(): UseAgentResult {
}, [])
const stop = useCallback(() => {
agentRef.current?.dispose()
agentRef.current?.stop()
}, [])
const configure = useCallback(async (newConfig: LLMConfig) => {