@smartspace/chat-ui 1.14.6-main.1a6776c → 1.14.6-main.27cc4f3
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.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +219 -142
- package/dist/index.js +801 -118
- package/dist/index.js.map +1 -1
- package/package.json +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -80,6 +80,104 @@ declare const ChatVariablesForm: React.ForwardRefExoticComponent<ChatVariablesFo
|
|
|
80
80
|
setVariables: (variables: Record<string, unknown>) => void;
|
|
81
81
|
} & React.RefAttributes<ChatVariablesFormRef>>;
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
* What the backend tells the composer about speech-to-text (dictation).
|
|
85
|
+
* `region` is the Azure region of the Speech resource, e.g. `australiaeast`.
|
|
86
|
+
* The SDK needs the region rather than the account's custom-domain URL: the
|
|
87
|
+
* recognition path only exists on the regional host, and that is what the
|
|
88
|
+
* issued token is scoped to. Absent when speech isn't configured.
|
|
89
|
+
*/
|
|
90
|
+
type SpeechConfig = {
|
|
91
|
+
enabled: boolean;
|
|
92
|
+
region?: string | null;
|
|
93
|
+
/** BCP-47 locale to recognise when the client doesn't ask for one. */
|
|
94
|
+
defaultLocale: string;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* A short-lived token from the Speech resource's own token service, scoped to
|
|
98
|
+
* recognition in one region and good for about ten minutes. Handed to the SDK
|
|
99
|
+
* as-is; the backend owns how it is minted.
|
|
100
|
+
*/
|
|
101
|
+
type SpeechToken = {
|
|
102
|
+
token: string;
|
|
103
|
+
/** ISO-8601 instant. */
|
|
104
|
+
expiresOn: string;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
type DictationState = 'idle' | 'starting' | 'listening';
|
|
108
|
+
type DictationError = 'permission-denied' | 'no-microphone' | 'network'
|
|
109
|
+
/** Worth another go: the install is fine, this attempt wasn't. */
|
|
110
|
+
| 'unavailable-temporarily'
|
|
111
|
+
/** Don't keep asking: this install can't do dictation. */
|
|
112
|
+
| 'unavailable' | 'unknown';
|
|
113
|
+
type UseDictationOptions = {
|
|
114
|
+
/** Azure region from `SpeechConfig`; dictation is unavailable without it. */
|
|
115
|
+
region?: string | null;
|
|
116
|
+
/** BCP-47 recognition locale (server default unless the user chose one). */
|
|
117
|
+
locale: string;
|
|
118
|
+
/** From the ChatService; dictation is unavailable without it. */
|
|
119
|
+
getToken?: () => Promise<SpeechToken>;
|
|
120
|
+
/** A final recognised phrase — insert it into the editor. */
|
|
121
|
+
onPhrase: (text: string) => void;
|
|
122
|
+
/**
|
|
123
|
+
* Provisional text, revised several times a second. Rendered as greyed ghost
|
|
124
|
+
* text at the caret. Deliberately a callback rather than hook state: holding it
|
|
125
|
+
* in state would re-render the whole composer on every partial result.
|
|
126
|
+
*/
|
|
127
|
+
onInterim?: (text: string) => void;
|
|
128
|
+
/**
|
|
129
|
+
* Hard stop, so a forgotten mic can't run for an hour. Keep it under the
|
|
130
|
+
* token's ~10 minute life: the token is never refreshed once the session is
|
|
131
|
+
* running, so a longer cap would end the session on an auth failure.
|
|
132
|
+
*/
|
|
133
|
+
maxDurationMs?: number;
|
|
134
|
+
/** Stop after this long without any speech. */
|
|
135
|
+
idleTimeoutMs?: number;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Streams microphone audio to Azure AI Speech and hands back recognised
|
|
139
|
+
* phrases. Owns the whole session: mic permission + stream, SDK loading,
|
|
140
|
+
* recogniser lifecycle, idle/max timers, and teardown on stop or unmount.
|
|
141
|
+
* Interim (not yet final) text goes to `onInterim` for display only; only final
|
|
142
|
+
* phrases reach `onPhrase`.
|
|
143
|
+
*/
|
|
144
|
+
declare function useDictation({ region, locale, getToken, onPhrase, onInterim, maxDurationMs, idleTimeoutMs, }: UseDictationOptions): {
|
|
145
|
+
supported: boolean;
|
|
146
|
+
available: boolean;
|
|
147
|
+
state: DictationState;
|
|
148
|
+
error: DictationError | null;
|
|
149
|
+
/** Name of the microphone in use, once a session is live. May be ''. */
|
|
150
|
+
deviceLabel: string;
|
|
151
|
+
/** Listening, but the microphone has produced no sound for a while. */
|
|
152
|
+
silent: boolean;
|
|
153
|
+
start: () => Promise<void>;
|
|
154
|
+
stop: () => void;
|
|
155
|
+
toggle: () => void;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
type DictationButtonProps = {
|
|
159
|
+
state: DictationState;
|
|
160
|
+
error: DictationError | null;
|
|
161
|
+
disabled?: boolean;
|
|
162
|
+
onToggle: () => void;
|
|
163
|
+
/**
|
|
164
|
+
* Microphone in use. Shown while listening because the browser picks the
|
|
165
|
+
* device, not us, and picking the wrong one is otherwise invisible: the
|
|
166
|
+
* session looks perfectly healthy and simply transcribes nothing.
|
|
167
|
+
*/
|
|
168
|
+
deviceLabel?: string;
|
|
169
|
+
/** Icon/button sizing to match the surrounding toolbar. */
|
|
170
|
+
size?: 'sm' | 'md';
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* The composer's microphone, which carries the dictation state itself rather than
|
|
174
|
+
* relying on text elsewhere: a spinning ring while the session is starting, and a
|
|
175
|
+
* filled stop square while it is listening — the same shape Send takes during a
|
|
176
|
+
* run, because the button's job is the same at that point. The transcript appears
|
|
177
|
+
* in the composer at the caret, so nothing is reported in two places.
|
|
178
|
+
*/
|
|
179
|
+
declare function DictationButton({ state, error, disabled, onToggle, deviceLabel, size, }: DictationButtonProps): react_jsx_runtime.JSX.Element;
|
|
180
|
+
|
|
83
181
|
type MentionUserLike = {
|
|
84
182
|
id: string;
|
|
85
183
|
displayName: string;
|
|
@@ -97,6 +195,19 @@ type MarkdownEditorHandle = {
|
|
|
97
195
|
* Callers that need the freshest text (e.g. sending on Enter) should read from here.
|
|
98
196
|
*/
|
|
99
197
|
getMarkdown: () => string;
|
|
198
|
+
/**
|
|
199
|
+
* Inserts plain text at the caret (dictation, snippets), replacing any
|
|
200
|
+
* selection. Prepends a space when the caret directly follows a
|
|
201
|
+
* non-whitespace character so successive inserts read as prose. No-op when
|
|
202
|
+
* the editor isn't editable.
|
|
203
|
+
*/
|
|
204
|
+
insertText: (text: string) => void;
|
|
205
|
+
/**
|
|
206
|
+
* Shows provisional dictation text greyed at the caret. Display-only — it never
|
|
207
|
+
* enters the document, so it cannot be serialised, undone, or sent. Pass '' to
|
|
208
|
+
* clear; inserting the final text via `insertText` clears it too.
|
|
209
|
+
*/
|
|
210
|
+
setDictationGhost: (text: string) => void;
|
|
100
211
|
/**
|
|
101
212
|
* Returns mention users currently present in the editor document.
|
|
102
213
|
* Useful for building API payloads (e.g. comments.mentionedUsers).
|
|
@@ -208,6 +319,8 @@ type Message = {
|
|
|
208
319
|
message?: string | null;
|
|
209
320
|
data?: string | null;
|
|
210
321
|
blockId?: string | null;
|
|
322
|
+
/** Trace id of the request that recorded the error, for a support reference. */
|
|
323
|
+
traceId?: string | null;
|
|
211
324
|
}[] | null;
|
|
212
325
|
values?: MessageValue[] | null;
|
|
213
326
|
optimistic?: boolean;
|
|
@@ -338,7 +451,6 @@ interface ChatService {
|
|
|
338
451
|
uploadFiles(files: File[], scope: FileScope, onFileUploaded?: (file: File, fileInfo: FileInfo$1) => void, onChunkUploaded?: (chunkIndex: number, totalChunks: number, file: File) => void): Promise<FileInfo$1[]>;
|
|
339
452
|
downloadFile(id: string, scope?: FileScope): Promise<Blob>;
|
|
340
453
|
getFileInfo(id: string, scope: FileScope): Promise<FileInfo$1>;
|
|
341
|
-
getFileDownloadUrl(sourceUri: string): Promise<string>;
|
|
342
454
|
fetchThread(workspaceId: string, threadId: string): Promise<MessageThread>;
|
|
343
455
|
fetchWorkspace(workspaceId: string): Promise<Workspace>;
|
|
344
456
|
fetchTaggableUsers(workspaceId: string): Promise<MentionUser[]>;
|
|
@@ -376,6 +488,19 @@ interface ChatService {
|
|
|
376
488
|
* compiling — the composer only shows a Stop button when it is provided.
|
|
377
489
|
*/
|
|
378
490
|
cancelFlowRun?(flowRunId: string): Promise<void>;
|
|
491
|
+
/**
|
|
492
|
+
* Speech-to-text (composer dictation). Both are optional so existing
|
|
493
|
+
* service implementations keep compiling — the composer renders a
|
|
494
|
+
* microphone only when both are provided AND the config says enabled.
|
|
495
|
+
* `getSpeechConfig` is read once per session. `getSpeechToken` is called
|
|
496
|
+
* when a dictation session starts (in parallel with the mic permission
|
|
497
|
+
* prompt — and again if that token aged out while the prompt sat open). The
|
|
498
|
+
* token is handed to the SDK as-is and never refreshed mid-session, so a
|
|
499
|
+
* session is capped to stay inside its life. No caching wanted: a stale
|
|
500
|
+
* token cannot be renewed.
|
|
501
|
+
*/
|
|
502
|
+
getSpeechConfig?(): Promise<SpeechConfig>;
|
|
503
|
+
getSpeechToken?(): Promise<SpeechToken>;
|
|
379
504
|
}
|
|
380
505
|
|
|
381
506
|
type ChatIdentity = {
|
|
@@ -422,6 +547,7 @@ declare const messagesResponseSchema: z.ZodObject<{
|
|
|
422
547
|
data: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
423
548
|
errorCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
424
549
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
550
|
+
traceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
425
551
|
}, z.core.$strip>>;
|
|
426
552
|
hasComments: z.ZodBoolean;
|
|
427
553
|
id: z.ZodString;
|
|
@@ -433,10 +559,7 @@ declare const messagesResponseSchema: z.ZodObject<{
|
|
|
433
559
|
createdByUserId: z.ZodString;
|
|
434
560
|
id: z.ZodString;
|
|
435
561
|
name: z.ZodString;
|
|
436
|
-
type: z.
|
|
437
|
-
Input: "Input";
|
|
438
|
-
Output: "Output";
|
|
439
|
-
}>;
|
|
562
|
+
type: z.ZodString;
|
|
440
563
|
value: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
441
564
|
}, z.core.$strip>>;
|
|
442
565
|
}, z.core.$strip>>;
|
|
@@ -452,6 +575,8 @@ type MessageErrorDto = NonNullable<MessageDto['errors']>[number] & {
|
|
|
452
575
|
};
|
|
453
576
|
type MessageError = NonNullable<Message['errors']>[number];
|
|
454
577
|
declare function mapMessageValueDtoToModel(dto: MessageValueDto): MessageValue;
|
|
578
|
+
/** `type` is an extensible enum; a value this UI cannot place is dropped. */
|
|
579
|
+
declare const mapMessageValuesDtoToModels: (dtos: MessageValueDto[]) => MessageValue[];
|
|
455
580
|
declare function mapMessageErrorDtoToModel(dto: MessageErrorDto): MessageError;
|
|
456
581
|
declare function mapMessageDtoToModel(dto: MessageDto): Message;
|
|
457
582
|
declare function mapMessagesDtoToModels(dto: MessageDto[]): Message[];
|
|
@@ -473,7 +598,7 @@ declare function applyDeltaToMessage(target: Message, delta: {
|
|
|
473
598
|
/**
|
|
474
599
|
* User-facing text for message errors.
|
|
475
600
|
*
|
|
476
|
-
* The backend attaches a stable machine-readable category to
|
|
601
|
+
* The backend attaches a stable machine-readable category to failures
|
|
477
602
|
* (`errorCode`, e.g. "llm.rate_limit") alongside the numeric HTTP `code`.
|
|
478
603
|
* Prefer the category — it distinguishes causes the HTTP code can't (a 400
|
|
479
604
|
* can be a content filter, a context-window blowout, or a malformed
|
|
@@ -483,8 +608,16 @@ declare function applyDeltaToMessage(target: Message, delta: {
|
|
|
483
608
|
type MessageErrorLike = number | {
|
|
484
609
|
code: number;
|
|
485
610
|
errorCode?: string | null;
|
|
611
|
+
message?: string | null;
|
|
486
612
|
};
|
|
487
613
|
declare const getMessageErrorText: (error: MessageErrorLike) => string;
|
|
614
|
+
/**
|
|
615
|
+
* The provider detail behind an error, shown in an optional "Show details"
|
|
616
|
+
* disclosure under the friendly bubble from {@link getMessageErrorText}.
|
|
617
|
+
* Returns null when there's nothing to add (a bare HTTP code, or no message
|
|
618
|
+
* on the error at all).
|
|
619
|
+
*/
|
|
620
|
+
declare const getMessageErrorDetail: (error: MessageErrorLike) => string | null;
|
|
488
621
|
|
|
489
622
|
/**
|
|
490
623
|
* Structured transient statuses carried on a message's `status` value.
|
|
@@ -644,11 +777,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
|
|
|
644
777
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
645
778
|
}, z.core.$strip>>>>;
|
|
646
779
|
variables: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
647
|
-
access: z.
|
|
648
|
-
None: "None";
|
|
649
|
-
Read: "Read";
|
|
650
|
-
Write: "Write";
|
|
651
|
-
}>;
|
|
780
|
+
access: z.ZodString;
|
|
652
781
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
653
782
|
}, z.core.$strip>>>>;
|
|
654
783
|
}, z.core.$strip>>;
|
|
@@ -671,10 +800,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
|
|
|
671
800
|
honourSourceDeletes: z.ZodBoolean;
|
|
672
801
|
id: z.ZodString;
|
|
673
802
|
inputName: z.ZodString;
|
|
674
|
-
type: z.
|
|
675
|
-
Periodic: "Periodic";
|
|
676
|
-
Container: "Container";
|
|
677
|
-
}>;
|
|
803
|
+
type: z.ZodString;
|
|
678
804
|
}, z.core.$strip>>;
|
|
679
805
|
}, z.core.$strip>>;
|
|
680
806
|
id: z.ZodString;
|
|
@@ -719,13 +845,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
|
|
|
719
845
|
providerDeploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
720
846
|
providerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
721
847
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
722
|
-
status: z.
|
|
723
|
-
Deploying: "Deploying";
|
|
724
|
-
Ready: "Ready";
|
|
725
|
-
Failed: "Failed";
|
|
726
|
-
Deleting: "Deleting";
|
|
727
|
-
Deleted: "Deleted";
|
|
728
|
-
}>;
|
|
848
|
+
status: z.ZodString;
|
|
729
849
|
statusMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
730
850
|
statusUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
731
851
|
steps: z.ZodArray<z.ZodObject<{
|
|
@@ -733,68 +853,52 @@ declare const workspaceResponseSchema: z.ZodObject<{
|
|
|
733
853
|
id: z.ZodString;
|
|
734
854
|
index: z.ZodNumber;
|
|
735
855
|
message: z.ZodString;
|
|
736
|
-
name: z.
|
|
737
|
-
DeployVNet: "DeployVNet";
|
|
738
|
-
DeployVM: "DeployVM";
|
|
739
|
-
InstallDependencies: "InstallDependencies";
|
|
740
|
-
DownloadModel: "DownloadModel";
|
|
741
|
-
TestModel: "TestModel";
|
|
742
|
-
}>;
|
|
856
|
+
name: z.ZodString;
|
|
743
857
|
progress: z.ZodNumber;
|
|
744
858
|
startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
745
859
|
}, z.core.$strip>>;
|
|
746
860
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
747
|
-
virtualMachineServerType: z.ZodOptional<z.
|
|
748
|
-
TextGenerationInference: "TextGenerationInference";
|
|
749
|
-
VLlm: "VLlm";
|
|
750
|
-
}>>;
|
|
861
|
+
virtualMachineServerType: z.ZodOptional<z.ZodString>;
|
|
751
862
|
virtualMachineUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
752
863
|
vmSize: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
753
864
|
}, z.core.$strip>>;
|
|
754
865
|
displayName: z.ZodString;
|
|
755
866
|
id: z.ZodString;
|
|
756
|
-
modelDeploymentProviderType: z.ZodOptional<z.
|
|
757
|
-
|
|
758
|
-
AzureOpenAi: "AzureOpenAi";
|
|
759
|
-
HuggingFace: "HuggingFace";
|
|
760
|
-
Cohere: "Cohere";
|
|
761
|
-
Anthropic: "Anthropic";
|
|
762
|
-
Gemini: "Gemini";
|
|
763
|
-
VertexAi: "VertexAi";
|
|
764
|
-
AzureFoundry: "AzureFoundry";
|
|
765
|
-
}>>;
|
|
766
|
-
modelPublisher: z.ZodOptional<z.ZodEnum<{
|
|
767
|
-
OpenAi: "OpenAi";
|
|
768
|
-
HuggingFace: "HuggingFace";
|
|
769
|
-
Cohere: "Cohere";
|
|
770
|
-
Anthropic: "Anthropic";
|
|
771
|
-
Google: "Google";
|
|
772
|
-
Meta: "Meta";
|
|
773
|
-
Mistral: "Mistral";
|
|
774
|
-
Microsoft: "Microsoft";
|
|
775
|
-
DeepSeek: "DeepSeek";
|
|
776
|
-
XAi: "XAi";
|
|
777
|
-
Amazon: "Amazon";
|
|
778
|
-
Qwen: "Qwen";
|
|
779
|
-
Other: "Other";
|
|
780
|
-
}>>;
|
|
867
|
+
modelDeploymentProviderType: z.ZodOptional<z.ZodString>;
|
|
868
|
+
modelPublisher: z.ZodOptional<z.ZodString>;
|
|
781
869
|
name: z.ZodString;
|
|
782
|
-
properties: z.ZodArray<z.ZodObject<{
|
|
870
|
+
properties: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
871
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
872
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
873
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
783
874
|
name: z.ZodString;
|
|
875
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
784
876
|
type: z.ZodEnum<{
|
|
785
877
|
Boolean: "Boolean";
|
|
878
|
+
}>;
|
|
879
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
880
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
881
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
882
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
883
|
+
name: z.ZodString;
|
|
884
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
885
|
+
type: z.ZodEnum<{
|
|
786
886
|
Number: "Number";
|
|
887
|
+
}>;
|
|
888
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
889
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
890
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
891
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
892
|
+
name: z.ZodString;
|
|
893
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
894
|
+
type: z.ZodEnum<{
|
|
787
895
|
String: "String";
|
|
788
896
|
}>;
|
|
789
|
-
}, z.core.$strip>>;
|
|
897
|
+
}, z.core.$strip>]>>;
|
|
790
898
|
}, z.core.$strip>;
|
|
791
899
|
prePrompt: z.ZodString;
|
|
792
900
|
presencePenalty: z.ZodNumber;
|
|
793
|
-
role: z.
|
|
794
|
-
Document: "Document";
|
|
795
|
-
Agent: "Agent";
|
|
796
|
-
Analyzer: "Analyzer";
|
|
797
|
-
}>;
|
|
901
|
+
role: z.ZodString;
|
|
798
902
|
temperature: z.ZodNumber;
|
|
799
903
|
topP: z.ZodNumber;
|
|
800
904
|
}, z.core.$strip>>;
|
|
@@ -808,11 +912,7 @@ declare const workspaceResponseSchema: z.ZodObject<{
|
|
|
808
912
|
supportsFiles: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
809
913
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
810
914
|
variables: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
811
|
-
access: z.
|
|
812
|
-
None: "None";
|
|
813
|
-
Read: "Read";
|
|
814
|
-
Write: "Write";
|
|
815
|
-
}>;
|
|
915
|
+
access: z.ZodString;
|
|
816
916
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
817
917
|
}, z.core.$strip>>;
|
|
818
918
|
}, z.core.$strip>;
|
|
@@ -887,11 +987,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
|
|
|
887
987
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
888
988
|
}, z.core.$strip>>>>;
|
|
889
989
|
variables: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
890
|
-
access: z.
|
|
891
|
-
None: "None";
|
|
892
|
-
Read: "Read";
|
|
893
|
-
Write: "Write";
|
|
894
|
-
}>;
|
|
990
|
+
access: z.ZodString;
|
|
895
991
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
896
992
|
}, z.core.$strip>>>>;
|
|
897
993
|
}, z.core.$strip>>;
|
|
@@ -914,10 +1010,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
|
|
|
914
1010
|
honourSourceDeletes: z.ZodBoolean;
|
|
915
1011
|
id: z.ZodString;
|
|
916
1012
|
inputName: z.ZodString;
|
|
917
|
-
type: z.
|
|
918
|
-
Periodic: "Periodic";
|
|
919
|
-
Container: "Container";
|
|
920
|
-
}>;
|
|
1013
|
+
type: z.ZodString;
|
|
921
1014
|
}, z.core.$strip>>;
|
|
922
1015
|
}, z.core.$strip>>;
|
|
923
1016
|
id: z.ZodString;
|
|
@@ -962,13 +1055,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
|
|
|
962
1055
|
providerDeploymentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
963
1056
|
providerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
964
1057
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
965
|
-
status: z.
|
|
966
|
-
Deploying: "Deploying";
|
|
967
|
-
Ready: "Ready";
|
|
968
|
-
Failed: "Failed";
|
|
969
|
-
Deleting: "Deleting";
|
|
970
|
-
Deleted: "Deleted";
|
|
971
|
-
}>;
|
|
1058
|
+
status: z.ZodString;
|
|
972
1059
|
statusMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
973
1060
|
statusUpdatedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
974
1061
|
steps: z.ZodArray<z.ZodObject<{
|
|
@@ -976,68 +1063,52 @@ declare const workspacesListResponseSchema: z.ZodObject<{
|
|
|
976
1063
|
id: z.ZodString;
|
|
977
1064
|
index: z.ZodNumber;
|
|
978
1065
|
message: z.ZodString;
|
|
979
|
-
name: z.
|
|
980
|
-
DeployVNet: "DeployVNet";
|
|
981
|
-
DeployVM: "DeployVM";
|
|
982
|
-
InstallDependencies: "InstallDependencies";
|
|
983
|
-
DownloadModel: "DownloadModel";
|
|
984
|
-
TestModel: "TestModel";
|
|
985
|
-
}>;
|
|
1066
|
+
name: z.ZodString;
|
|
986
1067
|
progress: z.ZodNumber;
|
|
987
1068
|
startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
988
1069
|
}, z.core.$strip>>;
|
|
989
1070
|
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
990
|
-
virtualMachineServerType: z.ZodOptional<z.
|
|
991
|
-
TextGenerationInference: "TextGenerationInference";
|
|
992
|
-
VLlm: "VLlm";
|
|
993
|
-
}>>;
|
|
1071
|
+
virtualMachineServerType: z.ZodOptional<z.ZodString>;
|
|
994
1072
|
virtualMachineUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
995
1073
|
vmSize: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
996
1074
|
}, z.core.$strip>>;
|
|
997
1075
|
displayName: z.ZodString;
|
|
998
1076
|
id: z.ZodString;
|
|
999
|
-
modelDeploymentProviderType: z.ZodOptional<z.
|
|
1000
|
-
|
|
1001
|
-
AzureOpenAi: "AzureOpenAi";
|
|
1002
|
-
HuggingFace: "HuggingFace";
|
|
1003
|
-
Cohere: "Cohere";
|
|
1004
|
-
Anthropic: "Anthropic";
|
|
1005
|
-
Gemini: "Gemini";
|
|
1006
|
-
VertexAi: "VertexAi";
|
|
1007
|
-
AzureFoundry: "AzureFoundry";
|
|
1008
|
-
}>>;
|
|
1009
|
-
modelPublisher: z.ZodOptional<z.ZodEnum<{
|
|
1010
|
-
OpenAi: "OpenAi";
|
|
1011
|
-
HuggingFace: "HuggingFace";
|
|
1012
|
-
Cohere: "Cohere";
|
|
1013
|
-
Anthropic: "Anthropic";
|
|
1014
|
-
Google: "Google";
|
|
1015
|
-
Meta: "Meta";
|
|
1016
|
-
Mistral: "Mistral";
|
|
1017
|
-
Microsoft: "Microsoft";
|
|
1018
|
-
DeepSeek: "DeepSeek";
|
|
1019
|
-
XAi: "XAi";
|
|
1020
|
-
Amazon: "Amazon";
|
|
1021
|
-
Qwen: "Qwen";
|
|
1022
|
-
Other: "Other";
|
|
1023
|
-
}>>;
|
|
1077
|
+
modelDeploymentProviderType: z.ZodOptional<z.ZodString>;
|
|
1078
|
+
modelPublisher: z.ZodOptional<z.ZodString>;
|
|
1024
1079
|
name: z.ZodString;
|
|
1025
|
-
properties: z.ZodArray<z.ZodObject<{
|
|
1080
|
+
properties: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1081
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1082
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1083
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1026
1084
|
name: z.ZodString;
|
|
1085
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1027
1086
|
type: z.ZodEnum<{
|
|
1028
1087
|
Boolean: "Boolean";
|
|
1088
|
+
}>;
|
|
1089
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1090
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1091
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1092
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1093
|
+
name: z.ZodString;
|
|
1094
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1095
|
+
type: z.ZodEnum<{
|
|
1029
1096
|
Number: "Number";
|
|
1097
|
+
}>;
|
|
1098
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1099
|
+
defaultValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1100
|
+
maxValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1101
|
+
minValue: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1102
|
+
name: z.ZodString;
|
|
1103
|
+
step: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1104
|
+
type: z.ZodEnum<{
|
|
1030
1105
|
String: "String";
|
|
1031
1106
|
}>;
|
|
1032
|
-
}, z.core.$strip>>;
|
|
1107
|
+
}, z.core.$strip>]>>;
|
|
1033
1108
|
}, z.core.$strip>;
|
|
1034
1109
|
prePrompt: z.ZodString;
|
|
1035
1110
|
presencePenalty: z.ZodNumber;
|
|
1036
|
-
role: z.
|
|
1037
|
-
Document: "Document";
|
|
1038
|
-
Agent: "Agent";
|
|
1039
|
-
Analyzer: "Analyzer";
|
|
1040
|
-
}>;
|
|
1111
|
+
role: z.ZodString;
|
|
1041
1112
|
temperature: z.ZodNumber;
|
|
1042
1113
|
topP: z.ZodNumber;
|
|
1043
1114
|
}, z.core.$strip>>;
|
|
@@ -1051,11 +1122,7 @@ declare const workspacesListResponseSchema: z.ZodObject<{
|
|
|
1051
1122
|
supportsFiles: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1052
1123
|
tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1053
1124
|
variables: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1054
|
-
access: z.
|
|
1055
|
-
None: "None";
|
|
1056
|
-
Read: "Read";
|
|
1057
|
-
Write: "Write";
|
|
1058
|
-
}>;
|
|
1125
|
+
access: z.ZodString;
|
|
1059
1126
|
schema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1060
1127
|
}, z.core.$strip>>;
|
|
1061
1128
|
}, z.core.$strip>>;
|
|
@@ -1188,9 +1255,6 @@ declare const filesKeys: {
|
|
|
1188
1255
|
downloadBlob: (fileId: string) => readonly ["files", "mutation", "downloadBlob", {
|
|
1189
1256
|
readonly fileId: string;
|
|
1190
1257
|
}];
|
|
1191
|
-
downloadByUri: (uri: string) => readonly ["files", "mutation", "downloadByUri", {
|
|
1192
|
-
readonly uri: string;
|
|
1193
|
-
}];
|
|
1194
1258
|
};
|
|
1195
1259
|
};
|
|
1196
1260
|
|
|
@@ -1265,6 +1329,11 @@ declare const modelsKeys: {
|
|
|
1265
1329
|
}];
|
|
1266
1330
|
};
|
|
1267
1331
|
|
|
1332
|
+
declare const speechKeys: {
|
|
1333
|
+
all: readonly ["speech"];
|
|
1334
|
+
config: () => readonly ["speech", "config"];
|
|
1335
|
+
};
|
|
1336
|
+
|
|
1268
1337
|
declare const messagesListOptions: (service: ChatService, threadId: string, opts?: {
|
|
1269
1338
|
take?: number;
|
|
1270
1339
|
skip?: number;
|
|
@@ -1281,10 +1350,6 @@ declare function useMessages(threadId: string): _tanstack_react_query.UseQueryRe
|
|
|
1281
1350
|
declare const useFileMutations: (scope: FileScope) => {
|
|
1282
1351
|
uploadFilesMutation: _tanstack_react_query.UseMutationResult<FileInfo$1[], Error, File[], unknown>;
|
|
1283
1352
|
downloadFileMutation: _tanstack_react_query.UseMutationResult<void, Error, FileInfo$1, unknown>;
|
|
1284
|
-
downloadFileByUriMutation: _tanstack_react_query.UseMutationResult<Blob, Error, {
|
|
1285
|
-
name: string;
|
|
1286
|
-
sourceUri: string;
|
|
1287
|
-
}, unknown>;
|
|
1288
1353
|
getFileBlobUrl: (id: string) => Promise<string>;
|
|
1289
1354
|
fileProgress: Record<string, number>;
|
|
1290
1355
|
uploadedFiles: FileInfo$1[];
|
|
@@ -1427,4 +1492,16 @@ declare function useModels({ search, take, skip, }?: {
|
|
|
1427
1492
|
total: number;
|
|
1428
1493
|
}, Error>;
|
|
1429
1494
|
|
|
1430
|
-
|
|
1495
|
+
/**
|
|
1496
|
+
* Whether dictation is available on this install and how to connect. Read once
|
|
1497
|
+
* per app session — it only changes with a deploy — and disabled entirely for
|
|
1498
|
+
* services that don't implement speech, in which case the composer renders no
|
|
1499
|
+
* microphone.
|
|
1500
|
+
*
|
|
1501
|
+
* A definitive answer (including a 404 from an older backend) is cached for the
|
|
1502
|
+
* session; a transient failure is retried, because otherwise one blip on load
|
|
1503
|
+
* would silently disable the mic until the page is reloaded.
|
|
1504
|
+
*/
|
|
1505
|
+
declare function useSpeechConfig(): _tanstack_react_query.UseQueryResult<SpeechConfig, Error>;
|
|
1506
|
+
|
|
1507
|
+
export { type ChatContextIds, type ChatIdentity, ChatProvider, type ChatProviderProps, type ChatService, ChatVariablesForm, DRAFT_THREAD_PREFIX, DateFromApi, DictationButton, type DictationButtonProps, type DictationError, type DictationState, type FileInfo$1 as FileInfo, type FileScope, type FlowRunVariables, MarkdownEditor, type MarkdownEditorHandle, type MentionUser, type Message, MessageComposer, type MessageComposerProps, type MessageContentItem, type MessageError, type MessageErrorLike, MessageList, type MessageListProps, MessageListSkeleton, MessageMarkdown, type MessageThread, type MessageValue, MessageValueType, type Model, type ModelProperty, NEW_THREAD_ID, type RetryStatus, type SpeechConfig, type SpeechToken, THREAD_LIST_PAGE_SIZE, type ThreadsResponse, type UseDictationOptions, type Variables, type Workspace, applyDeltaToMessage, applyThreadToCache, createDraftThreadId, createThreadId, downloadFileBlobOptions, filesKeys, flowRunsKeys, getMessageErrorDetail, getMessageErrorText, getModelIcon, getRetryStatusText, getThreadPlaceholderFromListCache, getUserPhotoUrl, invalidateWorkspaceThreadLists, isDraftThreadId, mapFileInfoDtoToModel, mapMentionUserDtoToModel, mapMessageDtoToModel, mapMessageErrorDtoToModel, mapMessageValueDtoToModel, mapMessageValuesDtoToModels, mapMessagesDtoToModels, mapSignalRThreadSummaryToModel, mapThreadDtoToModel, mapThreadsResponseDtoToModel, mapWorkspaceDtoToModel, mapWorkspacesDtoToModels, markDraftThreadId, messagesKeys, messagesListOptions, messagesMutationsKeys, modelsKeys, parseDateTime, parseDateTimeHuman, parseRetryStatus, randomUUID, setThreadOptimisticRunning, setThreadRunningInLists, speechKeys, taggableUsersOptions, threadDetailOptions, threadsKeys, unmarkDraftThreadId, useAddInputToMessage, useChatContext, useChatIdentity, useChatService, useDictation, useDownloadFileBlobQuery, useFileMutations, useFlowRunVariables, useIsDraftThreadId, useMessages, useModels, useSendMessage, useSpeechConfig, useTaggableWorkspaceUsers, useThread, useThreadIsRunning, useUpdateFlowRunVariable, useWorkspace, utcDate, workspaceDetailOptions, workspaceKeys };
|