@automattic/jetpack-ai-client 0.6.1 → 0.8.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 +21 -0
- package/build/api-fetch/index.d.ts +7 -0
- package/build/api-fetch/index.js +6 -0
- package/build/ask-question/index.d.ts +2 -2
- package/build/ask-question/index.js +1 -1
- package/build/audio-transcription/index.d.ts +12 -0
- package/build/audio-transcription/index.js +51 -0
- package/build/components/ai-control/index.d.ts +7 -6
- package/build/components/ai-control/index.js +6 -6
- package/build/components/ai-control/message.d.ts +10 -0
- package/build/components/ai-control/message.js +15 -2
- package/build/components/ai-status-indicator/index.d.ts +1 -1
- package/build/components/audio-duration-display/index.d.ts +3 -2
- package/build/components/audio-duration-display/index.js +3 -14
- package/build/components/audio-duration-display/lib/media.d.ts +13 -14
- package/build/components/audio-duration-display/lib/media.js +7 -32
- package/build/components/index.d.ts +4 -4
- package/build/components/index.js +4 -4
- package/build/data-flow/context.d.ts +9 -6
- package/build/data-flow/context.js +1 -1
- package/build/data-flow/index.d.ts +3 -3
- package/build/data-flow/index.js +3 -3
- package/build/data-flow/use-ai-context.d.ts +3 -3
- package/build/data-flow/use-ai-context.js +3 -3
- package/build/data-flow/with-ai-assistant-data.js +2 -2
- package/build/hooks/use-ai-suggestions/index.d.ts +4 -4
- package/build/hooks/use-ai-suggestions/index.js +2 -2
- package/build/hooks/use-audio-transcription/index.d.ts +28 -0
- package/build/hooks/use-audio-transcription/index.js +56 -0
- package/build/hooks/use-media-recording/index.d.ts +34 -12
- package/build/hooks/use-media-recording/index.js +116 -41
- package/build/hooks/use-transcription-post-processing/index.d.ts +30 -0
- package/build/hooks/use-transcription-post-processing/index.js +84 -0
- package/build/icons/index.d.ts +7 -7
- package/build/icons/index.js +7 -7
- package/build/icons/mic.js +2 -2
- package/build/icons/player-pause.js +1 -1
- package/build/index.d.ts +12 -9
- package/build/index.js +12 -9
- package/build/jwt/index.js +4 -1
- package/build/suggestions-event-source/index.d.ts +1 -1
- package/build/suggestions-event-source/index.js +3 -3
- package/build/types.d.ts +9 -2
- package/build/types.js +4 -0
- package/package.json +5 -5
- package/src/api-fetch/index.ts +13 -0
- package/src/ask-question/index.ts +2 -2
- package/src/audio-transcription/index.ts +75 -0
- package/src/components/ai-control/index.tsx +12 -16
- package/src/components/ai-control/message.tsx +34 -2
- package/src/components/ai-control/style.scss +6 -0
- package/src/components/ai-status-indicator/index.tsx +1 -1
- package/src/components/audio-duration-display/index.tsx +6 -17
- package/src/components/audio-duration-display/lib/media.ts +17 -40
- package/src/components/index.ts +8 -4
- package/src/data-flow/context.tsx +7 -8
- package/src/data-flow/index.ts +3 -3
- package/src/data-flow/use-ai-context.ts +6 -6
- package/src/data-flow/with-ai-assistant-data.tsx +2 -2
- package/src/hooks/use-ai-suggestions/index.ts +6 -6
- package/src/hooks/use-audio-transcription/index.ts +95 -0
- package/src/hooks/use-media-recording/Readme.md +2 -2
- package/src/hooks/use-media-recording/index.ts +179 -59
- package/src/hooks/use-transcription-post-processing/index.ts +135 -0
- package/src/icons/index.ts +7 -7
- package/src/icons/mic.tsx +14 -16
- package/src/icons/player-pause.tsx +5 -5
- package/src/index.ts +12 -9
- package/src/jwt/index.ts +4 -1
- package/src/suggestions-event-source/index.ts +4 -4
- package/src/types.ts +29 -2
package/src/types.ts
CHANGED
|
@@ -31,8 +31,25 @@ export type PromptProp = PromptMessagesProp | string;
|
|
|
31
31
|
/*
|
|
32
32
|
* Data Flow types
|
|
33
33
|
*/
|
|
34
|
-
export type { UseAiContextOptions } from './data-flow/use-ai-context';
|
|
35
|
-
|
|
34
|
+
export type { UseAiContextOptions } from './data-flow/use-ai-context.js';
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* Hook types
|
|
38
|
+
*/
|
|
39
|
+
export type { RequestingErrorProps } from './hooks/use-ai-suggestions/index.js';
|
|
40
|
+
export type {
|
|
41
|
+
UseAudioTranscriptionProps,
|
|
42
|
+
UseAudioTranscriptionReturn,
|
|
43
|
+
} from './hooks/use-audio-transcription/index.js';
|
|
44
|
+
export type {
|
|
45
|
+
UseTranscriptionPostProcessingProps,
|
|
46
|
+
UseTranscriptionPostProcessingReturn,
|
|
47
|
+
PostProcessingAction,
|
|
48
|
+
} from './hooks/use-transcription-post-processing/index.js';
|
|
49
|
+
/*
|
|
50
|
+
* Hook constants
|
|
51
|
+
*/
|
|
52
|
+
export { TRANSCRIPTION_POST_PROCESSING_ACTION_SIMPLE_DRAFT } from './hooks/use-transcription-post-processing/index.js';
|
|
36
53
|
|
|
37
54
|
/*
|
|
38
55
|
* Requests types
|
|
@@ -61,6 +78,16 @@ export const AI_MODEL_GPT_4 = 'gpt-4' as const;
|
|
|
61
78
|
|
|
62
79
|
export type AiModelTypeProp = typeof AI_MODEL_GPT_3_5_Turbo_16K | typeof AI_MODEL_GPT_4;
|
|
63
80
|
|
|
81
|
+
/*
|
|
82
|
+
* Media recording types
|
|
83
|
+
*/
|
|
84
|
+
export type { RecordingState } from './hooks/use-media-recording/index.js';
|
|
85
|
+
|
|
86
|
+
/*
|
|
87
|
+
* Utility types
|
|
88
|
+
*/
|
|
89
|
+
export type CancelablePromise< T = void > = Promise< T > & { canceled?: boolean };
|
|
90
|
+
|
|
64
91
|
// Connection initial state
|
|
65
92
|
// @todo: it should be provided by the connection package
|
|
66
93
|
interface JPConnectionInitialState {
|