mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
@@ -28,6 +28,12 @@
|
||||
<body>
|
||||
<h2>SiYuan</h2>
|
||||
<div class="fn__clear">
|
||||
<div>
|
||||
<svg>
|
||||
<use xlink:href="#iconTriangleAlert"></use>
|
||||
</svg>
|
||||
iconTriangleAlert
|
||||
</div>
|
||||
<div>
|
||||
<svg>
|
||||
<use xlink:href="#iconCirclePlay"></use>
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
document.body.insertAdjacentHTML('afterbegin', `<svg id="iconsLitheness" style="position: absolute; width: 0; height: 0; overflow: hidden;">
|
||||
<defs>
|
||||
<symbol id="iconTriangleAlert" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/>
|
||||
</symbol>
|
||||
<symbol id="iconCirclePlay" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z"/><circle cx="12" cy="12" r="10"/>
|
||||
</symbol>
|
||||
|
||||
@@ -372,11 +372,18 @@
|
||||
}
|
||||
|
||||
.agent-chat__msg--error .agent-chat__body {
|
||||
display: flex; align-items: flex-start; gap: 6px;
|
||||
color: var(--b3-theme-error);
|
||||
padding-left: 8px;
|
||||
border-left: 3px solid var(--b3-theme-error);
|
||||
background: var(--b3-theme-error-light);
|
||||
word-break: break-word;
|
||||
padding: 4px 8px;
|
||||
border-radius: var(--b3-border-radius);
|
||||
}
|
||||
|
||||
.agent-chat__error-icon {
|
||||
width: 16px; height: 16px;
|
||||
flex-shrink: 0;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.agent-chat__snapshot-body {
|
||||
@@ -386,7 +393,6 @@
|
||||
padding: 4px 8px;
|
||||
font-size: 85%;
|
||||
color: var(--b3-theme-on-surface-light);
|
||||
border-left: 3px solid var(--b3-theme-primary-light);
|
||||
}
|
||||
|
||||
.agent-chat__snapshot-icon {
|
||||
|
||||
@@ -1286,7 +1286,7 @@ export class AgentChat extends Model {
|
||||
this.currentAIElement = null;
|
||||
const el = document.createElement("div");
|
||||
el.className = "agent-chat__msg agent-chat__msg--error";
|
||||
el.innerHTML = '<div class="agent-chat__body agent-chat__body--error">' + escapeHtml(message) + "</div>";
|
||||
el.innerHTML = '<div class="agent-chat__body agent-chat__body--error"><svg class="agent-chat__error-icon"><use xlink:href="#iconTriangleAlert"></use></svg><span>' + escapeHtml(message) + "</span></div>";
|
||||
this.messagesContainer.appendChild(el);
|
||||
this.scrollToBottom(true);
|
||||
this.flushThinkingStep();
|
||||
|
||||
Reference in New Issue
Block a user