acp: Load agent panel even if serialized config is bogus (#37134)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
@@ -86,7 +86,7 @@ use zed_actions::{
|
|||||||
|
|
||||||
const AGENT_PANEL_KEY: &str = "agent_panel";
|
const AGENT_PANEL_KEY: &str = "agent_panel";
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize, Debug)]
|
||||||
struct SerializedAgentPanel {
|
struct SerializedAgentPanel {
|
||||||
width: Option<Pixels>,
|
width: Option<Pixels>,
|
||||||
selected_agent: Option<AgentType>,
|
selected_agent: Option<AgentType>,
|
||||||
@@ -592,7 +592,7 @@ impl AgentPanel {
|
|||||||
.log_err()
|
.log_err()
|
||||||
.flatten()
|
.flatten()
|
||||||
{
|
{
|
||||||
Some(serde_json::from_str::<SerializedAgentPanel>(&panel)?)
|
serde_json::from_str::<SerializedAgentPanel>(&panel).log_err()
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user