Add terminal thread init command (#59374)

## Summary

- Adds an `agent.terminal_init_command` setting for Terminal Threads.
- Runs the configured command automatically when creating a new Terminal
Thread, while skipping restored terminal threads.
- Documents the setting and exposes it in the AI settings page.

Closes https://github.com/zed-industries/zed/issues/58697

Closes AI-337

Release Notes:

- Added a setting to automatically run a command when opening a new
terminal thread in the agent panel.

---------

Co-authored-by: Anant Goel <anant@zed.dev>
fd5d42dd55MartinYe1234 committed on 6/16/2026, 10:50:58 PM· committed by GitHubparent3e8aae4
11 files changedLine totals unavailable