@alia.onl/sdk 15.5.0 → 15.6.0
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/CHANGELOG.md +7 -0
- package/package.json +1 -2
- package/src/components/AliaComposer.tsx +47 -41
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @alia.onl/sdk
|
|
2
2
|
|
|
3
|
+
## 15.6.0
|
|
4
|
+
|
|
5
|
+
- **The composer has its loader again.** While a turn runs, the pill is wrapped in Bloom's
|
|
6
|
+
`ComposerLoader` (the light that laps its rim) with `surface={false}` and `frosted`, as the
|
|
7
|
+
composer had before it became `ComposerPill` (15.1.0) and lost it. A question Alia asks sits
|
|
8
|
+
beside the loader instead of inside the pill's `question` slot, so the light does not ring it.
|
|
9
|
+
|
|
3
10
|
## 15.5.0
|
|
4
11
|
|
|
5
12
|
- **Replies are set by Bloom's `Markdown`.** `AliaMarkdown` is a thin wrapper over
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alia.onl/sdk",
|
|
3
|
-
"version": "15.
|
|
4
|
-
"description": "Alia AI chat SDK — reusable chat UI, voice calls, dictation and streaming components for Oxy apps",
|
|
3
|
+
"version": "15.6.0",
|
|
5
4
|
"main": "src/index.ts",
|
|
6
5
|
"react-native": "src/index.ts",
|
|
7
6
|
"source": "src/index.ts",
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
type ComposerPanelAttachment,
|
|
20
20
|
type ComposerPanelPermissionOption,
|
|
21
21
|
} from '@oxy.so/bloom/composer-panel';
|
|
22
|
+
import { ComposerLoader } from '@oxy.so/bloom/composer-loader';
|
|
22
23
|
import { toast } from '@oxy.so/bloom/toast';
|
|
23
24
|
import { Text } from '@oxy.so/bloom/typography';
|
|
24
25
|
import { useAttachmentIntake } from '../hooks/useAttachmentIntake';
|
|
@@ -302,47 +303,52 @@ function AliaComposerBody<T extends AliaSuggestion>({
|
|
|
302
303
|
{labels.dictationRemaining(remainingSeconds)}
|
|
303
304
|
</Text>
|
|
304
305
|
) : null}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
306
|
+
{questions && questions.items.length > 0 ? (
|
|
307
|
+
// Beside the loader, not through the pill's `question` slot: the light traces the box it
|
|
308
|
+
// wraps, so a question inside it would be ringed too.
|
|
309
|
+
<QuestionCard
|
|
310
|
+
questions={questions.items}
|
|
311
|
+
onSubmit={questions.onSubmit}
|
|
312
|
+
onDismiss={questions.onDismiss}
|
|
313
|
+
/>
|
|
314
|
+
) : null}
|
|
315
|
+
<ComposerLoader active={busy}>
|
|
316
|
+
<ComposerPill
|
|
317
|
+
value={value}
|
|
318
|
+
onValueChange={onValueChange}
|
|
319
|
+
onSubmit={() => onSubmit()}
|
|
320
|
+
inputRef={inputRef}
|
|
321
|
+
busy={busy}
|
|
322
|
+
onStop={onStop}
|
|
323
|
+
disabled={disabled || intake.isBusy || !hasContent}
|
|
324
|
+
placeholder={placeholder ?? labels.placeholder}
|
|
325
|
+
addMenu={addMenu ?? EMPTY_ADD_MENU}
|
|
326
|
+
onAddMenuSelect={onAddMenuSelect}
|
|
327
|
+
permissions={modes ?? NO_MODES}
|
|
328
|
+
permission={mode}
|
|
329
|
+
onPermissionChange={onModeChange}
|
|
330
|
+
voiceState={
|
|
331
|
+
dictation.isTranscribing
|
|
332
|
+
? 'transcribing'
|
|
333
|
+
: dictation.isRecording || dictation.state === 'requesting-permission'
|
|
334
|
+
? 'recording'
|
|
335
|
+
: 'idle'
|
|
336
|
+
}
|
|
337
|
+
onVoiceStateChange={(next) => void handleListeningChange(next === 'recording')}
|
|
338
|
+
attachments={tiles}
|
|
339
|
+
onRemoveAttachment={removeTile}
|
|
340
|
+
// Clears the tile's error and starts its progress again: `intake.retry`
|
|
341
|
+
// puts the item back to `reading` over the same `File`.
|
|
342
|
+
onAttachmentRetry={intake.retry}
|
|
343
|
+
status={status}
|
|
344
|
+
emptyAction={emptyAction}
|
|
345
|
+
onKeyPress={onKeyPress}
|
|
346
|
+
labels={panelLabels}
|
|
347
|
+
// The loader paints the pill's surface behind its light; the controls go frosted over it.
|
|
348
|
+
surface={false}
|
|
349
|
+
frosted={busy}
|
|
350
|
+
/>
|
|
351
|
+
</ComposerLoader>
|
|
346
352
|
<ComposerDropOverlay visible={takesFiles && isDragOver} enabled={acceptsFiles} />
|
|
347
353
|
{accessory ? (
|
|
348
354
|
<View pointerEvents="box-none" className="absolute bottom-full right-0 mb-2">
|