@lynn123411/dsh-model-submenu 0.3.18 → 0.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,5 +1,34 @@
1
+ //#region src/account-model-facts.ts
2
+ const ACCOUNT_PROVIDER = "deepseek-account";
3
+ const ACCOUNT_FACTS_PATH = "/api/dsh-model-submenu/account-model-facts";
4
+ //#endregion
1
5
  //#region src/index.ts
2
- /** Host entry. This plugin is client-only; the browser half is `./client`. */
3
- function apply() {}
6
+ function apply(ctx) {
7
+ ctx.inject(["connection", "llm"], (scope) => {
8
+ const { connection } = scope;
9
+ return connection.fetch.register({
10
+ path: ACCOUNT_FACTS_PATH,
11
+ methods: ["GET"],
12
+ requestBody: "buffered",
13
+ async fetch(request) {
14
+ try {
15
+ const llm = scope.llm;
16
+ const models = llm.listProviders().some((provider) => provider.id === "deepseek-account") ? await llm.listModels(ACCOUNT_PROVIDER) : [];
17
+ const rows = (await Promise.allSettled(models.map(async (model) => {
18
+ const info = await llm.resolveModelInfo(ACCOUNT_PROVIDER, model.id, request.signal);
19
+ return {
20
+ id: model.id,
21
+ ...info.context === void 0 ? {} : { contextWindow: info.context.contextWindow },
22
+ ...info.inputModalities === void 0 ? {} : { inputModalities: info.inputModalities }
23
+ };
24
+ }))).flatMap((result) => result.status === "fulfilled" ? [result.value] : []);
25
+ return Response.json(rows, { headers: { "Cache-Control": "no-store" } });
26
+ } catch {
27
+ return new Response(null, { status: 503 });
28
+ }
29
+ }
30
+ });
31
+ });
32
+ }
4
33
  //#endregion
5
34
  export { apply };
package/locale/en.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Model picker",
4
- "description": "Open the quick list from the model row, or use its right arrow to browse all models. Adjust reasoning effort with a colored slider.",
4
+ "description": "Click the model row for the current model and favorites, or use its right arrow to search and star models across providers. Set the level in DSH’s Reasoning effort menu. The picker restores each model’s last-used level when you switch.",
5
5
  "detail": "docs/DETAIL.md"
6
6
  }
7
7
  }
package/locale/zh.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "模型选择",
4
- "description": "点击模型行切换当前或收藏的模型,点击右侧箭头浏览全部模型。推理等级可用带配色的滑块调整。",
4
+ "description": "点击模型行打开当前模型和收藏的快捷列表,点击右侧箭头搜索或收藏全部供应商的模型。用 DSH 的「推理等级」选择档位,切换模型时恢复它上次使用的档位。",
5
5
  "detail": "docs/DETAIL.zh.md"
6
6
  }
7
7
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lynn123411/dsh-model-submenu",
3
- "version": "0.3.18",
4
- "description": "点击模型行切换当前或收藏的模型,点击右侧箭头浏览全部模型。推理等级可用带配色的滑块调整。",
3
+ "version": "0.3.20",
4
+ "description": "点击模型行切换当前或收藏的模型,点击右侧箭头浏览全部模型。",
5
5
  "license": "MIT",
6
6
  "packageManager": "pnpm@11.7.0",
7
7
  "publishConfig": {
@@ -61,7 +61,7 @@
61
61
  "smoke": "node scripts/smoke-client.mjs",
62
62
  "assert:lib-untracked": "node scripts/assert-lib-untracked.mjs",
63
63
  "check": "pnpm typecheck && pnpm build && pnpm smoke && pnpm test && pnpm assert:lib-untracked",
64
- "test": "node scripts/test-favorites.mjs && node scripts/test-facts.mjs && node scripts/test-commit.mjs && node scripts/test-rows.mjs && node scripts/test-effort-memory.mjs && node scripts/test-slider.mjs && node scripts/test-render.mjs"
64
+ "test": "node scripts/test-favorites.mjs && node scripts/test-facts.mjs && node scripts/test-commit.mjs && node scripts/test-rows.mjs && node scripts/test-effort-memory.mjs && node scripts/test-render.mjs"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "@deepseek-ai/cordis": "^4.2.0-alpha.2",
@@ -79,6 +79,7 @@
79
79
  "@deepseek-ai/cordis-plugin-include": "1.2.0-alpha.2",
80
80
  "@deepseek-ai/dsh-api-remotes": ">=0.2.3-alpha.3",
81
81
  "@deepseek-ai/dsh-api-session-controller": ">=0.2.3-alpha.3",
82
+ "@deepseek-ai/dsh-client-connection": ">=0.2.3-alpha.3",
82
83
  "@deepseek-ai/dsh-client-locale": ">=0.2.3-alpha.3",
83
84
  "@deepseek-ai/dsh-client-ui-conversation": ">=0.2.3-alpha.3",
84
85
  "@deepseek-ai/dsh-client-ui-model-selection": ">=0.2.3-alpha.3",
@@ -86,6 +87,7 @@
86
87
  "@deepseek-ai/dsh-client-ui-renderer": ">=0.2.3-alpha.3",
87
88
  "@deepseek-ai/dsh-client-ui-settings": ">=0.2.3-alpha.3",
88
89
  "@deepseek-ai/dsh-client-ui-slots": ">=0.2.3-alpha.3",
90
+ "@deepseek-ai/dsh-llm": ">=0.2.3-alpha.3",
89
91
  "@deepseek-ai/dsh-util-text-search": ">=0.2.3-alpha.3",
90
92
  "@types/node": "^22.20.0",
91
93
  "@types/react": "~19.3.0",
@@ -0,0 +1,8 @@
1
+ export const ACCOUNT_PROVIDER = 'deepseek-account'
2
+ export const ACCOUNT_FACTS_PATH = '/api/dsh-model-submenu/account-model-facts'
3
+
4
+ export interface AccountModelFacts {
5
+ readonly id: string
6
+ readonly contextWindow?: number
7
+ readonly inputModalities?: readonly string[]
8
+ }
@@ -1,105 +1,47 @@
1
- /**
2
- * Bridge the Host's own model menu: the model cell opens a short list, its
3
- * trailing button opens the all-provider picker, and the effort cell carries
4
- * the reasoning-level slider.
5
- *
6
- * The Host owns the root menu's model and effort cells and opens a submenu for each.
7
- * While the root pane is open, this entry redirects the first cell to a detail
8
- * pane and mounts the slider in the second cell.
9
- *
10
- * Only the model menu's own direct buttons with the expected label, value and
11
- * chevron are recognized. The options slot output sits in its own wrapper,
12
- * so other plugins' rows never join that list.
13
- *
14
- * Clicking the cell's label switches to the provider default, which is a state
15
- * rather than a detent: the slider shows it as an empty track under a hollow
16
- * knob, so it never reads as the weakest level.
17
- */
18
- import { useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
1
+ import { useLayoutEffect, useRef, useState, useSyncExternalStore } from 'react';
19
2
  import { createPortal } from 'react-dom';
20
- import { IconChevronRightOutlineRegular } from '@deepseek-ai/dsh-client-ui-primitives';
3
+ import { IconChevronRightOutlineRegular, Tooltip } from '@deepseek-ai/dsh-client-ui-primitives';
21
4
  import type { ModelSelectInjected } from '@deepseek-ai/dsh-client-ui-model-selection/client';
22
5
  import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
23
- import { EffortSlider } from './EffortSlider.tsx';
24
6
  import { QUICK_MODELS_PANE } from './QuickModels.tsx';
25
7
  import type { PickerStore } from './picker-state.ts';
26
- import { effortChoices, liveReasoning, planEffortCommit, selectionOf, type Selection } from './selection.ts';
27
8
  import css from './ModelOptions.module.css';
28
9
 
29
10
  const cellLabel = ':scope > span[class*="cellLabel"]';
30
11
  const cellValue = ':scope > span[class*="cellValue"]';
31
12
  const cellChevron = ':scope > svg[class*="cellChevron"]';
32
13
 
33
- /** Match only the host-owned buttons in the root model menu. */
34
- function hostCell(surface: HTMLElement, index: number): HTMLButtonElement | null {
35
- const button = surface.querySelectorAll<HTMLButtonElement>(':scope > button[role="menuitem"]')[index];
14
+ function hostModelRow(surface: HTMLElement): HTMLButtonElement | null {
15
+ const button = surface.querySelector<HTMLButtonElement>(':scope > button[role="menuitem"]');
36
16
  if (!button?.querySelector(cellLabel) || !button.querySelector(cellValue) || !button.querySelector(cellChevron)) return null;
37
17
  return button;
38
18
  }
39
19
 
40
- /** Props of the bridge: menu state, the owning session, and the seat's injected face. */
41
20
  export type ModelMenuBridgeProps = PropsRuntime<'conversation.input.model.options'>
42
21
  & PropsLocale<'modelSubmenu'>
43
- & Pick<ModelSelectInjected, 'available' | 'directory' | 'select'>
22
+ & Pick<ModelSelectInjected, 'available' | 'directory'>
44
23
  & {
45
- /** Session whose catalog and picker this menu drives. */
46
24
  readonly sessionId: string;
47
- /** Carries the open request to the overlay view. */
48
25
  readonly picker: PickerStore;
49
26
  }
50
27
 
51
- /**
52
- * Render the marker, redirect the model cell, and mount the effort slider.
53
- * @param props - menu state, session, catalog face, and localized copy.
54
- * @returns an inert marker plus the slider while the effort cell is present.
55
- */
56
28
  export function ModelMenuBridge({
57
- sessionId, picker, locked, dismiss, openPane, reportFailure, available, directory, select, t,
29
+ sessionId, picker, locked, dismiss, openPane, available, directory, t,
58
30
  }: ModelMenuBridgeProps) {
59
31
  const markerRef = useRef<HTMLSpanElement | null>(null);
60
- const sliderRef = useRef<HTMLDivElement | null>(null);
61
- const [surface, setSurface] = useState<HTMLElement | null>(null);
62
32
  const [modelRow, setModelRow] = useState<HTMLButtonElement | null>(null);
63
33
  const [browseMount, setBrowseMount] = useState<HTMLElement | null>(null);
64
- const [effortRow, setEffortRow] = useState<HTMLElement | null>(null);
65
- const [rowLabel, setRowLabel] = useState<string | null>(null);
66
34
 
67
35
  const state = useSyncExternalStore(
68
36
  (listener) => directory.subscribe(listener),
69
37
  () => directory.getSnapshot(),
70
38
  );
71
- const current = state.current;
72
- const reasoning = liveReasoning(state);
73
- const levels = useMemo(() => effortChoices(reasoning), [reasoning]);
74
- const declared = levels.findIndex((level) => level.effort === reasoning?.defaultEffort);
75
- const chosen = current?.reasoningEffort === undefined
76
- ? -1
77
- : levels.findIndex((level) => level.effort === current.reasoningEffort);
78
- // The provider default is a state, not a detent: it is in force whenever the
79
- // session carries no explicit level.
80
- const defaultActive = current !== null && current.reasoningEffort === undefined;
81
- const currentIndex = chosen >= 0 ? chosen : declared >= 0 ? declared : 0;
82
- const defaultIndex = declared >= 0 ? declared : 0;
83
39
  const busy = locked || state.pending !== null;
84
- const canDefault = !busy && !defaultActive;
85
40
  const showQuickModels = available && modelRow !== null && browseMount !== null;
86
- // One detent is not a choice: leave the Host's row exactly as it is.
87
- const showSlider = available && levels.length >= 2 && effortRow !== null;
88
-
89
- // The Host rebuilds its cells on every render, so the surface and the effort
90
- // cell are re-read after each one; the identity guards keep that from looping.
91
- useLayoutEffect(() => {
92
- const nextSurface = markerRef.current?.closest<HTMLElement>('[data-model-menu][role="menu"]') ?? null;
93
- if (nextSurface !== surface) setSurface(nextSurface);
94
- const nextRow = nextSurface === null ? null : hostCell(nextSurface, 1);
95
- if (nextRow !== effortRow) setEffortRow(nextRow);
96
- const nextLabel = nextRow?.querySelector(cellLabel)?.textContent?.trim() ?? '';
97
- if (nextLabel !== (rowLabel ?? '')) setRowLabel(nextLabel);
98
- });
99
41
 
100
42
  useLayoutEffect(() => {
101
43
  const menu = markerRef.current?.closest<HTMLElement>('[data-model-menu][role="menu"]');
102
- const row = available && menu ? hostCell(menu, 0) : null;
44
+ const row = available && menu ? hostModelRow(menu) : null;
103
45
  if (row === null) {
104
46
  setModelRow(null);
105
47
  setBrowseMount(null);
@@ -108,7 +50,6 @@ export function ModelMenuBridge({
108
50
  const mount = row.ownerDocument.createElement('span');
109
51
  mount.style.display = 'contents';
110
52
  row.after(mount);
111
- // Set this before the Host's return-focus effect runs on a pane switch.
112
53
  const previousPane = row.dataset.modelMenuPane;
113
54
  const previousPopup = row.getAttribute('aria-haspopup');
114
55
  row.dataset.modelMenuPane = QUICK_MODELS_PANE;
@@ -126,132 +67,39 @@ export function ModelMenuBridge({
126
67
  };
127
68
  }, [available]);
128
69
 
129
- const submit = (selection: Selection | null): void => {
130
- if (selection === null || busy || directory.getSnapshot().pending !== null) return;
131
- void select(selection).then((result) => {
132
- if (result === undefined || result.ok) return;
133
- reportFailure(result.error.code === 'session/writer-held'
134
- ? t('error.sessionInUse')
135
- : t('error.action', { message: `${result.error.code}: ${result.error.message}` }));
136
- });
137
- };
138
- const commit = (index: number): void => {
139
- const live = selectionOf(state);
140
- const level = levels[index];
141
- if (live === null || level === undefined) return;
142
- submit(planEffortCommit(live, level.effort));
143
- };
144
- const commitDefault = (): void => {
145
- const live = selectionOf(state);
146
- if (live === null) return;
147
- submit(planEffortCommit(live, undefined));
148
- };
149
-
150
- // The listener reads current controls without reinstalling on every render.
151
- const openQuickModels = () => openPane({ key: QUICK_MODELS_PANE, title: t('picker.quick') });
152
- const latest = useRef({ modelRow, showQuickModels, openQuickModels, busy, showSlider, effortRow, canDefault, commitDefault });
153
70
  useLayoutEffect(() => {
154
- latest.current = { modelRow, showQuickModels, openQuickModels, busy, showSlider, effortRow, canDefault, commitDefault };
155
- });
156
-
157
- useLayoutEffect(() => {
158
- if (surface === null) return;
71
+ if (!showQuickModels) return;
159
72
  const redirect = (event: MouseEvent): void => {
160
- const target = event.target;
161
- const request = latest.current;
162
- if (!(target instanceof Node) || event.defaultPrevented) return;
163
- if (request.showQuickModels && request.modelRow?.contains(target)) {
164
- // Capture on the surface runs before the React root's bubble listener, so
165
- // stopping here keeps the cell's own drill handler from ever running.
166
- event.preventDefault();
167
- event.stopPropagation();
168
- if (!request.busy) request.openQuickModels();
169
- return;
170
- }
171
- const row = request.effortRow;
172
- if (row === null || !surface.contains(row) || !row.contains(target) || !request.showSlider) return;
73
+ if (event.defaultPrevented) return;
173
74
  event.preventDefault();
174
75
  event.stopPropagation();
175
- if (request.busy || sliderRef.current?.contains(target)) return;
176
- if (request.canDefault && row.querySelector(cellLabel)?.contains(target)) {
177
- request.commitDefault();
178
- return;
179
- }
180
- sliderRef.current?.querySelector<HTMLElement>('[role="slider"]')?.focus();
181
- };
182
- surface.addEventListener('click', redirect, true);
183
- return () => {
184
- surface.removeEventListener('click', redirect, true);
76
+ if (!busy) openPane({ key: QUICK_MODELS_PANE, title: t('picker.quick') });
185
77
  };
186
- }, [surface]);
187
-
188
- // The slider takes the whole slack beside the label: the value and the
189
- // chevron go, because the level is already written under the composer and the
190
- // row no longer drills anywhere. Every write is recorded and put back.
191
- useLayoutEffect(() => {
192
- if (effortRow === null || !showSlider) return;
193
- const label = effortRow.querySelector<HTMLElement>(cellLabel);
194
- const value = effortRow.querySelector<HTMLElement>(cellValue);
195
- const chevron = effortRow.querySelector<SVGElement>(cellChevron);
196
- const saved = {
197
- value: value?.style.display ?? '',
198
- chevron: chevron?.style.display ?? '',
199
- cursor: label?.style.cursor ?? '',
200
- title: label?.getAttribute('title') ?? null,
201
- };
202
- if (value !== null) value.style.display = 'none';
203
- if (chevron !== null) chevron.style.display = 'none';
204
- if (label !== null && canDefault) {
205
- label.style.cursor = 'pointer';
206
- label.title = t('effort.useDefault');
207
- }
208
- return () => {
209
- if (value !== null) value.style.display = saved.value;
210
- if (chevron !== null) chevron.style.display = saved.chevron;
211
- if (label !== null) {
212
- label.style.cursor = saved.cursor;
213
- if (saved.title === null) label.removeAttribute('title');
214
- else label.title = saved.title;
215
- }
216
- };
217
- }, [effortRow, showSlider, canDefault, t]);
78
+ modelRow.addEventListener('click', redirect, true);
79
+ return () => modelRow.removeEventListener('click', redirect, true);
80
+ }, [modelRow, showQuickModels, busy, openPane, t]);
218
81
 
219
82
  return <>
220
83
  <span ref={markerRef} hidden />
221
84
  {showQuickModels && createPortal(
222
- <button
223
- className={css.modelBrowse}
224
- type="button"
225
- role="menuitem"
226
- aria-haspopup="dialog"
227
- aria-label={t('picker.browseAll')}
228
- title={t('picker.browseAll')}
229
- disabled={busy}
230
- onClick={() => {
231
- if (directory.getSnapshot().pending !== null) return;
232
- dismiss();
233
- picker.open(sessionId);
234
- }}
235
- >
236
- <IconChevronRightOutlineRegular size={12} />
237
- </button>,
85
+ <Tooltip label={t('picker.browseAll')} delayMs={300} disabled={busy} portal>
86
+ <button
87
+ className={css.modelBrowse}
88
+ type="button"
89
+ role="menuitem"
90
+ aria-haspopup="dialog"
91
+ aria-label={t('picker.browseAll')}
92
+ disabled={busy}
93
+ onClick={() => {
94
+ if (directory.getSnapshot().pending !== null) return;
95
+ dismiss();
96
+ picker.open(sessionId);
97
+ }}
98
+ >
99
+ <IconChevronRightOutlineRegular size={12} />
100
+ </button>
101
+ </Tooltip>,
238
102
  browseMount,
239
103
  )}
240
- {showSlider && effortRow !== null && createPortal(
241
- <div ref={sliderRef} className={css.sliderCell}>
242
- <EffortSlider
243
- key={JSON.stringify([current?.provider, current?.model])}
244
- steps={levels}
245
- current={currentIndex}
246
- defaultActive={defaultActive}
247
- defaultIndex={defaultIndex}
248
- defaultLabel={t('effort.providerDefault')}
249
- busy={busy}
250
- label={rowLabel !== null && rowLabel !== '' ? rowLabel : t('effort.label')}
251
- onCommit={commit}
252
- />
253
- </div>,
254
- effortRow,
255
- )}
256
104
  </>;
257
105
  }
@@ -1,17 +1,8 @@
1
- /*
2
- * The reasoning-level slider, the picker, and the composer overlay that hosts
3
- * the picker. The dialog renders through the primitives' Modal, so this file
4
- * paints no floating fill — it only places content on the surface that
5
- * component owns.
6
- */
7
-
8
- /* The overlay entry is only a mount point for the dialog and its toast; it must
9
- * not take space inside the composer card. */
1
+
10
2
  .pickerHost {
11
3
  display: contents;
12
4
  }
13
5
 
14
- /* Align the separate dialog button over the root model row's trailing edge. */
15
6
  .modelCell.modelCell {
16
7
  anchor-name: --dsh-quick-model-row;
17
8
  padding-inline-end: 14px;
@@ -63,11 +54,12 @@
63
54
  cursor: pointer;
64
55
  }
65
56
 
66
- .quickOption:hover:not([aria-disabled='true']),
57
+ .quickOption:hover:not(:disabled, [aria-disabled='true']),
67
58
  .quickOption:focus-visible {
68
59
  background: var(--dsw-alias-interactive-bg-hover);
69
60
  }
70
61
 
62
+ .quickOption:disabled,
71
63
  .quickOption[aria-disabled='true'] {
72
64
  color: var(--dsw-alias-label-dimmed);
73
65
  cursor: default;
@@ -97,135 +89,12 @@
97
89
  flex: 0 0 14px;
98
90
  }
99
91
 
100
- /* ── the reasoning-level slider ──────────────────────────────────────────── */
101
-
102
- /* The Host's effort cell is a flex row: label, value, chevron. The slider takes
103
- * the slack between the label and the value, so the cell keeps the Host's own
104
- * metrics and the menu does not grow. */
105
- .sliderCell {
106
- display: flex;
107
- flex: 1 1 auto;
108
- align-items: center;
109
- align-self: stretch;
110
- min-width: 96px;
111
- }
112
-
113
- .slider {
114
- display: flex;
115
- flex: 1;
116
- align-items: center;
117
- height: 100%;
118
- min-width: 0;
119
- outline: none;
120
- cursor: pointer;
121
- touch-action: none;
122
- user-select: none;
123
- -webkit-user-select: none;
124
- }
125
-
126
- .slider[data-busy] {
127
- cursor: default;
128
- }
129
-
130
- /* The track is a capsule and the knob a larger circle riding on it: the knob
131
- * overhangs at both ends, so it reads as a knob rather than as the track's own
132
- * end cap. */
133
- .sliderTrack {
134
- position: relative;
135
- width: 100%;
136
- height: 16px;
137
- border-radius: 999px;
138
- corner-shape: round;
139
- background: var(--dsw-alias-border-l3);
140
- }
141
-
142
- /* The fill is the track's own shape cut at the knob: its right cap carries the
143
- * track's radius and ends under the knob, so the color runs into the knob
144
- * instead of stopping at a straight edge, and the last detent reaches the
145
- * track's end. */
146
- .sliderFill {
147
- position: absolute;
148
- top: 0;
149
- bottom: 0;
150
- left: 0;
151
- border-radius: 999px;
152
- corner-shape: round;
153
- pointer-events: none;
154
- /* A level change eases the color to its new width; the drag turns this off so
155
- * the edge stays under the pointer. */
156
- transition: width 160ms cubic-bezier(0.2, 0, 0, 1);
157
- }
158
-
159
- /* One detent per level: the dot is the only thing that says the levels are
160
- * discrete, so it stays visible on both sides of the knob. */
161
- .sliderTick {
162
- position: absolute;
163
- top: 50%;
164
- width: 4px;
165
- height: 4px;
166
- margin: -2px 0 0 -2px;
167
- border-radius: 50%;
168
- corner-shape: round;
169
- background: var(--dsw-alias-label-tertiary);
170
- pointer-events: none;
171
- }
172
-
173
- /* On the filled part the detent goes dark: white would read as one more grain
174
- * of stardust, and the dot has to stay the thing that says "levels". */
175
- .sliderTick[data-on] {
176
- background: rgba(0, 0, 0, 0.28);
177
- }
178
-
179
- .sliderKnob {
180
- position: absolute;
181
- top: 50%;
182
- /* The provider default draws a 1.5px ring; border-box keeps that ring inside
183
- * the 20px circle the travel is computed for. */
184
- box-sizing: border-box;
185
- width: 20px;
186
- height: 20px;
187
- margin: -10px 0 0 -10px;
188
- border-radius: 50%;
189
- corner-shape: round;
190
- background: var(--dsw-alias-label-primary-foreground);
191
- box-shadow: var(--dsw-elevation-soft);
192
- pointer-events: none;
193
- /* Letting go eases the knob onto the detent it settled on; the drag turns this
194
- * off so the knob sits exactly under the pointer. */
195
- transition: left 160ms cubic-bezier(0.2, 0, 0, 1);
196
- }
197
-
198
- .slider[data-dragging] .sliderKnob,
199
- .slider[data-dragging] .sliderFill {
200
- transition: none;
201
- }
202
-
203
- @media (prefers-reduced-motion: reduce) {
204
- .sliderKnob,
205
- .sliderFill {
206
- transition: none;
207
- }
208
- }
209
-
210
- /* Provider default: nothing is filled and the knob is a hollow ring, so the
211
- * state never reads as the weakest level. */
212
- .slider[data-default] .sliderKnob {
213
- background: var(--dsw-alias-bg-layer-1);
214
- border: 1.5px solid var(--dsw-alias-label-tertiary);
215
- box-shadow: none;
216
- }
217
-
218
- .slider[data-busy] .sliderKnob {
219
- opacity: 0.6;
220
- }
221
-
222
- .slider:focus-visible .sliderTrack {
223
- outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
224
- outline-offset: 3px;
92
+ .quickFooter {
93
+ margin-block-start: 4px;
94
+ padding-block-start: 4px;
95
+ border-block-start: .5px solid var(--dsw-alias-border-l2);
225
96
  }
226
97
 
227
- /* ── the picker rows ─────────────────────────────────────────────────────── */
228
-
229
98
  .rowBadge {
230
99
  flex: none;
231
100
  margin-inline-start: 6px;
@@ -239,13 +108,7 @@
239
108
 
240
109
  .rowPick {
241
110
  box-sizing: border-box;
242
- /* A slightly tighter side padding buys the name a few more characters, which
243
- * is what keeps a long provider suffix readable inside a narrow card. */
244
111
  padding-inline: 6px;
245
- /* The scroll list is a block container, so a flex item's `flex: 1` does
246
- * nothing here: the row must claim the full width or a long model name pushes
247
- * the favorite mark and the check past the card's edge, where overflow clips
248
- * them. */
249
112
  width: 100%;
250
113
  flex: 1;
251
114
  min-width: 0;
@@ -306,8 +169,6 @@
306
169
  display: grid;
307
170
  }
308
171
 
309
- /* The picker's star is a real control: outline until hover or focus, solid and
310
- * gold once favorited, and visible without hover on touch screens. */
311
172
  .starButton {
312
173
  color: var(--dsw-alias-label-tertiary);
313
174
  cursor: pointer;
@@ -347,7 +208,6 @@
347
208
  flex: none;
348
209
  }
349
210
 
350
- /* ── shared status lines ─────────────────────────────────────────────────── */
351
211
 
352
212
  .notice {
353
213
  color: var(--dsw-alias-label-tertiary);
@@ -372,31 +232,28 @@
372
232
  text-decoration: underline;
373
233
  }
374
234
 
375
- /* ── the picker dialog ───────────────────────────────────────────────────── */
376
235
 
377
- /* Keep the picker dimensions when the host Modal stylesheet loads later. */
378
236
  .pickerDialog.pickerDialog {
379
237
  width: min(680px, 100%);
380
238
  height: min(640px, 80vh);
239
+ max-height: 100%;
381
240
  gap: 0;
382
241
  padding: 0;
383
242
  }
384
243
 
385
- .pickerContent {
244
+ .pickerContent,
245
+ .pickerContent :has(.pickerBody),
246
+ .pickerBody {
386
247
  min-height: 0;
387
248
  flex: 1;
388
249
  display: flex;
389
250
  flex-direction: column;
390
251
  }
391
252
 
392
- /* Modal wraps children in a body row of its own; that row — the content
393
- * region's last child — is what has to carry the column and give the list its
394
- * remaining height, so the footer stays put while the list scrolls. */
395
- .pickerContent > :last-child {
396
- min-height: 0;
397
- flex: 1;
398
- display: flex;
399
- flex-direction: column;
253
+ .pickerSearch,
254
+ .pickerTabs,
255
+ .pickerFooter {
256
+ flex: none;
400
257
  }
401
258
 
402
259
  .pickerSearch {
@@ -407,9 +264,6 @@
407
264
  width: 100%;
408
265
  }
409
266
 
410
- /* The tabs scroll sideways rather than wrap: the dialog keeps one row of
411
- * providers however many the catalog has, so the list below starts at the same
412
- * height every time. The bar keeps its hairline and hides its scrollbar. */
413
267
  .pickerTabs {
414
268
  border-bottom: .5px solid var(--dsw-alias-border-l2);
415
269
  gap: 2px;
@@ -465,7 +319,8 @@
465
319
  border-top: .5px solid var(--dsw-alias-border-l2);
466
320
  color: var(--dsw-alias-label-tertiary);
467
321
  align-items: center;
468
- gap: 6px;
322
+ justify-content: space-between;
323
+ gap: 12px;
469
324
  padding: 10px 20px;
470
325
  font-size: 12px;
471
326
  line-height: 18px;
@@ -478,3 +333,7 @@
478
333
  display: flex;
479
334
  flex-wrap: wrap;
480
335
  }
336
+
337
+ .footerFavorites {
338
+ text-align: end;
339
+ }