File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 2
2
# VITE_API_BASE=http://localhost:5174
3
3
# VITE_ENDPOINT_COMPLETIONS=/v1/chat/completions
4
4
# VITE_ENDPOINT_MODELS=/v1/models
5
+ # VITE_RENDER_LATEX=false
Original file line number Diff line number Diff line change 19
19
export let message: Message
20
20
export let chatId: number
21
21
export let chat: Chat
22
+
23
+ const renderLatexFlag = import .meta .env .VITE_RENDER_LATEX || true
22
24
23
25
$ : chatSettings = chat .settings
24
26
224
226
}
225
227
226
228
const preprocessMath = (text : string ): string => {
229
+ if (renderLatexFlag !== true ) {
230
+ return text
231
+ }
227
232
var codeBlockPlaceholderPrefix = " __prefix__c0d3b10ck__" ;
228
233
while (text .indexOf (codeBlockPlaceholderPrefix ) > 0 ) {
229
234
codeBlockPlaceholderPrefix = codeBlockPlaceholderPrefix + " _" ;
You can’t perform that action at this time.
0 commit comments