ethagent 3.1.0 → 3.1.2

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/bin/ethagent.js CHANGED
@@ -6,6 +6,10 @@ import { dirname, join } from 'node:path'
6
6
  const __dirname = dirname(fileURLToPath(import.meta.url))
7
7
  const cli = join(__dirname, '..', 'src', 'cli', 'main.tsx')
8
8
 
9
+ if (process.platform === 'win32') {
10
+ try { execFileSync('cmd', ['/c', 'chcp', '65001'], { stdio: 'ignore' }) } catch {}
11
+ }
12
+
9
13
  try {
10
14
  const tsxPath = import.meta.resolve('tsx/esm')
11
15
  execFileSync('node', ['--import', tsxPath, cli, ...process.argv.slice(2)], { stdio: 'inherit' })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ethagent",
3
- "version": "3.1.0",
3
+ "version": "3.1.2",
4
4
  "description": "A privacy-first AI agent with a portable Ethereum identity",
5
5
  "type": "module",
6
6
  "main": "bin/ethagent.js",
@@ -53,7 +53,6 @@ type ChatBottomPaneProps = {
53
53
  modelPickerContextFit: ModelPickerContextFit | null
54
54
  permissionRequest: PermissionRequest | null
55
55
  history: string[]
56
- busy: boolean
57
56
  streaming: boolean
58
57
  streamingStartedAt: number | null
59
58
  activity: BottomPaneActivity
@@ -100,7 +99,6 @@ export function ChatBottomPane({
100
99
  modelPickerContextFit,
101
100
  permissionRequest,
102
101
  history,
103
- busy,
104
102
  streaming,
105
103
  streamingStartedAt,
106
104
  activity,
@@ -265,7 +263,6 @@ export function ChatBottomPane({
265
263
  <ChatInput
266
264
  onSubmit={handleSubmit}
267
265
  history={history}
268
- disabled={busy}
269
266
  placeholderHints={placeholderHints}
270
267
  queuedMessages={queuedInputs}
271
268
  slashSuggestions={slashSuggestions}
@@ -1586,7 +1586,6 @@ export const ChatScreen: React.FC<ChatScreenProps> = ({ config: initialConfig, o
1586
1586
  modelPickerContextFit={modelPickerContextFit}
1587
1587
  permissionRequest={permissionRequest}
1588
1588
  history={history}
1589
- busy={busy}
1590
1589
  streaming={streaming}
1591
1590
  streamingStartedAt={streamingStartedAt}
1592
1591
  activity={null}
@@ -293,7 +293,8 @@ const COMMANDS: CommandSpec[] = [
293
293
  const text = assistant[index] ?? ''
294
294
  const label = offset === 1 ? 'Latest reply' : `Reply #${offset} back`
295
295
  const segments = parseSegments(text)
296
- if (segments.length <= 1) {
296
+ const hasCode = segments.some(segment => segment.kind === 'code')
297
+ if (!hasCode) {
297
298
  const result = await copyToClipboard(text)
298
299
  if (!result.ok) {
299
300
  return { kind: 'note', variant: 'error', text: `Copy failed: ${result.error}` }
@@ -324,8 +324,6 @@ export const ChatInput: React.FC<PromptInputProps> = ({
324
324
  const maxVisibleInputLines = Math.max(MIN_INPUT_VIEWPORT_LINES, Math.floor(rows / 2) - PROMPT_FOOTER_LINES)
325
325
 
326
326
  useAppInput((input, key, event) => {
327
- if (disabled) return
328
-
329
327
  const pastePending = pasteTimerRef.current !== null
330
328
  if (event.isPasted || pastePending || isFallbackPasteInput(input)) {
331
329
  if (input) enqueuePasteChunk(input)
@@ -96,7 +96,7 @@ async function tryReadNative(): Promise<ReadResult> {
96
96
  return readFrom('pbpaste', [], 'pbpaste')
97
97
  }
98
98
  if (process.platform === 'win32') {
99
- return readFrom('powershell', ['-NoProfile', '-Command', 'Get-Clipboard -Raw'], 'powershell Get-Clipboard')
99
+ return readFrom('powershell', ['-NoProfile', '-Command', '[Console]::OutputEncoding=[Text.Encoding]::UTF8; Get-Clipboard -Raw'], 'powershell Get-Clipboard')
100
100
  }
101
101
  if (process.env['WAYLAND_DISPLAY']) {
102
102
  const wl = await probe('wl-paste', ['--version'])