File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,10 @@ namespace console {
155155 break ;
156156 case error:
157157 fprintf (out, ANSI_BOLD ANSI_COLOR_RED);
158+ break ;
159+ case reasoning:
160+ fprintf (out, ANSI_COLOR_BLUE);
161+ break ;
158162 }
159163 current_display = display;
160164 fflush (out);
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ namespace console {
99 reset = 0 ,
1010 prompt,
1111 user_input,
12- error
12+ error,
13+ reasoning
1314 };
1415
1516 void init (bool use_simple_io, bool use_advanced_display);
Original file line number Diff line number Diff line change @@ -828,8 +828,15 @@ int main(int argc, char ** argv) {
828828 if (auto * formatter = chat_add_and_format.get_partial_formatter ()) {
829829 auto outputs = (*formatter)(assistant_ss.str ());
830830 for (const auto & out : outputs) {
831- LOG (" %s" , out.formatted .c_str ());
831+ if (out.type == partial_formatter::REASONING) {
832+ console::set_display (console::reasoning);
833+ } else {
834+ console::set_display (console::reset);
835+ }
836+ fprintf (stdout, " %s" , out.formatted .c_str ());
837+ fflush (stdout);
832838 }
839+ console::set_display (console::reset);
833840 }
834841 }
835842
You can’t perform that action at this time.
0 commit comments