tools/tui/src/devices.ts
openaliro/openaliro
Module

devices.ts

tools/tui/src/devices.ts4 documented symbols

depends on theme.ts types.ts  ·  used by app.tsx

flowchart TD
  ingestLine --> pairingFromLine
  ingestLine --> severityFor
  ingestLine --> stripAnsi
  ingestLine --> updateEsp32
  ingestLine --> updateNrf

API

Fexport function stripAnsi(value: string): string

tools/tui/src/devices.ts:9

Strip ANSI escape sequences from the input string and return the plain text.

called by ingestLine

Fexport function makeBoardState(id: BoardId): BoardState

tools/tui/src/devices.ts:15

Create and return a BoardState record initialized with the given board ID, appropriate label and theme color, and empty connection, diagnostic, log, and analyzer state.

called by App

Ffunction severityFor(line: string): Severity

tools/tui/src/devices.ts:35

Return a severity tier (error, warning, success, or info) by scanning the console line for keywords.

called by ingestLine

Ffunction pairingFromLine(current: BoardState["pairing"], line: string): BoardState["pairing"]

tools/tui/src/devices.ts:71

Extract and merge QR code URL, QR content payload, and manual pairing code from a console line into the current pairing state, returning the updated state or current state if no fields matched.

called by ingestLine
Undocumented (3)

updateNrf, updateEsp32, ingestLine