mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-10-02 23:33:58 +00:00
feat(webui): 总览改版 —— 阶段管道滑块 / per-agent 负载环 / 通道→agent 拓扑与光点
总览页此前是一堆数字与文字块,看不出「这一轮走到哪、谁忙、消息从哪进哪出」。 本次把运行态面板改成以图形为主: - 阶段管道:七阶段滑块,由 SSE stage 事件驱动,当前阶段高亮、滑块滑过去; 一轮结束(after_output 或 2.5s 无事件)自动回到空闲,不做假动画。 - 队列与中断栈:沿用五条进度条(L1–L4 + 排队),中断栈补一条深度进度条。 - Agent 拓扑:改成「每 agent 一条横带」——左 inputch、中 agent 节点(圆环 = 负载)、 右 outputch,连线即路由;删掉旧的「归属框 + 单个内核盒」画法(看得出哪个子接了哪条输入)。 - 光点动画:channel_input(新增轻量 SSE 事件)沿 inputch→agent 连线跑; agent_output 沿 agent→outputch 连线跑。用 SMIL animateMotion,不需要 rAF 循环。 - 负载:由该 agent **自己的**调度器积压(排队 / 四级中断 / 中断栈)按级别加权折算, 环形图展示。为此把驻留子的调度器积压透出到状态面(SDK 纯追加字段)。 后端:sdk.ResidentStatus / core.ResidentInfo 增加子 agent 调度器积压四项; WebUI SSE 增加 channel_input 轻量事件(只带通道名与 agent id,不带正文)。 顺带收口对话区视觉(页签改分段控件、消息间距/气泡区分、输入区分隔线)。
This commit is contained in:
@ -121,6 +121,15 @@ type ResidentStatus struct {
|
||||
AllowedOutputs []string `json:"allowed_outputs,omitempty"`
|
||||
InputChTable int `json:"input_ch_table"`
|
||||
CreatedAt string `json:"created_at,omitempty"`
|
||||
|
||||
// 以下四项是该驻留子**自己的**调度器积压摘要,用于 per-agent 负载环形图。
|
||||
//
|
||||
// 根 agent 的积压看 KernelStatus.Scheduler;每个驻留子是独立 agent、
|
||||
// 各跑各的调度器,必须分别给,否则「哪个子忙」在界面无从判断。
|
||||
ReadyQueueDepth int `json:"ready_queue_depth"`
|
||||
PendingInterrupts int `json:"pending_interrupts"`
|
||||
SuspendStack int `json:"suspend_stack"`
|
||||
InterruptQueues [5]int `json:"interrupt_queues"`
|
||||
}
|
||||
|
||||
// SchedulerTask 是任务的最小标识(不暴露帧内容)。
|
||||
|
||||
Reference in New Issue
Block a user