@smart-cloud/ai-kit-ui 1.3.13 → 1.3.15
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/dist/index.cjs +9 -9
- package/dist/index.js +9 -9
- package/package.json +2 -2
- package/src/ai-feature/AiFeature.tsx +3 -3
- package/src/doc-search/DocSearch.tsx +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smart-cloud/ai-kit-ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@emotion/cache": "^11.14.0",
|
|
21
21
|
"@emotion/react": "^11.14.0",
|
|
22
22
|
"@mantine/colors-generator": "^8.3.15",
|
|
23
|
-
"@smart-cloud/ai-kit-core": "^1.3.
|
|
23
|
+
"@smart-cloud/ai-kit-core": "^1.3.7",
|
|
24
24
|
"@smart-cloud/wpsuite-core": "^2.2.6",
|
|
25
25
|
"@tabler/icons-react": "^3.36.1",
|
|
26
26
|
"chroma-js": "^3.2.0",
|
|
@@ -295,7 +295,7 @@ const AiFeatureBase: FC<AiFeatureProps & AiKitShellInjectedProps> = (props) => {
|
|
|
295
295
|
autoRun = true,
|
|
296
296
|
editable = true,
|
|
297
297
|
onDeviceTimeout,
|
|
298
|
-
variation =
|
|
298
|
+
variation = "default",
|
|
299
299
|
title,
|
|
300
300
|
showOpenButton = false,
|
|
301
301
|
showOpenButtonTitle = true,
|
|
@@ -303,8 +303,8 @@ const AiFeatureBase: FC<AiFeatureProps & AiKitShellInjectedProps> = (props) => {
|
|
|
303
303
|
openButtonTitle,
|
|
304
304
|
openButtonIcon,
|
|
305
305
|
showRegenerateOnBackendButton = true,
|
|
306
|
-
acceptButtonTitle =
|
|
307
|
-
optionsDisplay =
|
|
306
|
+
acceptButtonTitle = "Accept",
|
|
307
|
+
optionsDisplay = "collapse",
|
|
308
308
|
mode,
|
|
309
309
|
context,
|
|
310
310
|
modeOverride,
|
|
@@ -422,8 +422,6 @@ const DocSearchBase: FC<Props> = (props) => {
|
|
|
422
422
|
setQuery(q);
|
|
423
423
|
}
|
|
424
424
|
|
|
425
|
-
console.log("Starting search with query:", q, "and audio:", audioBlob);
|
|
426
|
-
|
|
427
425
|
// Check if we can reuse cached audio (same blob within TTL)
|
|
428
426
|
const now = Date.now();
|
|
429
427
|
const isSameAudio =
|
|
@@ -437,16 +435,6 @@ const DocSearchBase: FC<Props> = (props) => {
|
|
|
437
435
|
blob: audioBlob,
|
|
438
436
|
uploadTimestamp: now,
|
|
439
437
|
};
|
|
440
|
-
console.log("Audio cache updated for new recording");
|
|
441
|
-
} else if (isSameAudio) {
|
|
442
|
-
console.log(
|
|
443
|
-
"Reusing cached audio (no re-upload needed within",
|
|
444
|
-
Math.round(
|
|
445
|
-
(AUDIO_CACHE_TTL - (now - audioCacheRef.current!.uploadTimestamp)) /
|
|
446
|
-
1000,
|
|
447
|
-
),
|
|
448
|
-
"seconds)",
|
|
449
|
-
);
|
|
450
438
|
}
|
|
451
439
|
|
|
452
440
|
reset();
|