feat(ipuaro): add multiline input and syntax highlighting

- Multiline input support with Shift+Enter for new lines
- Auto-height adjustment and line navigation
- Syntax highlighting in DiffView for added lines
- Language detection from file extensions
- Config options for multiline and syntaxHighlight
This commit is contained in:
imfozilbek
2025-12-02 00:31:21 +05:00
parent 908c2f50d7
commit a589b0dfc4
9 changed files with 756 additions and 19 deletions

View File

@@ -29,6 +29,8 @@ export interface AppDependencies {
export interface ExtendedAppProps extends AppProps {
deps: AppDependencies
onExit?: () => void
multiline?: boolean | "auto"
syntaxHighlight?: boolean
}
function LoadingScreen(): React.JSX.Element {
@@ -65,6 +67,8 @@ export function App({
autoApply: initialAutoApply = false,
deps,
onExit,
multiline = false,
syntaxHighlight = true,
}: ExtendedAppProps): React.JSX.Element {
const { exit } = useApp()
@@ -253,6 +257,7 @@ export function App({
}
onSelect={handleConfirmSelect}
editableContent={pendingConfirmation.diff?.newLines}
syntaxHighlight={syntaxHighlight}
/>
)}
<Input
@@ -263,6 +268,7 @@ export function App({
storage={deps.storage}
projectRoot={projectPath}
autocompleteEnabled={true}
multiline={multiline}
/>
</Box>
)