Expose Persona bridge mouth modes
This commit is contained in:
parent
b2e25b44e8
commit
928ec0333b
6 changed files with 177 additions and 3 deletions
|
|
@ -859,11 +859,29 @@ fn collect_coordinator_status(
|
|||
],
|
||||
)
|
||||
.unwrap_or_else(|_| json!({"latestArtifacts": []}));
|
||||
let latest_reddit_persona = status_cli::native_json(
|
||||
"epiphany-persona-reddit",
|
||||
&[
|
||||
"latest",
|
||||
"--artifact-dir",
|
||||
&persona_dir.to_string_lossy(),
|
||||
"--limit",
|
||||
"8",
|
||||
],
|
||||
)
|
||||
.unwrap_or_else(|_| json!({"latestArtifacts": []}));
|
||||
let mut latest_artifacts = latest_discord_persona
|
||||
.get("latestArtifacts")
|
||||
.and_then(Value::as_array)
|
||||
.cloned()
|
||||
.unwrap_or_default();
|
||||
latest_artifacts.extend(
|
||||
latest_reddit_persona
|
||||
.get("latestArtifacts")
|
||||
.and_then(Value::as_array)
|
||||
.cloned()
|
||||
.unwrap_or_default(),
|
||||
);
|
||||
latest_artifacts.extend(
|
||||
latest_other_persona
|
||||
.get("latestArtifacts")
|
||||
|
|
|
|||
|
|
@ -696,11 +696,31 @@ fn native_auxiliary_status(root: &Path) -> Result<NativeAuxiliaryStatus> {
|
|||
.unwrap_or_else(
|
||||
|error| json!({"status": "error", "error": error.to_string(), "latestArtifacts": []}),
|
||||
);
|
||||
let latest_reddit_persona = native_json(
|
||||
"epiphany-persona-reddit",
|
||||
&[
|
||||
"latest",
|
||||
"--artifact-dir",
|
||||
&persona_dir.to_string_lossy(),
|
||||
"--limit",
|
||||
"8",
|
||||
],
|
||||
)
|
||||
.unwrap_or_else(
|
||||
|error| json!({"status": "error", "error": error.to_string(), "latestArtifacts": []}),
|
||||
);
|
||||
let mut latest_artifacts = latest_discord_persona
|
||||
.get("latestArtifacts")
|
||||
.and_then(Value::as_array)
|
||||
.cloned()
|
||||
.unwrap_or_default();
|
||||
latest_artifacts.extend(
|
||||
latest_reddit_persona
|
||||
.get("latestArtifacts")
|
||||
.and_then(Value::as_array)
|
||||
.cloned()
|
||||
.unwrap_or_default(),
|
||||
);
|
||||
latest_artifacts.extend(
|
||||
latest_other_persona
|
||||
.get("latestArtifacts")
|
||||
|
|
|
|||
Reference in a new issue