Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3368,21 +3368,18 @@ function ChannelsView({
<div className="channel-form-wide channel-model-field">
<div className="field-label-row">
<span>模型</span>
<small>可手动填写,或从上游拉取后多选</small>
</div>
<textarea value={models} onChange={(event) => setModels(event.target.value)} placeholder="多个模型用逗号分隔,或点『获取模型』从上游拉取" />
<div className="channel-model-actions">
<button type="button" className="secondary-button compact-button" onClick={() => {
<button type="button" className="model-pull-button" onClick={() => {
if (provider !== "codex" && !baseUrl.trim()) {
setMessage("请先填写 Base URL 再获取模型");
return;
}
setMessage("");
setPickerOpen(true);
}}>
获取模型
从上游获取模型
</button>
</div>
<textarea value={models} onChange={(event) => setModels(event.target.value)} placeholder="多个模型用逗号分隔,或点上方『从上游获取模型』拉取后多选" />
</div>
</div>
<div className="channel-card-actions">
Expand Down
23 changes: 23 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2044,6 +2044,29 @@ button.table-row:hover {
font-weight: 700;
}

/* Inline "pull models" action that sits on the model field's label row. */
.field-label-row .model-pull-button {
min-height: 28px;
padding: 0 12px;
color: var(--blue);
background: color-mix(in srgb, var(--blue) 10%, transparent);
border: 1px solid color-mix(in srgb, var(--blue) 26%, transparent);
border-radius: 999px;
font-size: 12.5px;
font-weight: 650;
white-space: nowrap;
cursor: pointer;
transition: background 120ms ease, transform 100ms ease;
}

.field-label-row .model-pull-button:hover {
background: color-mix(in srgb, var(--blue) 16%, transparent);
}

.field-label-row .model-pull-button:active {
transform: scale(0.97);
}

.channel-form-wide {
grid-column: span 2;
}
Expand Down
Loading