Fix: fixing imports on the utils folder
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* TUI App Utilities - Exports
|
||||
*/
|
||||
|
||||
export {
|
||||
isMouseEscapeSequence,
|
||||
cleanInput,
|
||||
insertAtCursor,
|
||||
deleteBeforeCursor,
|
||||
calculateCursorPosition,
|
||||
} from "@utils/tui-app/input-utils";
|
||||
|
||||
export {
|
||||
isInputLocked,
|
||||
isModalCommand,
|
||||
isMainInputActive,
|
||||
isProcessing,
|
||||
} from "@utils/tui-app/mode-utils";
|
||||
|
||||
export {
|
||||
countLines,
|
||||
shouldSummarizePaste,
|
||||
generatePlaceholder,
|
||||
createPastedContent,
|
||||
generatePasteId,
|
||||
addPastedBlock,
|
||||
updatePastedBlockPositions,
|
||||
updatePastedBlocksAfterDelete,
|
||||
expandPastedContent,
|
||||
getDisplayBuffer,
|
||||
normalizeLineEndings,
|
||||
clearPastedBlocks,
|
||||
} from "@utils/tui-app/paste-utils";
|
||||
@@ -1,11 +1,3 @@
|
||||
/**
|
||||
* TUI App Input Utilities
|
||||
*
|
||||
* Helper functions for input handling in the TUI App
|
||||
*/
|
||||
|
||||
// Mouse escape sequence patterns for filtering
|
||||
// Note: Patterns for replacement use 'g' flag, patterns for testing don't
|
||||
const MOUSE_PATTERNS = {
|
||||
// Full escape sequences (for replacement)
|
||||
SGR_FULL: /\x1b\[<\d+;\d+;\d+[Mm]/g,
|
||||
@@ -23,16 +15,11 @@ const MOUSE_PATTERNS = {
|
||||
BRACKET_SGR_PREFIX: "[<",
|
||||
} as const;
|
||||
|
||||
// Control character patterns for cleaning input
|
||||
const CONTROL_PATTERNS = {
|
||||
CONTROL_CHARS: /[\x00-\x1f\x7f]/g,
|
||||
ESCAPE_SEQUENCES: /\x1b\[.*?[a-zA-Z]/g,
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* Check if input is a mouse escape sequence
|
||||
* Handles both full sequences and partial sequences where ESC was stripped
|
||||
*/
|
||||
export const isMouseEscapeSequence = (input: string): boolean => {
|
||||
if (!input) return false;
|
||||
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
/**
|
||||
* TUI App Mode Utilities
|
||||
*
|
||||
* Helper functions for mode checking in the TUI App
|
||||
*/
|
||||
|
||||
import type { AppMode } from "@/types/tui";
|
||||
|
||||
// Modes that lock the input
|
||||
const LOCKED_MODES: ReadonlySet<AppMode> = new Set([
|
||||
"thinking",
|
||||
"tool_execution",
|
||||
@@ -14,7 +7,6 @@ const LOCKED_MODES: ReadonlySet<AppMode> = new Set([
|
||||
"learning_prompt",
|
||||
]);
|
||||
|
||||
// Commands that open their own modal
|
||||
const MODAL_COMMANDS: ReadonlySet<string> = new Set([
|
||||
"model",
|
||||
"models",
|
||||
|
||||
Reference in New Issue
Block a user