Skip to content

Commit 3a49b99

Browse files
authored
Merge pull request #282 from iceljc/features/refine-chat-window
refine agent
2 parents fb3af89 + 27b5a04 commit 3a49b99

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

src/lib/helpers/enums.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ const agentType = {
6666
Routing: 'routing',
6767
Task: 'task',
6868
Static: 'static',
69-
Evaluating: 'evaluating'
69+
Evaluating: 'evaluating',
70+
Planning: 'planning'
7071
};
7172
export const AgentType = Object.freeze(agentType);
7273

src/lib/helpers/types/agentTypes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
* @property {string} icon_url - Icon
5151
* @property {string[]} profiles - The agent profiles.
5252
* @property {boolean} merge_utility - Merge utility
53+
* @property {number?} [max_message_count]
5354
* @property {AgentUtility[]} utilities - The agent utilities.
5455
* @property {Date} created_datetime
5556
* @property {Date} updated_datetime

src/routes/page/agent/[agentId]/+page.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
instruction: agent.instruction || '',
7878
channel_instructions: agent.channel_instructions || [],
7979
profiles: agent.profiles?.filter((x, idx, self) => x?.trim()?.length > 0 && self.indexOf(x) === idx) || [],
80-
utilities: agent.utilities || []
80+
utilities: agent.utilities || [],
81+
max_message_count: Number(agent.max_message_count) > 0 ? Number(agent.max_message_count) : null
8182
};
8283
isLoading = true;
8384
saveAgent(agent).then(res => {

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@
7272
<td>
7373
{#if agent.type == AgentType.Routing}
7474
Routing Agent
75+
{:else if agent.type == AgentType.Planning}
76+
Planning Agent
7577
{:else if agent.type == AgentType.Evaluating}
7678
Evaluation Agent
7779
{:else if agent.type == AgentType.Static}
@@ -139,7 +141,6 @@
139141
</div>
140142
</td>
141143
</tr>
142-
143144
<tr>
144145
<th class="agent-prop-key">Status</th>
145146
<td>
@@ -149,6 +150,22 @@
149150
</div>
150151
</td>
151152
</tr>
153+
<tr>
154+
<th class="agent-prop-key">Max message count</th>
155+
<td>
156+
<div class="mb-3">
157+
<Input
158+
type="number"
159+
style="width: 50%; min-width: 100px;"
160+
class="text-center"
161+
min={1}
162+
max={1000}
163+
step={1}
164+
bind:value={agent.max_message_count}
165+
/>
166+
</div>
167+
</td>
168+
</tr>
152169
<tr>
153170
<th class="agent-prop-key">Created Date</th>
154171
<td>{format(agent.created_datetime, 'time')}</td>

0 commit comments

Comments
 (0)