@smartspace/chat-ui 1.13.1-pr.248.687fcf2 → 1.13.1-pr.249.63aeeb3

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.js CHANGED
@@ -3459,10 +3459,10 @@ function useSendMessage() {
3459
3459
  if (!threadId) throw new Error("Thread ID is required");
3460
3460
  if (!workspaceId) throw new Error("Workspace ID is required");
3461
3461
  const optimistic = {
3462
- id: `temp-${Date.now()}`,
3462
+ id: `temp-${crypto.randomUUID()}`,
3463
3463
  values: [
3464
3464
  {
3465
- id: `temp-${Date.now()}-prompt`,
3465
+ id: `temp-${crypto.randomUUID()}-prompt`,
3466
3466
  type: "Input" /* INPUT */,
3467
3467
  name: "prompt",
3468
3468
  value: contentList,
@@ -3473,7 +3473,7 @@ function useSendMessage() {
3473
3473
  },
3474
3474
  ...files?.length ? [
3475
3475
  {
3476
- id: `temp-${Date.now()}-files`,
3476
+ id: `temp-${crypto.randomUUID()}-files`,
3477
3477
  type: "Input" /* INPUT */,
3478
3478
  name: "files",
3479
3479
  value: files,
@@ -3485,7 +3485,7 @@ function useSendMessage() {
3485
3485
  ] : [],
3486
3486
  ...variables && Object.keys(variables).length ? [
3487
3487
  {
3488
- id: `temp-${Date.now()}-vars`,
3488
+ id: `temp-${crypto.randomUUID()}-vars`,
3489
3489
  type: "Input" /* INPUT */,
3490
3490
  name: "variables",
3491
3491
  value: variables,
@@ -3627,7 +3627,10 @@ var workspaceDetailOptions = ({
3627
3627
  });
3628
3628
  function useWorkspace(workspaceId) {
3629
3629
  const service = useChatService();
3630
- return useQuery(workspaceDetailOptions({ service, workspaceId }));
3630
+ return useQuery({
3631
+ ...workspaceDetailOptions({ service, workspaceId }),
3632
+ enabled: !!workspaceId
3633
+ });
3631
3634
  }
3632
3635
  var taggableUsersOptions = ({
3633
3636
  service,