Files
Netcatty/components/terminal/index.ts
T
bincxzandClaude a03df92dd1 fix: map string indices to cell columns for wide character support
Address review feedback: regex match indices are JS string positions,
but xterm Decoration API expects terminal cell columns. This caused
highlight misalignment on lines with tabs, CJK characters, or emoji.

Add buildStringToCellMap() helper that iterates buffer cells to build
a mapping from string index to cell column, correctly handling:
- Wide characters (CJK, emoji): 1 char = 2 cells
- Combining characters: multiple chars = 1 cell
- Regular ASCII: 1 char = 1 cell

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-21 11:08:55 +08:00

29 lines
1.2 KiB
TypeScript

/**
* Terminal components module
* Re-exports all terminal sub-components
*/
export { TerminalAuthDialog } from './TerminalAuthDialog';
export type { TerminalAuthDialogProps } from './TerminalAuthDialog';
export { TerminalConnectionProgress } from './TerminalConnectionProgress';
export type { TerminalConnectionProgressProps } from './TerminalConnectionProgress';
export { TerminalToolbar } from './TerminalToolbar';
export type { TerminalToolbarProps } from './TerminalToolbar';
export { TerminalConnectionDialog } from './TerminalConnectionDialog';
export type { ChainProgress,TerminalConnectionDialogProps } from './TerminalConnectionDialog';
export { TerminalContextMenu } from './TerminalContextMenu';
export type { TerminalContextMenuProps } from './TerminalContextMenu';
export { TerminalSearchBar } from './TerminalSearchBar';
export type { TerminalSearchBarProps } from './TerminalSearchBar';
export { KeywordHighlighter } from './keywordHighlight';
export { useTerminalSearch } from './hooks/useTerminalSearch';
export { useTerminalContextActions } from './hooks/useTerminalContextActions';
export { useTerminalAuthState } from './hooks/useTerminalAuthState';