@corbet-labs/ccht 0.2.4 → 0.2.5
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/README.md
CHANGED
|
@@ -249,7 +249,8 @@ Generic per-step backend/model/options form (content only; the app wraps
|
|
|
249
249
|
it in `Dock`). `StepData` carries one step's `id`, `label`,
|
|
250
250
|
`backendValue`, `backendOptions`, `backendPlaceholder`, `accountConnected`,
|
|
251
251
|
`accountBusy`, `configurationError?`, `modelValue`, `modelOptions`,
|
|
252
|
-
`
|
|
252
|
+
`refreshable` (whether the step owns a Refresh row), `extraOptions`
|
|
253
|
+
(`SessionConfigOption[]`), and `extraValues`.
|
|
253
254
|
|
|
254
255
|
Props: `steps: StepData[]`, `refreshing`, `onSelectBackend(id, value)`,
|
|
255
256
|
`onSelectModel(id, value)`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corbet-labs/ccht",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Reusable conversations for your applications, powered by the shared Rust/Wasm model",
|
|
5
5
|
"license": "LGPL-3.0-only WITH LGPL-3.0-linking-exception",
|
|
6
6
|
"type": "module",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"jsdom": "^26",
|
|
58
58
|
"vitest": "^3"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "3ca5914db5c7eaefa694b7e5f0da1296f8159699"
|
|
61
61
|
}
|
package/source/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.5 - 2026-09-19
|
|
4
|
+
|
|
5
|
+
- No Rust changes. `StepConfig` steps carry `refreshable`: the Refresh row
|
|
6
|
+
renders only for steps that own refreshable controls.
|
|
7
|
+
|
|
3
8
|
## 0.2.4 - 2026-09-19
|
|
4
9
|
|
|
5
10
|
- No Rust changes; the Rust API and behavior are unchanged from 0.2.3.
|
package/source/Cargo.lock
CHANGED
package/source/Cargo.toml
CHANGED
|
@@ -23,6 +23,7 @@ function step(overrides: Partial<StepData> = {}): StepData {
|
|
|
23
23
|
configurationError: null,
|
|
24
24
|
modelValue: 'qwen',
|
|
25
25
|
modelOptions: [{ value: 'qwen', name: 'Qwen' }],
|
|
26
|
+
refreshable: true,
|
|
26
27
|
extraOptions: [],
|
|
27
28
|
extraValues: {},
|
|
28
29
|
...overrides,
|
|
@@ -178,8 +179,13 @@ describe('refresh and errors', () => {
|
|
|
178
179
|
expect(getByText('stale options')).toBeTruthy();
|
|
179
180
|
});
|
|
180
181
|
|
|
181
|
-
test('no refresh row while disconnected', () => {
|
|
182
|
-
const { queryByRole } = openSteps([step({ accountConnected: false })]);
|
|
182
|
+
test('no refresh row while disconnected or not refreshable', () => {
|
|
183
|
+
const { queryByRole, rerender } = openSteps([step({ accountConnected: false })]);
|
|
183
184
|
expect(queryByRole('button', { name: 'Refresh models' })).toBeNull();
|
|
184
185
|
});
|
|
186
|
+
|
|
187
|
+
test('non-refreshable steps omit refresh even when connected', () => {
|
|
188
|
+
const { queryByRole } = openSteps([step({ refreshable: false })]);
|
|
189
|
+
expect(queryByRole('button', { name: /Refresh models|Loading/ })).toBeNull();
|
|
190
|
+
});
|
|
185
191
|
});
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
configurationError?: string | null;
|
|
28
28
|
modelValue: string;
|
|
29
29
|
modelOptions: StepModelOption[];
|
|
30
|
+
refreshable: boolean;
|
|
30
31
|
extraOptions: SessionConfigOption[];
|
|
31
32
|
extraValues: Record<string, string | boolean>;
|
|
32
33
|
}
|
|
@@ -168,7 +169,7 @@
|
|
|
168
169
|
/>
|
|
169
170
|
{/if}
|
|
170
171
|
{/each}
|
|
171
|
-
{#if step.accountConnected}
|
|
172
|
+
{#if step.accountConnected && step.refreshable}
|
|
172
173
|
<button
|
|
173
174
|
type="button"
|
|
174
175
|
class="ccht-step-refresh"
|
package/wasm/ccht_bg.wasm
CHANGED
|
Binary file
|