File tree 3 files changed +11
-7
lines changed
frontend/src/components/AnalysisPanel
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ async def prepare_context(
103
103
thoughts = [
104
104
ThoughtStep (
105
105
title = "Prompt to generate search arguments" ,
106
- description = [ str ( message ) for message in query_messages ] ,
106
+ description = query_messages ,
107
107
props = (
108
108
{"model" : self .chat_model , "deployment" : self .chat_deployment }
109
109
if self .chat_deployment
@@ -154,7 +154,7 @@ async def answer(
154
154
+ [
155
155
ThoughtStep (
156
156
title = "Prompt to generate answer" ,
157
- description = [ str ( message ) for message in contextual_messages ] ,
157
+ description = contextual_messages ,
158
158
props = (
159
159
{"model" : self .chat_model , "deployment" : self .chat_deployment }
160
160
if self .chat_deployment
@@ -191,7 +191,7 @@ async def answer_stream(
191
191
+ [
192
192
ThoughtStep (
193
193
title = "Prompt to generate answer" ,
194
- description = [ str ( message ) for message in contextual_messages ] ,
194
+ description = contextual_messages ,
195
195
props = (
196
196
{"model" : self .chat_model , "deployment" : self .chat_deployment }
197
197
if self .chat_deployment
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ async def answer(
102
102
+ [
103
103
ThoughtStep (
104
104
title = "Prompt to generate answer" ,
105
- description = [ str ( message ) for message in contextual_messages ] ,
105
+ description = contextual_messages ,
106
106
props = (
107
107
{"model" : self .chat_model , "deployment" : self .chat_deployment }
108
108
if self .chat_deployment
@@ -139,7 +139,7 @@ async def answer_stream(
139
139
+ [
140
140
ThoughtStep (
141
141
title = "Prompt to generate answer" ,
142
- description = [ str ( message ) for message in contextual_messages ] ,
142
+ description = contextual_messages ,
143
143
props = (
144
144
{"model" : self .chat_model , "deployment" : self .chat_deployment }
145
145
if self .chat_deployment
Original file line number Diff line number Diff line change 1
1
import { Stack } from "@fluentui/react" ;
2
- import SyntaxHighlighter from "react-syntax-highlighter" ;
2
+ import { Light as SyntaxHighlighter } from "react-syntax-highlighter" ;
3
+ import json from "react-syntax-highlighter/dist/esm/languages/hljs/json" ;
4
+ import { a11yLight } from "react-syntax-highlighter/dist/esm/styles/hljs" ;
3
5
4
6
import styles from "./AnalysisPanel.module.css" ;
5
7
6
8
import { Thoughts } from "../../api" ;
7
9
10
+ SyntaxHighlighter . registerLanguage ( "json" , json ) ;
11
+
8
12
interface Props {
9
13
thoughts : Thoughts [ ] ;
10
14
}
@@ -25,7 +29,7 @@ export const ThoughtProcess = ({ thoughts }: Props) => {
25
29
) ) }
26
30
</ Stack >
27
31
{ Array . isArray ( t . description ) ? (
28
- < SyntaxHighlighter language = "json" wrapLongLines className = { styles . tCodeBlock } >
32
+ < SyntaxHighlighter language = "json" wrapLongLines className = { styles . tCodeBlock } style = { a11yLight } >
29
33
{ JSON . stringify ( t . description , null , 2 ) }
30
34
</ SyntaxHighlighter >
31
35
) : (
You can’t perform that action at this time.
0 commit comments