@promus/cli 0.24.28 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/ui/app.tsx +13 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promus/cli",
3
- "version": "0.24.28",
3
+ "version": "0.24.29",
4
4
  "type": "module",
5
5
  "description": "Promus CLI: sovereign agent gateway on Arbitrum. Runs `promus init` to mint an iNFT and bring up your agent",
6
6
  "license": "MIT",
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'
@@ -478,9 +478,6 @@ export function ChatApp(props: AppProps) {
478
478
  }
479
479
  if (evt.sequence && !evt.ctrl && !evt.meta && !evt.option) {
480
480
  const ch = evt.sequence
481
- if (ch.length > 1) {
482
- props.state.pushRow({ role: 'system', text: `pasted ${ch.length} chars` })
483
- }
484
481
  props.state.setInput(prev => {
485
482
  const next = prev + ch
486
483
  refreshSlashMatches(next)
@@ -489,6 +486,18 @@ export function ChatApp(props: AppProps) {
489
486
  }
490
487
  })
491
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
+
492
501
  return (
493
502
  <box flexDirection="column" width={dims().width} height={dims().height}>
494
503
  {/* Chat history — scrollable so it never crowds the input area. */}