Skip to content

Cannot pipe into aichat -e #531

@denniswebb

Description

@denniswebb

Describe the bug

On Mac, piping data to aichat -e always exits non-zero and without allowing you to run with the error

Error: IO error: Failed to initialize input reader

Caused by:
    Failed to initialize input reader

You can tell that it receives the data and a response from the GPT because it actually shows the proposed command, just exits with the error instead of waiting for your response.

This works as expected without -e but of course isn't what I need.

To Reproduce

Pipe any input into aichat -e

Expected behavior

App would present the EREC menu and await my response.

Screenshots/Logs

image

Configuration

model               openai:gpt-4o
max_output_tokens   -
temperature         -
top_p               -
dry_run             false
save                false
save_session        -
highlight           true
light_theme         true
wrap                no
wrap_code           false
auto_copy           false
keybindings         emacs
prelude             -
compress_threshold  2000

Environment (please complete the following information):

  • os version: Sonoma 14.4 (23E214) - Darwin Kernel Version 23.4.0
  • aichat version: 0.17.0
  • terminal version: bash-5.2, fish 3.7.1, iTerm2 3.5.0

Additional context

I know you've had a few patches before related to this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions