Skip to content

Commit 44bf490

Browse files
authored
Merge pull request #253 from iceljc/features/refine-chat-window
refine agent config and rc options
2 parents d84993c + ea71e40 commit 44bf490

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -761,17 +761,26 @@
761761
justify-content: space-evenly;
762762
gap: 5px;
763763
padding: 10px 15px;
764+
overflow-y: auto;
765+
scrollbar-width: none;
766+
height: 200px;
764767

765768
.card-element-title {
766-
font-size: 0.8rem;
769+
font-size: 0.85rem;
767770
font-weight: 700;
768771
}
769772

770773
.card-element-subtitle {
771-
font-size: 0.7rem;
774+
font-size: 0.8rem;
772775
font-weight: 500;
773776
}
774777

778+
.card-element-text {
779+
font-size: 0.75rem;
780+
font-weight: 400;
781+
padding: 5px;
782+
}
783+
775784
.card-option-group {
776785
margin-top: 5px;
777786

src/routes/chat/[agentId]/[conversationId]/rich-content/rc-complex-options.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
return {
4747
title: op.title,
4848
subtitle: op.subtitle,
49+
text: op.text,
4950
image_url: op.image_url,
5051
options: options
5152
};
@@ -114,6 +115,9 @@
114115
{#if !!card.subtitle}
115116
<div class="card-element-subtitle hide-text">{@html card.subtitle}</div>
116117
{/if}
118+
{#if !!card.text}
119+
<div class="card-element-text hide-text">{card.text}</div>
120+
{/if}
117121
{#if card.options?.length > 0}
118122
<div class="card-option-group">
119123
{#each card.options as option, i (i)}

src/routes/chat/[agentId]/[conversationId]/rich-content/rich-content.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
isMultiSelect = true;
3434
} else if (richType === RichType.Generic) {
3535
options = message?.rich_content?.message?.elements;
36+
isComplexElement = true;
3637
// @ts-ignore
37-
isComplexElement = message?.rich_content?.message?.elements?.some(x => x.buttons?.length > 0) || false;
38+
// isComplexElement = message?.rich_content?.message?.elements?.some(x => x.buttons?.length > 0) || false;
3839
} else if (message?.rich_content?.editor === EditorType.File) {
3940
options = message?.rich_content?.message?.buttons;
4041
}

src/routes/page/agent/[agentId]/agent-llm-config.svelte

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,16 @@
2323
if (!!config.provider) {
2424
models = await getLlmProviderModels(config.provider);
2525
}
26+
init();
2627
});
2728
29+
function init() {
30+
const foundProvider = providers.find(x => x === config.provider);
31+
const foundModel = models.find(x => x.name === config.model);
32+
config.provider = foundProvider || null;
33+
config.model = foundModel?.name || null;
34+
}
35+
2836
/** @param {any} e */
2937
async function changeProvider(e) {
3038
const provider = e.target.value;
@@ -67,7 +75,7 @@
6775
<h5 class="mt-1 mb-3">LLM Config</h5>
6876
<img src="images/brands/azure-openai-logo.avif" alt="" height="50" />
6977
{#if agent.llm_config?.is_inherit}
70-
<i class="bx bx-copy"></i> <span class="text-muted">Inherited</span>
78+
<i class="bx bx-copy"></i> <span class="text-muted">Inherited</span>
7179
{/if}
7280
</div>
7381
@@ -93,7 +101,7 @@
93101
{#each models as option}
94102
<option value={option.name} selected={option.name == config.model}>{option.name}</option>
95103
{/each}
96-
</Input>
104+
</Input>
97105
</div>
98106
</div>
99107

0 commit comments

Comments
 (0)