Audit of e875853
This commit is contained in:
@@ -260,8 +260,7 @@ func (p codexProcess) drive(m *Manager, l *live) {
|
||||
}
|
||||
|
||||
type antigravityProcess struct {
|
||||
s *antigravity.Session
|
||||
steps *agySteps
|
||||
s *antigravity.Session
|
||||
}
|
||||
|
||||
func (m *Manager) startAntigravity(ctx context.Context, sess api.AgentSession, l *live, g string, servers []*mcp.Server, stdio []mcp.Stdio, env []string) (agentProcess, error) {
|
||||
@@ -293,7 +292,7 @@ func (m *Manager) startAntigravity(ctx context.Context, sess api.AgentSession, l
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
return antigravityProcess{s: s, steps: newAgySteps()}, nil
|
||||
return antigravityProcess{s: s}, nil
|
||||
}
|
||||
|
||||
func (p antigravityProcess) send(ctx context.Context, text string, images []image) error {
|
||||
@@ -324,12 +323,13 @@ func (p antigravityProcess) discard() {
|
||||
|
||||
func (p antigravityProcess) drive(m *Manager, l *live) {
|
||||
ctx := context.Background()
|
||||
steps := &agySteps{text: map[int]*strings.Builder{}, tools: map[string]bool{}}
|
||||
for ev := range p.s.Events() {
|
||||
start := time.Now()
|
||||
if wait := start.Sub(ev.Read); wait > 200*time.Millisecond {
|
||||
slog.Info("agent event waited", "session", l.id, "event", ev.Kind, "wait", wait)
|
||||
}
|
||||
err := m.handleAntigravity(ctx, l, p, ev)
|
||||
err := m.handleAntigravity(ctx, l, p, steps, ev)
|
||||
if err != nil {
|
||||
slog.Error("record agent event", "session", l.id, "event", ev.Kind, "err", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user