Skip to content

Commit bf006f1

Browse files
authored
Merge pull request #162 from iceljc/features/refine-chat-window
Features/refine chat window
2 parents cb33309 + 047eef5 commit bf006f1

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

src/lib/helpers/enums.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,12 @@ const fileSourceType = {
5757
User: 'user',
5858
Bot: 'bot'
5959
};
60-
export const FileSourceType = Object.freeze(fileSourceType);
60+
export const FileSourceType = Object.freeze(fileSourceType);
61+
62+
const agentType = {
63+
Routing: 'routing',
64+
Task: 'task',
65+
Static: 'static',
66+
Evaluating: 'evaluating'
67+
};
68+
export const AgentType = Object.freeze(agentType);

src/lib/helpers/types.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
* @property {boolean} disabled
119119
* @property {boolean} is_public
120120
* @property {boolean} is_host
121-
* @property {boolean} is_router
122121
* @property {boolean} allow_routing
123122
* @property {string} icon_url - Icon
124123
* @property {string[]} profiles - The agent profiles.

src/routes/page/agent/[agentId]/agent-overview.svelte

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<script>
2+
import { onMount } from 'svelte';
23
import { Card, CardBody, CardHeader, Input, Table } from '@sveltestrap/sveltestrap';
34
import InPlaceEdit from '$lib/common/InPlaceEdit.svelte'
45
import { format } from '$lib/helpers/datetime';
5-
import { onMount } from 'svelte';
6+
import { AgentType } from '$lib/helpers/enums';
67
import { getAgentUtilities } from '$lib/services/agent-service';
78
89
/** @type {import('$types').AgentModel} */
@@ -89,10 +90,16 @@
8990
<tr>
9091
<th class="agent-prop-key">Type</th>
9192
<td>
92-
{#if agent.is_router}
93+
{#if agent.type == AgentType.Routing}
9394
Routing Agent
94-
{:else}
95+
{:else if agent.type == AgentType.Evaluating}
96+
Evaluation Agent
97+
{:else if agent.type == AgentType.Static}
98+
Static Agent
99+
{:else if agent.type == AgentType.Task}
95100
Task Agent
101+
{:else}
102+
Unkown
96103
{/if}
97104
</td>
98105
</tr>

0 commit comments

Comments
 (0)