Skip to content

Commit 52a3d12

Browse files
author
Jicheng Lu
committed
add state source
1 parent c2cefc3 commit 52a3d12

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

src/lib/helpers/types.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ IRichContent.prototype.text;
306306
* @property {number?} before_active_rounds - The state active rounds before change.
307307
* @property {string} after_value - The value after change.
308308
* @property {number?} after_active_rounds - The state active rounds after change.
309+
* @property {string} data_type - The state value data type.
310+
* @property {string} source - The state source.
309311
* @property {Date} created_at - The log sent time.
310312
*/
311313

src/lib/scss/custom/pages/_chat.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@
447447
.state-key {
448448
color: var(--bs-primary);
449449
}
450+
451+
.state-source {
452+
font-size: 12px;
453+
}
450454

451455
.state-value-container {
452456
display: flex;

src/routes/chat/[agentId]/[conversationId]/stateLogs/state-change-element.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@
4545
{#if beforeDataValue != defaultValue || afterDataValue != defaultValue}
4646
<div class="log-element state-change-container">
4747
<div class="log-meta state-key">
48-
<div><b>{`${data?.name}`}</b></div>
48+
<div>
49+
<span><b>{`${data?.name}`}</b></span>
50+
{#if !!data?.source}
51+
<span class="state-source">{`(${data?.source})`}</span>
52+
{/if}
53+
</div>
4954
</div>
5055
<div class="log-content state-value-container">
5156
<div class="state-value">

0 commit comments

Comments
 (0)