Commit b70717c
feat(acp): carry provider key onto ACPAgent via create_agent
The authoritative ACP provider key lives on ACPAgentSettings.acp_server
('claude-code', 'codex', 'gemini-cli', 'custom'), but create_agent() dropped it
when building the runtime ACPAgent — which kept only acp_command. The launch
command does not reliably reverse-map to a provider (detect_acp_provider_by_command
returns None for the common `npx -y @zed-industries/claude-code-acp` and
`npx -y @openai/codex acp` forms), so downstream consumers had no dependable way
to recover the provider from a serialized agent.
Add an optional `acp_server: str | None` field to ACPAgent, populated by
create_agent() from the settings. It then rides ConversationInfo.agent, giving
the conversation UI an authoritative key to resolve a provider brand label /
model list without reverse-parsing the command or hand-stamping a tag. Additive
and backward-compatible: defaults to None for agents built directly (not from
settings) and for older serialized payloads.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 735e9be commit b70717c
3 files changed
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1270 | 1270 | | |
1271 | 1271 | | |
1272 | 1272 | | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
1273 | 1287 | | |
1274 | 1288 | | |
1275 | 1289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1724 | 1724 | | |
1725 | 1725 | | |
1726 | 1726 | | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
1727 | 1732 | | |
1728 | 1733 | | |
1729 | 1734 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
889 | 914 | | |
890 | 915 | | |
891 | 916 | | |
| |||
0 commit comments