@corbet-labs/ccht 0.2.5 → 0.2.6
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
|
@@ -216,6 +216,7 @@ tools, usage updates, plans, permission requests, and errors).
|
|
|
216
216
|
Props: `kicker`, `title`, composer `composerId/Label/Placeholder`,
|
|
217
217
|
`sendLabel`, welcome `welcomeTitle/Body/Example`, `messages`,
|
|
218
218
|
`draft` (bindable), `history` + `activeHistoryId` + `showHistoryPicker`,
|
|
219
|
+
`newConversationLabel?` (default `'New conversation'`),
|
|
219
220
|
`sending`, `canSend`, `controlsLoading`, `composerDisabled`,
|
|
220
221
|
`onSend(text)`, `onStop?`, `onSelectHistory?(id)` (`''` means new),
|
|
221
222
|
`onCopy?(id, content)`, `onShowActivity?(msg)`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corbet-labs/ccht",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
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": "54b834578efaac423f35f15347710e2f0a1cd57a"
|
|
61
61
|
}
|
package/source/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.6 - 2026-09-19
|
|
4
|
+
|
|
5
|
+
- `ChatDock.svelte`: new-conversation voice is product-owned via the
|
|
6
|
+
`newConversationLabel` prop (default `'New conversation'`).
|
|
7
|
+
|
|
3
8
|
## 0.2.5 - 2026-09-19
|
|
4
9
|
|
|
5
10
|
- No Rust changes. `StepConfig` steps carry `refreshable`: the Refresh row
|
package/source/Cargo.lock
CHANGED
package/source/Cargo.toml
CHANGED
|
@@ -210,4 +210,15 @@ describe('history', () => {
|
|
|
210
210
|
test('no picker without the flag', () => {
|
|
211
211
|
expect(openChat().queryByLabelText('Conversation')).toBeNull();
|
|
212
212
|
});
|
|
213
|
+
|
|
214
|
+
test('new-conversation voice is product-owned', () => {
|
|
215
|
+
const view = openChat({
|
|
216
|
+
newConversationLabel: 'New chat',
|
|
217
|
+
onSelectHistory: () => {},
|
|
218
|
+
messages: [{ id: 'u1', role: 'user', content: 'hi' }],
|
|
219
|
+
showHistoryPicker: true,
|
|
220
|
+
});
|
|
221
|
+
expect(view.getByRole('button', { name: 'New chat' })).toBeTruthy();
|
|
222
|
+
expect(view.getByRole('option', { name: 'New chat' })).toBeTruthy();
|
|
223
|
+
});
|
|
213
224
|
});
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
welcomeTitle,
|
|
57
57
|
welcomeBody,
|
|
58
58
|
welcomeExample,
|
|
59
|
+
newConversationLabel = 'New conversation',
|
|
59
60
|
messages,
|
|
60
61
|
draft = $bindable(''),
|
|
61
62
|
history = [],
|
|
@@ -85,6 +86,7 @@
|
|
|
85
86
|
welcomeTitle: string;
|
|
86
87
|
welcomeBody: string;
|
|
87
88
|
welcomeExample: string;
|
|
89
|
+
newConversationLabel?: string;
|
|
88
90
|
messages: ChatDockMessage[];
|
|
89
91
|
draft: string;
|
|
90
92
|
history?: ChatHistoryItem[];
|
|
@@ -179,7 +181,7 @@
|
|
|
179
181
|
<div class="ccht-chat-actions">
|
|
180
182
|
{#if messages.length > 0 && onSelectHistory}
|
|
181
183
|
<button type="button" class="ccht-chat-new-chat" onclick={() => invoke(() => onSelectHistory(''))}>
|
|
182
|
-
|
|
184
|
+
{newConversationLabel}
|
|
183
185
|
</button>
|
|
184
186
|
{/if}
|
|
185
187
|
{#if headerExtra}{@render headerExtra()}{/if}
|
|
@@ -198,7 +200,7 @@
|
|
|
198
200
|
value={activeHistoryId ?? ''}
|
|
199
201
|
onchange={(event) => invoke(() => onSelectHistory?.(event.currentTarget.value))}
|
|
200
202
|
>
|
|
201
|
-
<option value="">
|
|
203
|
+
<option value="">{newConversationLabel}</option>
|
|
202
204
|
{#each history as item (item.id)}
|
|
203
205
|
<option value={item.id}>{historyTitle(item)}</option>
|
|
204
206
|
{/each}
|
package/wasm/ccht_bg.wasm
CHANGED
|
Binary file
|