@smartspace/chat-ui 1.13.1-pr.250.fae775f → 1.13.1-pr.255.41c66f3
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.d.ts +1 -18
- package/dist/index.js +10 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1019,23 +1019,6 @@ declare function unmarkDraftThreadId(threadId: string): void;
|
|
|
1019
1019
|
declare function isDraftThreadId(threadId?: string | null): boolean;
|
|
1020
1020
|
declare function createDraftThreadId(): string;
|
|
1021
1021
|
|
|
1022
|
-
/**
|
|
1023
|
-
* Treat an API date string as UTC even when it lacks a trailing "Z".
|
|
1024
|
-
* If already a Date, returns it as-is (Date stores UTC internally).
|
|
1025
|
-
*/
|
|
1026
|
-
declare function utcDate(value: string | Date): Date;
|
|
1027
|
-
/**
|
|
1028
|
-
* Zod schema that coerces a Date, ISO string, or numeric timestamp
|
|
1029
|
-
* from the API into a Date object, ensuring timezone-less strings
|
|
1030
|
-
* are treated as UTC.
|
|
1031
|
-
*/
|
|
1032
|
-
declare const DateFromApi: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodCoercedDate<unknown>>;
|
|
1033
|
-
|
|
1034
|
-
declare function parseDateTime(date: Date | string, customFormat?: string): string;
|
|
1035
|
-
declare function parseDateTimeHuman(date: Date | string): string;
|
|
1036
|
-
|
|
1037
|
-
declare function getUserPhotoUrl(userId: string | null | undefined): string | undefined;
|
|
1038
|
-
|
|
1039
1022
|
declare const messagesKeys: {
|
|
1040
1023
|
all: readonly ["messages"];
|
|
1041
1024
|
lists: () => readonly ["messages", "list"];
|
|
@@ -1322,4 +1305,4 @@ declare function useModels({ search, take, skip, }?: {
|
|
|
1322
1305
|
total: number;
|
|
1323
1306
|
}, Error>;
|
|
1324
1307
|
|
|
1325
|
-
export { type ChatContextIds, type ChatIdentity, ChatProvider, type ChatProviderProps, type ChatService, ChatVariablesForm, DRAFT_THREAD_PREFIX,
|
|
1308
|
+
export { type ChatContextIds, type ChatIdentity, ChatProvider, type ChatProviderProps, type ChatService, ChatVariablesForm, DRAFT_THREAD_PREFIX, type FileInfo$1 as FileInfo, type FileScope, type FlowRunVariables, MarkdownEditor, type MarkdownEditorHandle, type MentionUser, type Message, MessageComposer, type MessageComposerProps, type MessageContentItem, type MessageError, MessageList, type MessageListProps, MessageListSkeleton, MessageMarkdown, type MessageThread, type MessageValue, MessageValueType, type Model, type ModelProperty, NEW_THREAD_ID, THREAD_LIST_PAGE_SIZE, type ThreadsResponse, type Variables, type Workspace, applyDeltaToMessage, applyThreadToCache, createDraftThreadId, createThreadId, downloadFileBlobOptions, filesKeys, flowRunsKeys, getModelIcon, getThreadPlaceholderFromListCache, invalidateWorkspaceThreadLists, isDraftThreadId, mapFileInfoDtoToModel, mapMentionUserDtoToModel, mapMessageDtoToModel, mapMessageErrorDtoToModel, mapMessageValueDtoToModel, mapMessagesDtoToModels, mapSignalRThreadSummaryToModel, mapThreadDtoToModel, mapThreadsResponseDtoToModel, mapWorkspaceDtoToModel, mapWorkspacesDtoToModels, markDraftThreadId, messagesKeys, messagesListOptions, messagesMutationsKeys, modelsKeys, setThreadOptimisticRunning, setThreadRunningInLists, taggableUsersOptions, threadDetailOptions, threadsKeys, unmarkDraftThreadId, useAddInputToMessage, useChatContext, useChatIdentity, useChatService, useDownloadFileBlobQuery, useFileMutations, useFlowRunVariables, useMessages, useModels, useSendMessage, useTaggableWorkspaceUsers, useThread, useThreadIsRunning, useUpdateFlowRunVariable, useWorkspace, workspaceDetailOptions, workspaceKeys };
|
package/dist/index.js
CHANGED
|
@@ -3310,7 +3310,7 @@ function utcDate(value) {
|
|
|
3310
3310
|
}
|
|
3311
3311
|
return new Date(value);
|
|
3312
3312
|
}
|
|
3313
|
-
|
|
3313
|
+
z.preprocess((val) => {
|
|
3314
3314
|
if (typeof val === "string" && !hasTimezone(val)) {
|
|
3315
3315
|
return val + "Z";
|
|
3316
3316
|
}
|
|
@@ -3815,11 +3815,13 @@ function MessageComposer({
|
|
|
3815
3815
|
workspaceId,
|
|
3816
3816
|
threadId: isDraftThread ? void 0 : threadId
|
|
3817
3817
|
});
|
|
3818
|
-
|
|
3819
|
-
window
|
|
3820
|
-
|
|
3818
|
+
useEffect(() => {
|
|
3819
|
+
if (typeof window === "undefined") return;
|
|
3820
|
+
window.__ssDownloadFile = (id) => getFileBlobUrl(id);
|
|
3821
|
+
return () => {
|
|
3822
|
+
if (window.__ssDownloadFile) delete window.__ssDownloadFile;
|
|
3821
3823
|
};
|
|
3822
|
-
}
|
|
3824
|
+
}, [getFileBlobUrl]);
|
|
3823
3825
|
const onUploadFiles = async (files) => {
|
|
3824
3826
|
const res = await uploadFilesMutation.mutateAsync(files);
|
|
3825
3827
|
return res.map(({ id, name }) => ({ id, name }));
|
|
@@ -19083,20 +19085,14 @@ dayjs.extend(relativeTime);
|
|
|
19083
19085
|
dayjs.extend(advancedFormat);
|
|
19084
19086
|
function parseDateTime(date, customFormat) {
|
|
19085
19087
|
const d = dayjs.utc(date).local();
|
|
19086
|
-
|
|
19087
|
-
if (customFormat === "x") return d.valueOf().toString();
|
|
19088
|
-
return d.format(customFormat ?? "YYYY-MM-DD HH:mm:ss");
|
|
19089
|
-
}
|
|
19090
|
-
function parseDateTimeHuman(date) {
|
|
19091
|
-
return dayjs.utc(date).local().fromNow();
|
|
19088
|
+
return d.format(customFormat);
|
|
19092
19089
|
}
|
|
19093
19090
|
|
|
19094
19091
|
// src/shared/utils/userPhoto.ts
|
|
19095
19092
|
function getChatApiBaseUrl() {
|
|
19096
19093
|
try {
|
|
19097
19094
|
const w = window;
|
|
19098
|
-
const
|
|
19099
|
-
const cfg = w?.ssconfig?.Chat_Api_Uri ?? env2?.VITE_CHAT_API_URI;
|
|
19095
|
+
const cfg = w?.ssconfig?.Chat_Api_Uri ?? import.meta.env.VITE_CHAT_API_URI;
|
|
19100
19096
|
return typeof cfg === "string" && cfg.trim() ? cfg.trim() : "";
|
|
19101
19097
|
} catch {
|
|
19102
19098
|
return "";
|
|
@@ -20149,6 +20145,6 @@ function mapWorkspaceDtoToModel(dto) {
|
|
|
20149
20145
|
}
|
|
20150
20146
|
var mapWorkspacesDtoToModels = (arr) => arr.map(mapWorkspaceDtoToModel);
|
|
20151
20147
|
|
|
20152
|
-
export { ChatProvider, ChatVariablesForm, DRAFT_THREAD_PREFIX,
|
|
20148
|
+
export { ChatProvider, ChatVariablesForm, DRAFT_THREAD_PREFIX, MarkdownEditor, MessageComposer, MessageList, MessageListSkeleton, MessageMarkdown, MessageValueType, NEW_THREAD_ID, THREAD_LIST_PAGE_SIZE, applyDeltaToMessage, applyThreadToCache, createDraftThreadId, createThreadId, downloadFileBlobOptions, filesKeys, flowRunsKeys, getModelIcon, getThreadPlaceholderFromListCache, invalidateWorkspaceThreadLists, isDraftThreadId, mapFileInfoDtoToModel, mapMentionUserDtoToModel, mapMessageDtoToModel, mapMessageErrorDtoToModel, mapMessageValueDtoToModel, mapMessagesDtoToModels, mapSignalRThreadSummaryToModel, mapThreadDtoToModel, mapThreadsResponseDtoToModel, mapWorkspaceDtoToModel, mapWorkspacesDtoToModels, markDraftThreadId, messagesKeys, messagesListOptions, messagesMutationsKeys, modelsKeys, setThreadOptimisticRunning, setThreadRunningInLists, taggableUsersOptions, threadDetailOptions, threadsKeys, unmarkDraftThreadId, useAddInputToMessage, useChatContext, useChatIdentity, useChatService, useDownloadFileBlobQuery, useFileMutations, useFlowRunVariables, useMessages, useModels, useSendMessage, useTaggableWorkspaceUsers, useThread, useThreadIsRunning, useUpdateFlowRunVariable, useWorkspace, workspaceDetailOptions, workspaceKeys };
|
|
20153
20149
|
//# sourceMappingURL=index.js.map
|
|
20154
20150
|
//# sourceMappingURL=index.js.map
|