Observe native Claude automations and preserve pending timers
This commit is contained in:
@@ -249,6 +249,7 @@ func (c *Chat) connectHostContext(ctx context.Context, record claudehost.Record)
|
||||
p.link.tasksIncomplete.Store(status.Tasks == nil && status.Base > 0)
|
||||
p.stderr.WriteString(status.Stderr)
|
||||
p.models, p.account, p.appliedModel = models, account, status.Model
|
||||
p.automations = status.Automations
|
||||
plan := replayPlan{base: status.Base, silentUntil: status.Acked, catchUpEnd: status.End, pending: map[string]bool{}, busyAtAcked: status.BusyAtAcked, restore: true, tasks: status.Tasks}
|
||||
for _, pending := range status.Pending {
|
||||
plan.pending[pending.ID] = true
|
||||
@@ -267,6 +268,10 @@ func (c *Chat) connectHostContext(ctx context.Context, record claudehost.Record)
|
||||
func (s *session) adoptLocked(p *process) {
|
||||
s.models, s.account = p.models, p.account
|
||||
s.appliedModel = p.appliedModel
|
||||
if p.automations != nil {
|
||||
s.automations = p.automations
|
||||
s.automationProcess = p
|
||||
}
|
||||
if s.model == "" {
|
||||
s.model = p.appliedModel
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user