(width: number, locale: UiLocale)
| 1700 | const MAKA_WORDMARK_WIDTH = Math.max(...MAKA_WORDMARK_LINES.map((line) => line.length)); |
| 1701 | |
| 1702 | function renderWelcomeBlock(width: number, locale: UiLocale): string[] { |
| 1703 | // The branded home greets with the maka wordmark, a short localized tagline, |
| 1704 | // and the command-center entry points (direct input, /session, |
| 1705 | // /model, /setup) so a fresh session shows the main actions without typing |
| 1706 | // `/`. The active model and connection live in the statusline, so the |
| 1707 | // welcome does not repeat them. |
| 1708 | const copy = getTuiPrimaryGuidance(locale).welcome; |
| 1709 | const hints: [string, string][] = [ |
| 1710 | ['/session', copy.session], |
| 1711 | ['/model', copy.model], |
| 1712 | ['/setup', copy.setup], |
| 1713 | ]; |
| 1714 | const keyWidth = Math.max(...hints.map(([key]) => key.length)); |
| 1715 | const lines: string[] = []; |
| 1716 | if (width < MAKA_WORDMARK_WIDTH) { |
| 1717 | lines.push(fitLine(ansi.accent('maka'), width)); |
| 1718 | } else { |
| 1719 | for (const line of MAKA_WORDMARK_LINES) { |
| 1720 | lines.push(fitLine(ansi.accent(line), width)); |
| 1721 | } |
| 1722 | } |
| 1723 | lines.push(''); |
| 1724 | lines.push(fitLine(ansi.dim(copy.tagline), width)); |
| 1725 | lines.push(''); |
| 1726 | lines.push(fitLine(` ${copy.start}`, width)); |
| 1727 | for (const [key, description] of hints) { |
| 1728 | lines.push(fitLine(ansi.dim(` ${key.padEnd(keyWidth)} ${description}`), width)); |
| 1729 | } |
| 1730 | return lines; |
| 1731 | } |
| 1732 | |
| 1733 | function renderSandboxBoundaryPrompt( |
| 1734 | request: SandboxBoundaryRequestEvent, |
no test coverage detected