Since you replaced the O2 sensor and exhaust manifold, your truck may need to relearn its fuel trims. Try resetting the computer by pulling the battery negative post terminal for about 1/2 hour. This will force the computer back to factor fuel trims and give it a chance to relearn what's going on now that it's not receiving bad information about the quality of the exhaust gasses.
If that doesn't help, the part of the engine which controls idle quality is called an Intake Air Control (IAC) valve. This part is hung off of the throttle body. It has a plunger which is strictly in or out, but allows the proper amount of air through when the throttle is closed to allow engine to idle at a normal idle speed. If the engine is surging upon startup and not settling down to the proper idle, a sticking IAC could be what the issue is. The IAC also assists with off idle acceleration, so this could doubly so be at issue.