Skip to content

Commit

Permalink
Clean up some of the design of agents, inspired by dicussion khoj-ai#792
Browse files Browse the repository at this point in the history
  • Loading branch information
sabaimran committed Jun 3, 2024
1 parent 8cdab5f commit 4679f07
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions src/khoj/interface/web/agents.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
<!--Add Header Logo and Nav Pane-->
{% import 'utils.html' as utils %}
{{ utils.heading_pane(user_photo, username, is_active, has_documents) }}
<!-- {{ agents }} -->

<div id="agents-list">
<div id="agents-header">
<h1 id="agents-list-title">Agents</h1>
<h1 id="agents-list-title">Chat with an Agent</h1>
<!-- <div id="create-agent">
<a href="/agents/create"><svg class="new-convo-button" viewBox="0 0 35 35" fill="#000000" viewBox="0 0 32 32" version="1.1" xmlns="https://www.w3.org/2000/svg">
<path d="M16 0c-8.836 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM16 30.032c-7.72 0-14-6.312-14-14.032s6.28-14 14-14 14 6.28 14 14-6.28 14.032-14 14.032zM23 15h-6v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1v6h-6c-0.552 0-1 0.448-1 1s0.448 1 1 1h6v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6h6c0.552 0 1-0.448 1-1s-0.448-1-1-1z"></path>
Expand All @@ -36,13 +35,19 @@ <h1 id="agents-list-title">Agents</h1>
<a href="/agent/{{ agent.slug }}">
<h2>{{ agent.name }}</h2>
</a>
<p>{{ agent.personality }}</p>
</div>
<div class="agent-info">
<button onclick="openChat('{{ agent.slug }}')">
<img class="send-icon" src="/static/assets/icons/send.svg" alt="Chat">
</button>
</div>
<div class="agent-personality">
<a href="/agent/{{ agent.slug }}">
<p>
{{ agent.personality }}
</p>
</a>
</div>
</div>
{% endfor %}
</div>
Expand Down Expand Up @@ -70,10 +75,15 @@ <h2>{{ agent.name }}</h2>
margin: 0;
}

.agent-info p {
height: 50px;
overflow: auto;
margin: 0px;
.agent-personality p {
white-space: inherit;
overflow: hidden;
height: 100px;
}

div.agent-personality {
text-align: left;
grid-column: span 3;
}

div.agent-info {
Expand Down Expand Up @@ -145,9 +155,9 @@ <h2>{{ agent.name }}</h2>
gap: 20px;
align-items: center;
padding: 20px;
background-color: var(--frosted-background-color);
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
border-radius: 8px;
background: linear-gradient(18.48deg,rgba(252, 213, 87, 0.25) 2.76%,rgba(197, 0, 0, 0) 17.23%),linear-gradient(200.6deg,rgba(244, 229, 68, 0.25) 4.13%,rgba(230, 26, 26, 0) 20.54%);
}

div.agent-info {
Expand Down

0 comments on commit 4679f07

Please sign in to comment.