Skip to main content

Module chat

Module chat 

Source

Structsยง

AudioSettingsPage ๐Ÿ”’
ChatConfig ๐Ÿ”’
Persisted user choices for rbnx chat, written to ~/.robonix/chat.yaml.
ChatMessage ๐Ÿ”’
ForestView ๐Ÿ”’
Live RTDL forest state for the right-side panel. Fed by PilotEvent task_state / plan / node_state / batch_result events; rendered every frame.
PlanView ๐Ÿ”’

Enumsยง

AudioSection ๐Ÿ”’
PickMode ๐Ÿ”’
Pick mode for the legacy modal picker chain (FirstRun only โ€” the Ctrl+A path now uses the dashboard via run_audio_settings_page). Reconfigure is kept so the older code paths that still take a PickMode parameter compile cleanly even though nothing constructs it.
Role ๐Ÿ”’

Constantsยง

CONSUMER_ID ๐Ÿ”’
DEFAULT_LIAISON_FALLBACK ๐Ÿ”’
LIAISON_CONTRACT_ID ๐Ÿ”’
MIC_CONTRACT ๐Ÿ”’
Atlas contract ids for the audio primitives that have user-visible device choices on a multi-provider host (e.g. local ALSA driver vs the macOS bridge). asr/tts are software backends with one provider per box, so we donโ€™t prompt for them.
SPEAKER_CONTRACT ๐Ÿ”’

Functionsยง

abort_session ๐Ÿ”’
apply_pilot_event ๐Ÿ”’
apply_voice_event ๐Ÿ”’
build_control_task ๐Ÿ”’
build_text_task ๐Ÿ”’
call_select_device ๐Ÿ”’
cap_short_name ๐Ÿ”’
The standard LLM-facing capability name, exactly as pilot presents it to the model and as the model emits it in do.cap: provider_id.<area>_<leaf> โ€” e.g. front_camera.camera_snapshot, explore.explore_status, executor.builtin_read_file. The <area>_<leaf> part mirrors robonix_pilot::discovery::llm_name (kept in sync here since rbnx-cli doesnโ€™t depend on the pilot crate); the <area> prefix is what disambiguates the shared snapshot / status leaves across providers.
chat_config_path ๐Ÿ”’
compact_call_label ๐Ÿ”’
Compact one-line label for a do node: provider.leaf(short args). Collapses whitespace/newlines (run_command args are whole shell scripts) and elides past ~48 chars so the tree stays readable in both the log and the panel.
discover_liaison ๐Ÿ”’
Try to discover Liaison via Atlas, retrying for up to timeout_secs.
draw ๐Ÿ”’
ensure_audio_devices ๐Ÿ”’
Best-effort audio device discovery. Anything that goes wrong here (atlas unreachable, no providers registered, user pressed Esc) is downgraded to a chat-history warning โ€” text mode keeps working.
execute
fetch_devices_filtered ๐Ÿ”’
flash_picker_message ๐Ÿ”’
Render a single-line status page and pause briefly so the user can read it before the next picker step (or the chat) takes over the screen. Long messages now sit for 1.4 s โ€” the previous 400 ms felt like โ€œthe page just flashed and disappeared.โ€
forest_node_lines ๐Ÿ”’
forest_panel_lines ๐Ÿ”’
Render the whole forest panel (goal + status + every tree with per-node live state) as styled lines.
forward_submit ๐Ÿ”’
Submit a task to Liaison and forward its event stream into tx.
load_chat_config ๐Ÿ”’
localhost_to_ipv4_loopback ๐Ÿ”’
Pilot/Liaison bind IPv4 (0.0.0.0). Resolving localhost often prefers ::1, so the gRPC client hits IPv6 and gets connection refused โ€” force IPv4 loopback.
node_state_glyph ๐Ÿ”’
Glyph + style for one node given its executor state (None = pending).
notify_session_end ๐Ÿ”’
now_ms ๐Ÿ”’
pick_audio_settings ๐Ÿ”’
pick_device_for_cap ๐Ÿ”’
Connect to provider_idโ€™s list_devices capability, ask for the device list, run a picker on the entries that match kind (input/output)
pick_device_tui ๐Ÿ”’
pick_tui ๐Ÿ”’
pin_exists_in_atlas ๐Ÿ”’
True iff atlas currently has a provider whose id (or namespace) matches the pin AND it provides contract over GRPC. Used at chat startup to detect stale pins from a prior deploy whose audio provider has since been renamed or removed โ€” caller drops the pin and re-prompts the picker instead of silently letting voice fail with โ€œno providerโ€.
render_plan_node ๐Ÿ”’
render_plan_tree ๐Ÿ”’
Render a Plan arena as an ASCII tree, e.g.
run_audio_settings_page ๐Ÿ”’
run_text_intent_with_esc_abort ๐Ÿ”’
run_tui ๐Ÿ”’
run_voice_session_with_esc_abort ๐Ÿ”’
save_chat_config ๐Ÿ”’
send_steer ๐Ÿ”’
Submit text as a mid-task steer on an already-running session. Pilot routes it to the live turnโ€™s steer queue and returns an empty stream, which we drain.
spawn_voice_steer ๐Ÿ”’
Fire-and-forget a mid-turn VOICE steer (Ctrl+V during a running turn): record + ASR another utterance via a fresh voice session and let its transcript submit โ€” Pilot steers it into the active turn. TTS is disabled here (the per-segment playback rides the main turnโ€™s stream); we just drain this sessionโ€™s events on a spawned task.
tree_lines ๐Ÿ”’
One tree: a header with its state, then its nodes, all indented by indent.
try_discover_once ๐Ÿ”’
try_pick ๐Ÿ”’
Ok(Some((provider_id, device_id))) = picked both layers; device_id may be โ€œโ€ when the impl returned UNIMPLEMENTED on list_devices. Ok(None) = no providers in atlas.
voice_language ๐Ÿ”’
voice_node ๐Ÿ”’
voice_node_with_cfg ๐Ÿ”’
Same as voice_node but falls back to cfg_value (from chat.yaml) when the env var is unset / empty. Empty result still means โ€œlet liaison auto-pick from atlasโ€.
voice_record_seconds ๐Ÿ”’
voice_tts_enabled ๐Ÿ”’
whoami_username ๐Ÿ”’
Tiny username probe โ€” avoids pulling in whoami for the CLI by reading $USER/$USERNAME with a โ€œuserโ€ fallback. Liaison uses the real whoami crate when it stamps the canonical local:<user> identity.
ๆต™ICPๅค‡2023005800ๅท-2 ๆต™ๅ…ฌ็ฝ‘ๅฎ‰ๅค‡33010902005384ๅท