feat(#2039): drop is_primary from get_agent_meta matrix identities
This commit is contained in:
parent
5b442796ca
commit
5972605aeb
2 changed files with 3 additions and 10 deletions
|
|
@ -510,12 +510,7 @@ pub fn format_agent_meta(resp: Result<SocketReply, anyhow::Error>) -> String {
|
||||||
out.push_str("\nmatrix_accounts:");
|
out.push_str("\nmatrix_accounts:");
|
||||||
for acct in &matrix_accounts {
|
for acct in &matrix_accounts {
|
||||||
let uid = acct.user_id.as_deref().unwrap_or("?");
|
let uid = acct.user_id.as_deref().unwrap_or("?");
|
||||||
let primary = if acct.is_primary { " [primary]" } else { "" };
|
let _ = write!(out, "\n {} ({uid}) on {}", acct.name, acct.homeserver);
|
||||||
let _ = write!(
|
|
||||||
out,
|
|
||||||
"\n {} ({uid}) on {}{primary}",
|
|
||||||
acct.name, acct.homeserver
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
out
|
out
|
||||||
|
|
|
||||||
|
|
@ -926,7 +926,8 @@ pub struct AgentStatusRow {
|
||||||
/// `matrix_accounts`. Field names match the daemon's `matrix-accounts.json`
|
/// `matrix_accounts`. Field names match the daemon's `matrix-accounts.json`
|
||||||
/// snapshot (written by `hive-matrix-mcp`'s account registry) so hive-c0re
|
/// snapshot (written by `hive-matrix-mcp`'s account registry) so hive-c0re
|
||||||
/// deserializes the snapshot straight into `Vec<MatrixIdentity>`; the
|
/// deserializes the snapshot straight into `Vec<MatrixIdentity>`; the
|
||||||
/// snapshot's `live` field is ignored here (only live accounts are listed).
|
/// snapshot's `live` / `is_primary` fields are ignored here (only live
|
||||||
|
/// accounts are listed).
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct MatrixIdentity {
|
pub struct MatrixIdentity {
|
||||||
/// Logical account name (the `account` arg on the matrix MCP tools).
|
/// Logical account name (the `account` arg on the matrix MCP tools).
|
||||||
|
|
@ -937,9 +938,6 @@ pub struct MatrixIdentity {
|
||||||
pub user_id: Option<String>,
|
pub user_id: Option<String>,
|
||||||
/// Homeserver base URL this account is on.
|
/// Homeserver base URL this account is on.
|
||||||
pub homeserver: String,
|
pub homeserver: String,
|
||||||
/// Whether this is the primary account (selected when a matrix tool
|
|
||||||
/// call omits `account`).
|
|
||||||
pub is_primary: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Serde default for the `running` field; keeps wire backwards-compat
|
/// Serde default for the `running` field; keeps wire backwards-compat
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue