File tree Expand file tree Collapse file tree 6 files changed +17
-12
lines changed
chat/[agentId]/[conversationId]
page/conversation/[conversationId] Expand file tree Collapse file tree 6 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 99 export let containerClasses = " " ;
1010
1111 /** @type {boolean} */
12- export let replaceText = false ;
12+ export let rawText = false ;
1313
1414 let displayText = ' ' ;
1515 $: {
16- const markedText = replaceNewLine (marked (replaceText ? replaceMarkdown (text || ' ' ) : text || ' ' )? .toString () );
16+ const markedText = ! rawText ? replaceNewLine (marked (replaceMarkdown (text || ' ' )) ? . toString ()) : marked ( text || ' ' )? .toString ();
1717 if (!! markedText && markedText .endsWith (' <br>' )) {
1818 const idx = markedText .lastIndexOf (' <br>' );
1919 displayText = markedText .substring (0 , idx);
Original file line number Diff line number Diff line change @@ -183,8 +183,8 @@ button:focus {
183183 }
184184
185185 p {
186- margin-top : 0 !important ;
187- margin-bottom : 0 !important ;
186+ margin-top : 1 em !important ;
187+ margin-bottom : 1 em !important ;
188188 }
189189
190190 a {
Original file line number Diff line number Diff line change 218218 }
219219
220220 span p {
221- margin-top : 0 px !important ;
222- margin-bottom : 0 px !important ;
221+ margin-top : 1 em !important ;
222+ margin-bottom : 1 em !important ;
223223 }
224224
225225 .chat-indication {
Original file line number Diff line number Diff line change 1313 let logTextStyle = ' ' ;
1414 let is_collapsed = true ;
1515 const unknownAgent = " Uknown" ;
16- const includedSources = [
16+ const collapsedSources = [
1717 ContentLogSource .Prompt ,
1818 ContentLogSource .AgentResponse ,
1919 ContentLogSource .FunctionCall ,
2020 ContentLogSource .Notification
2121 ];
2222
23+ const rawTextSources = [
24+ ContentLogSource .AgentResponse ,
25+ ContentLogSource .FunctionCall ,
26+ ];
27+
2328 $: {
2429 if (data .source === ContentLogSource .AgentResponse || data .source === ContentLogSource .Notification ) {
2530 logDisplayStyle = ' border border-secondary' ;
6368 class ={` rounded log-content ${logDisplayStyle } ` }
6469 style =" padding: 5px 8px;"
6570 >
66- <div class:log-collapse ={includedSources .includes (data .source ) && !! is_collapsed }>
67- <Markdown containerClasses ={logTextStyle } text ={data ?.content } replaceText />
71+ <div class:log-collapse ={collapsedSources .includes (data .source ) && !! is_collapsed }>
72+ <Markdown containerClasses ={logTextStyle } text ={data ?.content } rawText ={ rawTextSources . includes ( data . source )} />
6873 </div >
6974
70- {#if includedSources .includes (data .source )}
75+ {#if collapsedSources .includes (data .source )}
7176 <Button class ='toggle-btn btn-sm' color ="link" on:click ={(e ) => toggleText (e )}>
7277 {` ${is_collapsed ? ' More +' : ' Less -' } ` }
7378 </Button >
Original file line number Diff line number Diff line change 77
88<div class =" ctext-wrap bg-primary" >
99 <div class =" flex-shrink-0 align-self-center" >
10- <Markdown text ={message ?.rich_content ?.message ?.text || message ?.text } />
10+ <Markdown text ={message ?.rich_content ?.message ?.text || message ?.text } rawText />
1111 </div >
1212</div >
Original file line number Diff line number Diff line change 2121 <Markdown
2222 containerClasses ={' dialog-item-text' }
2323 text ={dialog ?.rich_content ?.message ?.text || dialog ?.text }
24- replaceText
24+ rawText
2525 />
2626</div >
2727
You can’t perform that action at this time.
0 commit comments