Skip to content

Commit 31bc72f

Browse files
committed
draggable state log section
1 parent 16d00f1 commit 31bc72f

File tree

2 files changed

+32
-19
lines changed

2 files changed

+32
-19
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -368,23 +368,24 @@
368368
margin-bottom: 10px;
369369
position: sticky;
370370
display: flex;
371-
// justify-content: flex-end;
372371
justify-content: space-between;
373372
}
374373

374+
.state-log-section {
375+
height: 90vh;
376+
}
377+
375378
.content-log-list {
376379
height: 90vh;
377380
}
378381

379382
.state-change-log-list {
380-
height: 35vh;
381-
border-bottom-style: solid;
382-
border-bottom-color: #fff;
383-
border-bottom-width: 5px;
383+
height: 100%;
384384
}
385385

386386
.state-log-list {
387-
height: 65vh;
387+
height: 100%;
388+
padding-top: 10px;
388389
}
389390

390391
.queue-change-log-list {
@@ -393,6 +394,8 @@
393394
}
394395

395396
.log-list {
397+
background-color: black;
398+
396399
.log-element {
397400
margin-top: 10px;
398401
margin-bottom: 15px;

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

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import 'overlayscrollbars/overlayscrollbars.css';
33
import { OverlayScrollbars } from 'overlayscrollbars';
44
import { afterUpdate, onDestroy, onMount } from 'svelte';
5+
import { Pane, Splitpanes } from 'svelte-splitpanes';
56
import { page } from '$app/stores';
67
import { GetStateLogs } from '$lib/services/logging-service';
78
import StateLogElement from './state-log-element.svelte';
@@ -94,19 +95,28 @@
9495
<i class="bx bx-trash"></i>
9596
</button>
9697
</div>
97-
<div class="state-change-scrollbar state-change-log-list log-list padding-side">
98-
<ul>
99-
{#each stateChangeLogs as log}
100-
<StateChangeElement data={log} />
101-
{/each}
102-
</ul>
103-
</div>
104-
<div class="state-log-scrollbar state-log-list log-list padding-side">
105-
<ul>
106-
{#each stateLogs as log}
107-
<StateLogElement data={log} />
108-
{/each}
109-
</ul>
98+
<div class="state-log-section">
99+
<Splitpanes horizontal>
100+
<Pane size={35} minSize={25} maxSize={75}>
101+
<div class="state-change-scrollbar state-change-log-list log-list padding-side">
102+
<ul>
103+
{#each stateChangeLogs as log}
104+
<StateChangeElement data={log} />
105+
{/each}
106+
</ul>
107+
</div>
108+
</Pane>
109+
<Pane size={65} minSize={25} maxSize={75}>
110+
<div class="state-log-scrollbar state-log-list log-list padding-side">
111+
<ul>
112+
{#each stateLogs as log}
113+
<StateLogElement data={log} />
114+
{/each}
115+
</ul>
116+
</div>
117+
</Pane>
118+
</Splitpanes>
110119
</div>
120+
111121
</div>
112122
</div>

0 commit comments

Comments
 (0)