@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/ui/app.tsx +13 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promus/cli",
3
- "version": "0.24.27",
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'
@@ -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. */}