mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-08-10 17:05:57 +00:00
Introduce the x-icon custom element and migrate first-party WebUI and bundled plugin markup while retaining legacy Material icon compatibility. Defer icon-font readiness until the splash-installed document is parsed so Firefox does not leave icons transparent. Centralize chat message collapse handling, avoid false Show More controls on short user messages, and align grouped-message pagination styling. Update DOX and add regression coverage for the icon and collapse behavior.
91 lines
2.7 KiB
HTML
91 lines
2.7 KiB
HTML
<html>
|
|
<head>
|
|
<title>Rename</title>
|
|
<script type="module">
|
|
import { store } from "/plugins/_chat_naming/webui/chat-naming-store.js";
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div x-data>
|
|
<template x-if="$store.chatNaming">
|
|
<div class="chat-naming-modal"
|
|
x-init="await $store.chatNaming.onOpen(); $nextTick(() => $refs.nameInput?.focus())">
|
|
<label class="chat-naming-label" for="chat-naming-input">Name</label>
|
|
<input id="chat-naming-input" type="text" x-ref="nameInput"
|
|
x-model="$store.chatNaming.name"
|
|
@keydown.enter.prevent="$store.chatNaming.save()"
|
|
:disabled="$store.chatNaming.loading || $store.chatNaming.saving"
|
|
maxlength="200" autocomplete="off">
|
|
</div>
|
|
</template>
|
|
</div>
|
|
|
|
<template x-if="$store.chatNaming">
|
|
<div class="modal-footer" data-modal-footer>
|
|
<div class="chat-naming-secondary-actions">
|
|
<button type="button" class="btn"
|
|
@click="$store.chatNaming.generate()"
|
|
:disabled="$store.chatNaming.loading || $store.chatNaming.generating
|
|
|| $store.chatNaming.saving">
|
|
<x-icon
|
|
:name="$store.chatNaming.generating ? 'progress_activity' : 'auto_awesome'"></x-icon>
|
|
<span x-text="$store.chatNaming.generating ? 'Generating...' : 'Generate'"></span>
|
|
</button>
|
|
<button type="button" class="btn"
|
|
@click="$store.chatNaming.openSettings()"
|
|
:disabled="$store.chatNaming.loading || $store.chatNaming.saving">
|
|
<x-icon name="settings"></x-icon>
|
|
<span>Settings</span>
|
|
</button>
|
|
</div>
|
|
<button type="button" class="btn btn-ok"
|
|
@click="$store.chatNaming.save()"
|
|
:disabled="$store.chatNaming.loading || $store.chatNaming.saving
|
|
|| !$store.chatNaming.name.trim()">
|
|
Save
|
|
</button>
|
|
<button type="button" class="btn btn-cancel"
|
|
@click="$store.chatNaming.close()" :disabled="$store.chatNaming.saving">
|
|
Cancel
|
|
</button>
|
|
</div>
|
|
</template>
|
|
|
|
<style>
|
|
.chat-naming-modal {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--spacing-sm);
|
|
padding: 1rem;
|
|
}
|
|
|
|
.chat-naming-label {
|
|
color: var(--color-text);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.chat-naming-modal input {
|
|
width: 100%;
|
|
}
|
|
|
|
.chat-naming-secondary-actions {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
margin-right: auto;
|
|
}
|
|
|
|
.chat-naming-secondary-actions .btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.chat-naming-secondary-actions .material-symbols-outlined {
|
|
font-size: 1.1rem;
|
|
line-height: 1;
|
|
}
|
|
</style>
|
|
</body>
|
|
</html>
|