par_term_config/config/
acp.rs1use serde::{Deserialize, Serialize};
7use std::collections::HashMap;
8
9fn default_acp_protocol() -> String {
10 "acp".to_string()
11}
12
13fn default_acp_type() -> String {
14 "coding".to_string()
15}
16
17#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
19pub struct CustomAcpAgentActionConfig {
20 #[serde(default)]
21 pub command: Option<String>,
22 #[serde(default)]
23 pub description: Option<String>,
24}
25
26#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
28pub struct CustomAcpAgentConfig {
29 pub identity: String,
30 pub name: String,
31 pub short_name: String,
32 #[serde(default = "default_acp_protocol")]
33 pub protocol: String,
34 #[serde(default = "default_acp_type")]
35 pub r#type: String,
36 #[serde(default)]
37 pub active: Option<bool>,
38 pub run_command: HashMap<String, String>,
39 #[serde(default)]
40 pub env: HashMap<String, String>,
41 #[serde(default)]
42 pub ollama_context_length: Option<u32>,
43 #[serde(default)]
44 pub install_command: Option<String>,
45 #[serde(default)]
46 pub actions: HashMap<String, HashMap<String, CustomAcpAgentActionConfig>>,
47}