All files / apps/chatbot/src/constants chat.ts

100% Statements 5/5
100% Branches 0/0
100% Functions 0/0
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  10x 10x           10x     10x             10x  
/** Participant identities used to tell a user turn from a bot turn. */
export const USER = { _id: 1 };
export const BOT = { _id: 2, name: "Flash Bot" };
 
/**
 * Block types that share one bubble when they arrive consecutively. Anything
 * outside this set breaks the bubble and renders standalone.
 */
export const BUBBLE_BLOCK_TYPES = ["text", "suggestions", "table", "confirmation", "error"];
 
/** Delay between consecutive bottom suggestion chips animating in. */
export const BOTTOM_SUGGESTION_STAGGER_MS = 50;
 
/**
 * How far the composer tucks under the keyboard on iOS once it is open. The
 * host pads the remote by the bottom safe-area inset, which the keyboard
 * covers anyway, so without this the composer floats above the keyboard.
 */
export const IOS_COMPOSER_KEYBOARD_OFFSET = 10;