Home chat UI, split out of #27 (frontend only)
The chat and the model selector from #27, without the model gateway. The gateway (routers/models.py, integrations/lmstudio.py, 0010_model_choice, MODEL_GATEWAY_*) moves to its own PR, re-plugged onto model_provider / model_provider_policy. Until that lands, GET /models answers 404, so Home stays the plain search and "Modele AI" says the model server is not connected. Review fixes from #27: - refLinks: doc, files and api links come from other modules' results and are now kept only when they resolve to this origin (javascript:, data: and foreign hosts are dropped). url keeps safeUrl(). - Models page: the per-module select uses addEventListener with the slug in a data attribute instead of an inline onchange. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016uwxqGaGuAXsSgUwG1zdEj
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
37d29b3277
commit
b3539b8c22
@@ -103,6 +103,58 @@
|
||||
border: 0; background: var(--at-primary); color: var(--at-primary-fg); cursor: pointer;
|
||||
}
|
||||
.home-send:hover { background: var(--at-primary-hover); }
|
||||
.home-scope {
|
||||
display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: -14px 14px 0;
|
||||
padding: 22px 14px 10px; border-radius: 0 0 20px 20px; background: var(--at-surface-hover);
|
||||
font-size: 12px; color: var(--at-text-secondary);
|
||||
}
|
||||
.home-scope-mod { display: inline-flex; align-items: center; gap: 6px; color: var(--at-text); }
|
||||
/* The model picker sits at the end of the scope bar; the answer is a quiet card, plain text only. */
|
||||
.home-model { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
|
||||
.home-model select { min-height: 32px; padding: 2px 8px; font-size: 12px; max-width: 260px; }
|
||||
.home-answer {
|
||||
margin-top: 20px; padding: 14px 16px; border: 1px solid var(--at-border); border-radius: var(--at-radius-2xl);
|
||||
background: var(--at-surface);
|
||||
}
|
||||
.ha-head {
|
||||
display: flex; align-items: center; justify-content: space-between; gap: 12px;
|
||||
font-size: 12px; color: var(--at-text-secondary);
|
||||
}
|
||||
.ha-head > span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
||||
.ha-turns { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
|
||||
.ha-ref { font-size: 12px; vertical-align: super; text-decoration: none; margin-left: 1px; }
|
||||
.ha-sources { white-space: normal; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--at-border); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
|
||||
.ha-sources-h { font-weight: 600; }
|
||||
.ha-source blockquote { white-space: pre-line; margin: 4px 0 0; padding-left: 10px; border-left: 2px solid var(--at-border); color: var(--at-text-muted); font-size: 12px; overflow-wrap: anywhere; }
|
||||
.ha-turn { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 14px; color: var(--at-text); }
|
||||
.ha-turn.user { align-self: flex-end; max-width: 85%; padding: 8px 12px; border-radius: 16px; background: var(--at-surface-hover); }
|
||||
.ha-status { margin-top: 4px; }
|
||||
.ha-quote { font-size: 12px; overflow-wrap: anywhere; }
|
||||
.ha-quote.ok { color: var(--at-text-muted); }
|
||||
.ha-quote.bad { color: var(--at-danger-text); }
|
||||
.ha-flag { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
|
||||
.ha-flag.weak { color: var(--at-warning-text); }
|
||||
.ha-flag.bad { color: var(--at-danger-text); }
|
||||
.ha-table { white-space: normal; overflow-x: auto; margin-top: 10px; }
|
||||
.ha-table table { border-collapse: collapse; font-size: 13px; width: 100%; }
|
||||
.ha-table th, .ha-table td { text-align: left; vertical-align: top; padding: 4px 8px; border-bottom: 1px solid var(--at-border); }
|
||||
.ha-table th { color: var(--at-text-muted); font-weight: 500; }
|
||||
.ha-table th, .ha-table td { overflow-wrap: normal; }
|
||||
.ha-table td:nth-child(2) { min-width: 12em; }
|
||||
.ha-table td:last-child { min-width: 16em; }
|
||||
.ha-table td:nth-child(1), .ha-table td:nth-child(3), .ha-table td:nth-child(4), .ha-table td:nth-child(5) { white-space: nowrap; }
|
||||
.ha-trace { margin-top: 8px; white-space: normal; overflow-wrap: anywhere; }
|
||||
.ha-trace summary { cursor: pointer; }
|
||||
/* A conversation open: the greeting and the figures step aside, the history reads downwards and the composer
|
||||
stays docked at the bottom of the window (the window scrolls, not .content, so sticky holds). Opaque, or
|
||||
the history shows through the scope bar's negative margin. */
|
||||
.home-new { display: none; }
|
||||
.home.chatting .home-mark, .home.chatting .home-title, .home.chatting .home-sub,
|
||||
.home.chatting .home-stats, .home.chatting .home-admin { display: none; }
|
||||
.home.chatting .home-answer { margin-top: 0; }
|
||||
.home.chatting .home-box { position: sticky; bottom: 0; z-index: 2; margin-top: 16px; padding: 12px 0 16px; background: var(--at-canvas); }
|
||||
.home.chatting .home-new { display: inline-flex; }
|
||||
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
||||
.home-results { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
|
||||
.hr-group { border: 1px solid var(--at-border); border-radius: var(--at-radius-2xl); background: var(--at-surface); padding: 6px; }
|
||||
.hr-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 6px; font-size: 12px; font-weight: 550; color: var(--at-text-secondary); }
|
||||
@@ -200,6 +252,8 @@ pre.diff {
|
||||
.home-label { margin-top: 28px; }
|
||||
.home-box { margin-top: 22px; }
|
||||
.home-input { border-radius: 20px; padding-left: 14px; }
|
||||
.home-scope { margin-inline: 8px; }
|
||||
.home.chatting .home-box { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
|
||||
.hr-kind { display: none; }
|
||||
|
||||
.unit { padding-left: calc(var(--depth, 0) * 12px); }
|
||||
|
||||
+1920
-6
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user