Simplify codebase per audit of 0139564
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user