Дерево истории, удаление версий, мультизагрузка, редактирование с референсом и областью, подсказки промптов

This commit is contained in:
2026-08-26 19:17:36 +07:00
parent 27a2ac304c
commit f91aa94336
5 changed files with 1619 additions and 190 deletions

View File

@@ -186,6 +186,7 @@ h1 {
.control-stack {
display: grid;
min-width: 0;
gap: 23px;
}
@@ -916,71 +917,193 @@ textarea:disabled {
}
.history-list {
display: flex;
gap: 12px;
overflow-x: auto;
display: grid;
gap: 14px;
overflow-y: auto;
padding: 4px 4px 10px;
}
.history-item {
display: flex;
flex-direction: column;
gap: 7px;
flex: 0 0 150px;
width: 150px;
padding: 9px;
border: 1.5px solid var(--line);
.history-group {
padding: 10px;
border: 1px solid var(--line);
border-radius: var(--radius-small);
background: var(--panel);
cursor: pointer;
text-align: left;
font: inherit;
transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.history-item:hover {
border-color: var(--accent);
transform: translateY(-1px);
.history-group-count {
display: block;
margin: 7px 2px 2px;
color: var(--muted);
font-size: 10.5px;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.history-item.is-current {
.history-node {
position: relative;
display: flex;
align-items: center;
gap: 6px;
margin-left: calc(var(--depth, 0) * 18px);
padding: 5px 6px;
border: 1.5px solid transparent;
border-radius: var(--radius-small);
transition:
border-color 0.15s ease,
box-shadow 0.15s ease,
background 0.15s ease;
}
.history-node:hover {
background: rgba(108, 92, 231, 0.05);
}
.history-node.is-current {
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-soft);
}
.history-item img {
width: 100%;
height: 92px;
.history-node-toggle {
flex: 0 0 auto;
width: 24px;
height: 24px;
padding: 0;
border: 0;
border-radius: 7px;
color: var(--muted);
background: transparent;
cursor: pointer;
font-size: 12px;
line-height: 1;
}
.history-node-toggle:hover {
color: var(--ink);
background: #ecebe5;
}
.history-node-main {
display: grid;
flex: 1 1 auto;
min-width: 0;
grid-template-columns: auto minmax(0, 1fr);
align-items: center;
gap: 10px;
padding: 2px;
border: 0;
border-radius: 8px;
color: inherit;
background: transparent;
cursor: pointer;
text-align: left;
font: inherit;
}
.history-node-main:hover {
background: rgba(108, 92, 231, 0.07);
}
.history-node-thumb {
width: 52px;
height: 52px;
object-fit: cover;
border-radius: 8px;
background: #ecece6;
}
.history-item-meta strong {
display: block;
.history-node-meta {
display: grid;
min-width: 0;
gap: 2px;
}
.history-node-title {
font-size: 12.5px;
line-height: 1.3;
font-weight: 750;
color: var(--ink);
line-height: 1.3;
word-break: break-word;
}
.history-item-meta span {
display: block;
margin-top: 2px;
font-size: 11px;
color: var(--muted);
}
.history-item-badge {
align-self: flex-start;
font-size: 10px;
font-weight: 600;
letter-spacing: 0.02em;
text-transform: uppercase;
.history-node-badge {
justify-self: start;
padding: 2px 7px;
border-radius: 999px;
background: var(--accent-soft);
color: var(--accent-dark);
font-size: 10px;
font-weight: 600;
letter-spacing: 0.02em;
text-transform: uppercase;
}
.history-node-date {
font-size: 11px;
color: var(--muted);
}
.history-node-prompt {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
font-size: 11.5px;
color: var(--muted);
line-height: 1.45;
}
.history-node-children {
display: grid;
gap: 6px;
}
.history-node-actions {
position: absolute;
top: 50%;
right: 8px;
transform: translateY(-50%);
display: flex;
gap: 6px;
opacity: 0;
transition: opacity 0.15s ease;
}
.history-node:hover .history-node-actions,
.history-node:focus-within .history-node-actions {
opacity: 1;
}
.history-node-action {
padding: 5px 9px;
border: 1px solid var(--line);
border-radius: 999px;
color: var(--muted);
background: var(--panel);
cursor: pointer;
font-size: 10.5px;
font-weight: 700;
text-decoration: none;
transition:
border-color 0.15s ease,
color 0.15s ease,
background 0.15s ease;
}
.history-node-action:hover {
border-color: var(--accent);
color: var(--accent-dark);
background: var(--accent-soft);
}
.history-node-action.history-delete {
color: var(--danger);
}
.history-node-action.history-delete:hover {
border-color: var(--danger);
color: var(--danger);
background: rgba(184, 67, 67, 0.07);
}
.history-empty {
@@ -989,6 +1112,173 @@ textarea:disabled {
color: var(--muted);
}
/* -- Референс ---------------------------------------------------- */
.reference-actions {
display: flex;
min-width: 0;
flex-wrap: wrap;
align-items: center;
gap: 8px;
}
.button-small {
min-height: 36px;
padding: 8px 12px;
border: 1px solid var(--line);
border-radius: 12px;
color: var(--ink);
background: var(--panel);
cursor: pointer;
font-size: 12px;
font-weight: 720;
transition:
border-color 150ms ease,
background 150ms ease,
transform 150ms ease,
opacity 150ms ease;
}
.button-small:not(:disabled):hover {
border-color: var(--accent);
background: var(--accent-soft);
transform: translateY(-1px);
}
.button-small:disabled {
cursor: not-allowed;
opacity: 0.43;
}
.reference-select {
min-height: 36px;
min-width: 0;
max-width: 100%;
padding: 8px 10px;
border: 1px solid var(--line);
border-radius: 12px;
color: var(--ink);
background: var(--panel);
font-size: 12px;
outline: none;
transition:
border-color 160ms ease,
box-shadow 160ms ease;
}
.reference-select:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}
.reference-select:disabled {
cursor: not-allowed;
opacity: 0.43;
}
.reference-preview {
margin-top: 10px;
padding: 8px;
border: 1px solid var(--line);
border-radius: var(--radius-small);
background: var(--paper);
}
.reference-canvas {
display: block;
width: 100%;
max-height: 260px;
object-fit: contain;
border-radius: 8px;
background: #ecece6;
cursor: crosshair;
touch-action: none;
}
.reference-preview-foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin-top: 8px;
color: var(--muted);
font-size: 11px;
line-height: 1.4;
}
.reference-note {
margin: 0;
color: var(--muted);
font-size: 11px;
line-height: 1.4;
}
/* -- Подсказки промптов ------------------------------------------- */
.button-suggest {
width: 100%;
}
.suggest-panel {
margin-top: 10px;
padding: 12px;
border: 1px solid var(--line);
border-radius: var(--radius-small);
background: rgba(251, 250, 246, 0.7);
}
.suggest-section-title {
margin: 0 0 8px;
color: var(--muted);
font-size: 11px;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.suggest-chips {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.suggest-chip {
max-width: 100%;
padding: 6px 12px;
border: 1px solid var(--line);
border-radius: 999px;
color: var(--ink);
background: var(--panel);
cursor: pointer;
font-size: 11.5px;
line-height: 1.4;
text-align: left;
transition:
border-color 150ms ease,
background 150ms ease,
color 150ms ease;
}
.suggest-chip:hover {
border-color: var(--accent);
color: var(--accent-dark);
background: var(--accent-soft);
}
.suggest-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin: 10px 0;
}
.suggest-status {
color: var(--muted);
font-size: 12px;
line-height: 1.4;
}
/* -- Авторизация -------------------------------------------------- */
.topbar-right {