@promus/cli 0.24.27 → 0.24.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ui/app.tsx +13 -1
package/package.json
CHANGED
package/src/ui/app.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useKeyboard, useTerminalDimensions } from '@opentui/solid'
|
|
1
|
+
import { useKeyboard, usePaste, useTerminalDimensions } from '@opentui/solid'
|
|
2
2
|
import { type SlashCommand, suggestForPrefix } from '@promus/core'
|
|
3
3
|
import { For, Show, createEffect, createSignal, onCleanup } from 'solid-js'
|
|
4
4
|
import { summarizeApprovalSubject } from './approval-summary'
|
|
@@ -486,6 +486,18 @@ export function ChatApp(props: AppProps) {
|
|
|
486
486
|
}
|
|
487
487
|
})
|
|
488
488
|
|
|
489
|
+
usePaste(evt => {
|
|
490
|
+
const text = new TextDecoder().decode(evt.bytes)
|
|
491
|
+
if (text) {
|
|
492
|
+
props.state.pushRow({ role: 'system', text: `pasted ${text.length} chars` })
|
|
493
|
+
props.state.setInput(prev => {
|
|
494
|
+
const next = prev + text
|
|
495
|
+
refreshSlashMatches(next)
|
|
496
|
+
return next
|
|
497
|
+
})
|
|
498
|
+
}
|
|
499
|
+
})
|
|
500
|
+
|
|
489
501
|
return (
|
|
490
502
|
<box flexDirection="column" width={dims().width} height={dims().height}>
|
|
491
503
|
{/* Chat history — scrollable so it never crowds the input area. */}
|