agent-zero/webui/components/chat/input/bottom-actions.html
Alessandro 0e262f7b87
Some checks are pending
Build And Publish Docker Images / plan (push) Waiting to run
Build And Publish Docker Images / build (push) Blocked by required conditions
Refresh welcome screen and composer
Rework the welcome screen around the shared new-chat composer, renewed quick actions, discovery cards, OAuth accounts, and dedicated system resources panel.

Restore static button colors and neutral surfaces, move microphone state feedback onto the icon, and keep Rubik/code-font composer behavior.

Add focused static regressions for the welcome composer, OAuth discovery panel, and speech button contract.
2026-06-22 15:12:20 +02:00

161 lines
7.5 KiB
HTML

<html>
<head>
<script type="module">
import { store } from "/components/chat/input/input-store.js";
import { store as attachmentsStore } from "/components/chat/attachments/attachmentsStore.js";
import { store as historyStore } from "/components/modals/history/history-store.js";
import { store as contextStore } from "/components/modals/context/context-store.js";
import { store as chatsStore } from "/components/sidebar/chats/chats-store.js";
import { store as mcpServersStore } from "/components/settings/mcp/client/mcp-servers-store.js";
</script>
</head>
<body>
<template x-if="$store.chatInput">
<div class="chat-bottom-actions-menu">
<input
type="file"
x-ref="chatFileInput"
class="chat-bottom-menu-file-input"
accept="*"
multiple
@change="$store.chatAttachments.handleFileUpload($event); $store.chatInput.closeChatMoreMenu()"
>
<button
type="button"
class="chat-bottom-menu-item"
@click.stop="$refs.chatFileInput?.click()"
>
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
<path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z" />
</svg>
<span>Attach files</span>
</button>
<input
type="file"
x-ref="chatFolderInput"
class="chat-bottom-menu-file-input"
webkitdirectory
directory
multiple
@change="$store.chatAttachments.handleFileUpload($event); $store.chatInput.closeChatMoreMenu()"
>
<button
type="button"
class="chat-bottom-menu-item"
@click.stop="$refs.chatFolderInput?.click()"
>
<span class="material-symbols-outlined" aria-hidden="true">drive_folder_upload</span>
<span>Attach folder</span>
</button>
<button
type="button"
class="chat-bottom-menu-item"
@click="$store.mcpServersStore.openFromComposer($store.chats.selectedContext?.project?.name || ''); $store.chatInput.closeChatMoreMenu()"
>
<span class="material-symbols-outlined" aria-hidden="true">hub</span>
<span>MCP Servers</span>
</button>
<button
type="button"
class="chat-bottom-menu-item"
@click="$confirmClick($event, () => { $store.chats.resetChat(); $store.chatInput.closeChatMoreMenu() })"
:disabled="!$store.chats.selected"
>
<span class="material-symbols-outlined" aria-hidden="true">delete_sweep</span>
<span>Clear Chat</span>
</button>
<button
type="button"
class="chat-bottom-menu-item"
id="history_inspect"
@click="$store.history.open(); $store.chatInput.closeChatMoreMenu()"
:disabled="!$store.chats.selected"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="5 10 85 85" width="18" height="18" aria-hidden="true">
<path fill="currentColor" d="m59.572,57.949c-.41,0-.826-.105-1.207-.325l-9.574-5.528c-.749-.432-1.21-1.231-1.21-2.095v-14.923c0-1.336,1.083-2.419,2.419-2.419s2.419,1.083,2.419,2.419v13.526l8.364,4.829c1.157.668,1.554,2.148.886,3.305-.448.776-1.261,1.21-2.097,1.21Zm30.427-7.947c0,10.684-4.161,20.728-11.716,28.283-6.593,6.59-15.325,10.69-24.59,11.544-1.223.113-2.448.169-3.669.169-7.492,0-14.878-2.102-21.22-6.068l-15.356,5.733c-.888.331-1.887.114-2.557-.556s-.887-1.669-.556-2.557l5.733-15.351c-4.613-7.377-6.704-16.165-5.899-24.891.854-9.266,4.954-17.998,11.544-24.588,7.555-7.555,17.6-11.716,28.285-11.716s20.73,4.161,28.285,11.716c7.555,7.555,11.716,17.599,11.716,28.283Zm-15.137-24.861c-13.71-13.71-36.018-13.71-49.728,0-11.846,11.846-13.682,30.526-4.365,44.417.434.647.53,1.464.257,2.194l-4.303,11.523,11.528-4.304c.274-.102.561-.153.846-.153.474,0,.944.139,1.348.41,13.888,9.315,32.568,7.479,44.417-4.365,13.707-13.708,13.706-36.014,0-49.723Zm-24.861-4.13c-15.989,0-28.996,13.006-28.996,28.992s13.008,28.992,28.996,28.992c1.336,0,2.419-1.083,2.419-2.419s-1.083-2.419-2.419-2.419c-13.32,0-24.157-10.835-24.157-24.153s10.837-24.153,24.157-24.153,24.153,10.835,24.153,24.153c0,1.336,1.083,2.419,2.419,2.419c0-15.986-13.006-28.992-28.992-28.992Zm25.041,33.531c-1.294.347-2.057,1.673-1.71,2.963.343,1.289,1.669,2.057,2.963,1.71,1.289-.343,2.053-1.669,1.71-2.963-.347-1.289-1.673-2.057-2.963-1.71Zm-2.03,6.328c-1.335,0-2.419,1.084-2.419,2.419s1.084,2.419,2.419,2.419,2.419-1.084,2.419-2.419-1.084-2.419-2.419-2.419Zm-3.598,5.587c-1.289-.347-2.615.416-2.963,1.71-.343,1.289.421,2.615,1.71,2.963,1.294.347,2.62-.421,2.963-1.71.347-1.294-.416-2.62-1.71-2.963Zm-4.919,4.462c-1.157-.667-2.638-.27-3.306.887-.667,1.157-.27,2.638.887,3.305,1.157.668,2.638.27,3.306-.887.667-1.157.27-2.638-.887-3.306Zm-9.327,3.04c-.946.946-.946,2.478,0,3.42.942.946,2.473.946,3.42,0,.946-.942.946-2.473,0-3.42-.946-.942-2.478-.946-3.42,0Z"></path>
</svg>
<span>History</span>
</button>
<button
type="button"
class="chat-bottom-menu-item"
id="ctx_window"
@click="$store.context.open(); $store.chatInput.closeChatMoreMenu()"
:disabled="!$store.chats.selected"
>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="17 15 70 70" width="18" height="18" fill="currentColor" aria-hidden="true">
<path d="m63 25c1.1016 0 2-0.89844 2-2s-0.89844-2-2-2h-26c-1.1016 0-2 0.89844-2 2s0.89844 2 2 2z"></path>
<path d="m63 79c1.1016 0 2-0.89844 2-2s-0.89844-2-2-2h-26c-1.1016 0-2 0.89844-2 2s0.89844 2 2 2z"></path>
<path d="m68 39h-36c-6.0703 0-11 4.9297-11 11s4.9297 11 11 11h36c6.0703 0 11-4.9297 11-11s-4.9297-11-11-11zm0 18h-36c-3.8594 0-7-3.1406-7-7s3.1406-7 7-7h36c3.8594 0 7 3.1406 7 7s-3.1406 7-7 7z"></path>
</svg>
<span>Context</span>
</button>
</div>
</template>
<style>
.chat-bottom-actions-menu {
display: flex;
flex-direction: column;
width: 100%;
font-family: var(--font-family-main, "Rubik", Arial, Helvetica, sans-serif);
font-size: 0.8125rem;
}
.chat-bottom-menu-item {
display: flex;
align-items: center;
gap: 0.4rem;
width: 100%;
margin: 0;
padding: var(--spacing-xs) var(--spacing-sm);
border-radius: 0.25rem;
background: transparent;
color: var(--color-text);
font-family: 'Rubik', Arial, Helvetica, sans-serif;
text-align: left;
cursor: pointer;
opacity: 0.88;
transition: background-color 0.12s ease, opacity 0.12s ease;
white-space: nowrap;
box-sizing: border-box;
}
button.chat-bottom-menu-item {
border: none;
}
.chat-bottom-menu-file-input {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
opacity: 0;
}
button.chat-bottom-menu-item:hover:not(:disabled) {
opacity: 1;
background-color: var(--color-background-hover);
}
button.chat-bottom-menu-item:active:not(:disabled) { opacity: 0.72; }
button.chat-bottom-menu-item:disabled {
opacity: 0.38;
cursor: not-allowed;
pointer-events: none;
}
.chat-bottom-menu-item .material-symbols-outlined {
font-size: 18px;
flex-shrink: 0;
opacity: 0.9;
}
.chat-bottom-menu-item svg { flex-shrink: 0; opacity: 0.88; }
</style>
</body>
</html>