Skip to content

Commit

Permalink
fix streaming and colors in gsb
Browse files Browse the repository at this point in the history
  • Loading branch information
pldi21 committed Apr 30, 2024
1 parent c45933f commit 73a0e57
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/chatdbg/native_util/dbg_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,14 @@ def _make_assistant(self) -> Assistant:
debug=chatdbg_config.debug,
functions=functions,
stream=not chatdbg_config.no_stream,

# gdb overwrites sys.stdin to be a file object that doesn't seem
# to support colors or streaming. So, just use the original stdout
# here for all subclasses.
printer = chatdbg_config.make_printer(sys.__stdout__, self._prompt, " ", 80)

listeners=[
chatdbg_config.make_printer(sys.stdout, self._prompt, " ", 80),
printer,
self._log,
],
)
Expand Down

0 comments on commit 73a0e57

Please sign in to comment.