Simplify codebase per audit of 0139564

This commit is contained in:
Ian Gulliver
2026-10-23 18:25:56 -07:00
parent 013956440d
commit 68ccff3f03
24 changed files with 122 additions and 190 deletions
+2 -2
View File
@@ -166,13 +166,13 @@ func (m *Manager) holdWhilePaused(ctx context.Context, l *live, toolUseID string
}
}
func (m *Manager) heldBeforeTool(ctx context.Context, l *live, toolUseID string) bool {
func (m *Manager) resumedFromPause(ctx context.Context, l *live, toolUseID string) bool {
return m.holdWhilePaused(ctx, l, toolUseID) && ctx.Err() == nil
}
func (m *Manager) beforeTool(l *live) hookcmd.Func {
return func(ctx context.Context, input json.RawMessage) (map[string]any, error) {
if !m.heldBeforeTool(ctx, l, hookToolUseID(input)) {
if !m.resumedFromPause(ctx, l, hookToolUseID(input)) {
return map[string]any{}, nil
}
mt := m.deliverMidTurn(ctx, l)