@@ -20,6 +20,7 @@ import hljs from "highlight.js/lib/core";
20
20
import CopyButtonPlugin from "highlightjs-copy" ;
21
21
import "highlightjs-copy/styles/highlightjs-copy.css" ;
22
22
import python from "highlight.js/lib/languages/python" ;
23
+ import bash from "highlight.js/lib/languages/bash" ; // Used sometimes for plain text
23
24
import markdownIt from "markdown-it" ;
24
25
import { useEffect , useRef } from "preact/hooks" ;
25
26
import { Histogram , Markdown , setRenderer } from "qsharp-lang/ux" ;
@@ -34,9 +35,10 @@ import { WebviewApi } from "vscode-webview";
34
35
35
36
const vscodeApi : WebviewApi < ChatElement [ ] > = acquireVsCodeApi ( ) ;
36
37
37
- // Only include the Python and Q# languages so as not
38
+ // Only include a small set of languages so as not
38
39
// to bloat the code
39
40
hljs . registerLanguage ( "python" , python ) ;
41
+ hljs . registerLanguage ( "bash" , bash ) ;
40
42
hljs . registerLanguage ( "qsharp" , hlsjQsharp ) ;
41
43
hljs . addPlugin ( new CopyButtonPlugin ( ) ) ;
42
44
const md = markdownIt ( "commonmark" ) ;
@@ -162,13 +164,18 @@ function ChatHistory({ model }: { model: ChatViewModel }) {
162
164
function StatusIndicator ( { status } : { status : Status } ) {
163
165
return (
164
166
< div className = "status-indicator" >
165
- { status . status === "waitingAssistantResponse"
166
- ? "🕒"
167
- : status . status === "executingTool"
168
- ? "🕒 " + status . toolName
169
- : status . status === "assistantConnectionError"
170
- ? "There was an error communicating with Azure Quantum Copilot. Please check your Internet connection and try again."
171
- : "" }
167
+ { status . status === "waitingAssistantResponse" ? (
168
+ < span class = "codicon codicon-loading codicon-modifier-spin" > </ span >
169
+ ) : status . status === "executingTool" ? (
170
+ < >
171
+ < span > { status . toolName } </ span >
172
+ < span class = "codicon codicon-loading codicon-modifier-spin" > </ span >
173
+ </ >
174
+ ) : status . status === "assistantConnectionError" ? (
175
+ "There was an error communicating with Azure Quantum Copilot. Please check your Internet connection and try again."
176
+ ) : (
177
+ ""
178
+ ) }
172
179
</ div >
173
180
) ;
174
181
}
0 commit comments