diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-13 03:26:03 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-13 03:30:13 +0300 |
| commit | 5cfe5e5e730246948b0c9428ad876b6938590aad (patch) | |
| tree | 53d4bbe1aff6887f63f279eed1b5e4e11e7331b7 /src/cli.rs | |
| parent | 7f3364a468f7dcfd8c9c84e5737fe5699f0e3a93 (diff) | |
feat: add configurable sidebar metadata tokens
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -30,6 +30,16 @@ const TERMINAL_SESSION_OBSERVE_USAGE: &str = const TERMINAL_SESSION_CONTROL_USAGE: &str = "usage: herdr terminal session control <target> [--takeover] [--cols N] [--rows N]"; +pub(crate) fn parse_token_assignment(raw: &str) -> Result<(String, Option<String>), String> { + let Some((key, value)) = raw.split_once('=') else { + return Err("token must use NAME=VALUE".into()); + }; + if key.is_empty() { + return Err("token name must not be empty".into()); + } + Ok((key.to_string(), Some(value.to_string()))) +} + pub(crate) fn parse_env_assignment(raw: &str) -> Result<(String, String), String> { let Some((key, value)) = raw.split_once('=') else { return Err("env must use KEY=VALUE".into()); @@ -881,7 +891,6 @@ fn wait_for_agent_status_change( agent, title, display_agent, - custom_status, state_labels, } = event.data else { @@ -895,7 +904,6 @@ fn wait_for_agent_status_change( workspace_id, agent_status, agent, - custom_status, title, display_agent, state_labels, |
