fix(server,tui): restore output panel + full event history on session reopen
Reopening a session after relaunch sent only a thin summary snapshot, so the output panel was blank and the event list showed at most 7 entries (of a 100+ event run). - SessionSnapshot now carries lastOutput/lastResponse, resolved from the last InferenceCompleted artifact in CAS; tui-go onSnapshot restores the output panel - recentEvents cap raised 7 -> 200 so a normal session's event list isn't truncated - resolveLastOutput extracted as a helper Note: artifact content is unaffected — verified intact and CAS-retrievable for role_pipeline sessions (artread); content-less artifacts occur only in workflows that record no ArtifactContentStored (e.g. healthcheck/process-result stages).
This commit is contained in:
@@ -394,6 +394,8 @@ func (m *Model) onSnapshot(msg protocol.ServerMessage) {
|
||||
if msg.State != nil && msg.State.CurrentStageID != nil {
|
||||
sess.CurrentStage = *msg.State.CurrentStageID
|
||||
}
|
||||
sess.LastOutput = msg.LastOutput
|
||||
sess.LastResponse = msg.LastResponse
|
||||
for _, e := range msg.RecentEvents {
|
||||
sess.Events = append(sess.Events, EventEntry{formatTime(e.Timestamp), e.Type, e.Detail})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user