2022-03-03 02:34:19 +03:00
|
|
|
export const DEFAULT_SESSION = '';
|
2022-03-15 03:34:19 +03:00
|
|
|
export const DEFAULT_HANDLER = 'hood';
|
2022-04-14 17:13:09 +03:00
|
|
|
export const RESIZE_DEBOUNCE_MS = 100;
|
2022-04-19 13:41:40 +03:00
|
|
|
export const RESIZE_THRESHOLD_PX = 15;
|
2022-03-04 01:58:48 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Session ID validity:
|
2022-03-10 01:25:10 +03:00
|
|
|
*
|
2022-03-04 01:58:48 +03:00
|
|
|
* - must start with an alphabetical
|
|
|
|
* - can be composed of alphanumerics with hyphens
|
|
|
|
* - can be length 1 or longer
|
|
|
|
*/
|
2022-03-15 03:24:16 +03:00
|
|
|
export const SESSION_ID_REGEX = /(^[a-z]{1}[a-z\d-]*$)/;
|
2022-03-10 01:15:24 +03:00
|
|
|
|
|
|
|
/**
|
2022-03-11 07:54:30 +03:00
|
|
|
* Open a session with a given agent using `[agent]![session_name]`
|
2022-03-10 01:25:10 +03:00
|
|
|
*
|
2022-03-10 01:15:24 +03:00
|
|
|
* For example:
|
|
|
|
* ```
|
|
|
|
* book!my-session
|
|
|
|
* ```
|
2022-03-10 01:25:10 +03:00
|
|
|
*
|
2022-03-10 01:15:24 +03:00
|
|
|
* This will create a new session in webterm for the `%book` agent.
|
2022-03-10 01:25:10 +03:00
|
|
|
*
|
|
|
|
* Note that the second capture group after the ! is composed of the session ID
|
2022-03-10 01:15:24 +03:00
|
|
|
* regex above.
|
|
|
|
*/
|
2022-03-15 03:24:16 +03:00
|
|
|
export const AGENT_SESSION_REGEX = /^([a-z]{1}[a-z\d-]*)!([a-z]{1}[a-z\d-]*$)/;
|