fix: panel init timing

This commit is contained in:
Simon
2025-10-16 16:49:13 +08:00
parent c6453584db
commit b7a6acbbf3

View File

@@ -53,6 +53,7 @@ export class PageAgent extends EventTarget {
id = uid() id = uid()
bus = getEventBus(this.id) bus = getEventBus(this.id)
i18n: I18n i18n: I18n
panel: Panel
paused = false paused = false
disposed = false disposed = false
task = '' task = ''
@@ -79,8 +80,6 @@ export class PageAgent extends EventTarget {
tools = new Map(tools) tools = new Map(tools)
/** Fullscreen mask */ /** Fullscreen mask */
mask = new SimulatorMask() mask = new SimulatorMask()
/** Interactive panel */
panel = new Panel(this)
/** History records */ /** History records */
history: AgentHistory[] = [] history: AgentHistory[] = []
@@ -90,6 +89,7 @@ export class PageAgent extends EventTarget {
this.config = config this.config = config
this.#llm = new LLM(this.config, this.id) this.#llm = new LLM(this.config, this.id)
this.i18n = new I18n(this.config.language) this.i18n = new I18n(this.config.language)
this.panel = new Panel(this)
patchReact(this) patchReact(this)
} }