Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 15 additions & 35 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"dependencies": {
"@codebuff/sdk": "workspace:*",
"@gravity-ai/api": "^0.1.2",
"@opentui/core": "0.1.87",
"@opentui/react": "0.1.87",
"@opentui/core": "0.2.2",
"@opentui/react": "0.2.2",
"@tanstack/react-query": "^5.90.12",
"commander": "^14.0.1",
"immer": "^10.1.3",
Expand Down
14 changes: 11 additions & 3 deletions cli/src/components/multiline-input.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { TextAttributes } from '@opentui/core'
import {
decodePasteBytes,
stripAnsiSequences,
TextAttributes,
} from '@opentui/core'
import { useAppContext, useKeyboard, useRenderer } from '@opentui/react'
import {
forwardRef,
Expand Down Expand Up @@ -27,6 +31,10 @@ import type {
TextRenderable,
} from '@opentui/core'

function getPasteText(event: PasteEvent): string {
return stripAnsiSequences(decodePasteBytes(event.bytes))
}

// Helper functions for text manipulation
function findLineStart(text: string, cursor: number): number {
let pos = Math.max(0, Math.min(cursor, text.length))
Expand Down Expand Up @@ -1046,7 +1054,7 @@ export const MultilineInput = forwardRef<

const handlePaste = (event: PasteEvent) => {
pasteHandledRef.current = true
onPasteRef.current(event.text)
onPasteRef.current(getPasteText(event))
// Reset dedup flag after microtask so scrollbox handler (which fires
// synchronously after global listeners) sees it as handled, but future
// paste events are not blocked.
Expand Down Expand Up @@ -1145,7 +1153,7 @@ export const MultilineInput = forwardRef<
// Backup paste handler: fires if the global keyHandler listener
// didn't catch this event (dedup prevents double-handling)
if (pasteHandledRef.current) return
onPasteRef.current(event.text)
onPasteRef.current(getPasteText(event))
}}
onMouseDown={handleMouseDown}
style={{
Expand Down
4 changes: 2 additions & 2 deletions cli/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ async function main(): Promise<void> {
const renderer = await createCliRenderer({
backgroundColor: 'transparent',
exitOnCtrlC: false,
useAlternateScreen: true,
screenMode: 'alternate-screen',
})

// Remove early handlers — proper cleanup handlers (with renderer access) take over
Expand All @@ -408,4 +408,4 @@ async function main(): Promise<void> {
)
}

void main()
void main()
2 changes: 1 addition & 1 deletion packages/code-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"dependencies": {
"@vscode/tree-sitter-wasm": "0.1.4",
"web-tree-sitter": "0.25.6"
"web-tree-sitter": "0.25.10"
},
"devDependencies": {}
}
2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"gray-matter": "^4.0.3",
"ignore": "7.0.5",
"micromatch": "^4.0.8",
"web-tree-sitter": "0.25.6",
"web-tree-sitter": "0.25.10",
"ws": "^8.18.0",
"zod": "^4.2.1"
},
Expand Down
Loading