mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-12-01 08:59:32 +01:00
feat(local-model): one button and a chooser window replace the welcome card
The read-only card is gone. The welcome screen has one button, "Run a local
model" ("Local model" once one is installed), and App Settings > Models has
one row; both open the same window.
The window follows `install.state`: choose a model (a radio group, with a
memory bar filled to what the selected model needs), confirm the sizes and
the folder, watch the download and the steps, and end on "Start a session".
Paused, failed, installed (running or stopped), Remove and "no model fits"
are screens of the same window. It polls the GET once a second while open.
Every dynamic string goes in through textContent, labels and sentences come
from the payload, no CLI id is compared, and every new string has a zh-CN
entry.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
3af94df4f6
commit
84d5c691ff
13 files changed
+4543
-1264
No files matched your search
+92
-17
@@ -1857,15 +1857,27 @@ html.mobile-init .file-browser-panel {
|
||||
margin-top: 0.75rem;
|
||||
}
|
||||
|
||||
/* Model on this Mac (local-model-ui.js). Only reached with the phone overview
|
||||
switched off. The card has no fixed width and every line in it wraps, so
|
||||
the narrow column only takes some of the spacing back. */
|
||||
.local-model-card {
|
||||
margin-top: 0.6rem;
|
||||
/* Run a model on this Mac (local-model-ui.js). The welcome button is only
|
||||
reached with the phone overview switched off; it takes the chips' finger
|
||||
size from `.welcome-chip` above. The window is full-screen like every
|
||||
modal here: its own width rule in styles.css is more specific than the
|
||||
full-screen `.modal-content` rule above, so the size is restated. */
|
||||
.modal-content.local-model-window {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.local-model-box {
|
||||
padding: 0.5rem 0.55rem;
|
||||
.local-model-window > .lm-body {
|
||||
flex: 1;
|
||||
padding: 1rem 1rem calc(1rem + var(--safe-area-bottom));
|
||||
}
|
||||
|
||||
/* The window fills the screen, so its actions sit at the bottom, under the thumb. */
|
||||
.lm-body > .lm-foot,
|
||||
.lm-body > .lm-remove {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
/* Ralph wizard responsive */
|
||||
@@ -3980,16 +3992,6 @@ html:is([data-skin="paper-gray"], [data-skin="solarized-light"], [data-skin="cat
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
/* Model on this Mac (local-model-ui.js): its row follows the label size above. */
|
||||
#localModelSettings .local-model-headline,
|
||||
#localModelSettings .local-model-name {
|
||||
font-size: 0.84rem;
|
||||
}
|
||||
|
||||
#localModelSettings .local-model-alt .local-model-name {
|
||||
font-size: 0.78rem;
|
||||
}
|
||||
|
||||
/* Fields go full width under their label instead of fighting for the row */
|
||||
:is(#appSettingsModal, #sessionOptionsModal, #createCaseModal) .set-row.has-field {
|
||||
flex-direction: column;
|
||||
@@ -4282,3 +4284,76 @@ html[data-session-list="sidebar"] .session-sidebar .session-tab .tab-close {
|
||||
touch-action: pan-x pan-y;
|
||||
}
|
||||
}
|
||||
|
||||
/* Run a model on this Mac (local-model-ui.js), under 560px: each model row
|
||||
becomes two lines (name and tag, then speed and download size), the bar
|
||||
stays full width and the buttons go full width under the foot's sentence. */
|
||||
@media (max-width: 559px) {
|
||||
.lm-list {
|
||||
grid-template-columns: auto minmax(0, 1fr) auto;
|
||||
column-gap: 0.7rem;
|
||||
}
|
||||
|
||||
.lm-caption-speed,
|
||||
.lm-caption-size {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.lm-model {
|
||||
row-gap: 0.1rem;
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.lm-radio {
|
||||
grid-row: 1;
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
.lm-model-name {
|
||||
grid-row: 1;
|
||||
grid-column: 2;
|
||||
}
|
||||
|
||||
.lm-model-tag {
|
||||
grid-row: 1;
|
||||
grid-column: 3;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.lm-model-speed {
|
||||
grid-row: 2;
|
||||
grid-column: 2;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.lm-model-size {
|
||||
grid-row: 2;
|
||||
grid-column: 3;
|
||||
}
|
||||
|
||||
.lm-model-static .lm-model-name {
|
||||
grid-column: 1 / span 2;
|
||||
}
|
||||
|
||||
.lm-model-static .lm-model-speed {
|
||||
grid-column: 1 / span 2;
|
||||
}
|
||||
|
||||
.lm-foot {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 0.8rem;
|
||||
}
|
||||
|
||||
/* The main action on top, the way back under it. */
|
||||
.lm-buttons {
|
||||
flex-direction: column-reverse;
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.local-model-window .wt-btn.lm-btn {
|
||||
min-height: 44px;
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user