@3cr/viewer-browser 0.0.196 → 0.0.200

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3cr/viewer-browser",
3
- "version": "0.0.196",
3
+ "version": "0.0.200",
4
4
  "main": "./dist/Viewer3CR.umd.js",
5
5
  "module": "dist/Viewer3CR.umd.js",
6
6
  "homepage": "https://docs.3cr.singular.health",
@@ -21,7 +21,7 @@
21
21
  "coverage": "vitest run --coverage"
22
22
  },
23
23
  "dependencies": {
24
- "@3cr/sdk-browser": "^1.0.13",
24
+ "@3cr/sdk-browser": "^1.0.15",
25
25
  "@3cr/types-ts": "file:static/3cr-types-browser",
26
26
  "@kyvg/vue3-notification": "^3.2.1",
27
27
  "@mdi/font": "6.2.95",
@@ -26,9 +26,7 @@
26
26
  <b style="font-size: 12px">Smart Description</b>
27
27
  </v-col>
28
28
  <v-col>
29
- <span style="font-size: 12px">{{
30
- smartResponses.GptResponse
31
- }}</span>
29
+ <span v-html="smartResponses.GptResponse" style="font-size: 12px"></span>
32
30
  </v-col>
33
31
  </v-row>
34
32
  <v-row no-gutters>
@@ -37,9 +35,7 @@
37
35
  </v-col>
38
36
  <v-col>
39
37
  <template v-for="action in actions">
40
- <a style="font-size: 12px" :href="action.ActionData.Url">{{
41
- action.ActionData.Description
42
- }}</a>
38
+ <a style="font-size: 12px" :href="action.ActionData.Url" target="_blank">{{ action.ActionData.Description }}</a>
43
39
  <br />
44
40
  </template>
45
41
  </v-col>
@@ -59,12 +59,14 @@
59
59
  @askFollowup="askFollowUpQuestion"
60
60
  >
61
61
  </AskAI>
62
- <span
62
+ <div
63
63
  class="text-caption"
64
- style="font-size: 8px !important; line-height: 8px !important"
65
- >* Powered by ChatGPT, Smart Items are NOT for diagnostic use. Please
66
- consult a medical professional for a diagnosis or treatment plan
67
- </span>
64
+ style="font-size: 9px !important; line-height: 12px !important"
65
+ >
66
+ * 3Dicom's Annotiva AI is powered by AI Large Language Models (LLMs) which
67
+ generate general health information for improved patient comprehension.
68
+ <br /><br />It is NOT for diagnostic usage.
69
+ </div>
68
70
  </template>
69
71
 
70
72
  <script setup lang="ts">
@@ -72,7 +74,7 @@ import { dataOverlayState, initialScanState } from "@/dataLayer/scanState";
72
74
  import { nextTick, onMounted, ref } from "vue";
73
75
  import { ColourData, SlidersActions, Vector3Data } from "@3cr/types-ts";
74
76
  import { GptQuestion, GptService } from "@/services/gpt/gpt.service";
75
- import {useViewer3cr} from "@/dataLayer/useViewer3cr";
77
+ import { useViewer3cr } from "@/dataLayer/useViewer3cr";
76
78
 
77
79
  interface Annotation {
78
80
  id: string;
@@ -233,10 +235,14 @@ function getBackgroundStyles(item: Annotation): Record<string, any> {
233
235
 
234
236
  async function focusSlices(ids: unknown[]): Promise<void> {
235
237
  const id = ids.length > 0 ? ids[0] : null;
236
- if (!id) { return; }
238
+ if (!id) {
239
+ return;
240
+ }
237
241
 
238
242
  const item = findNode(id as string);
239
- if (!item) { return; }
243
+ if (!item) {
244
+ return;
245
+ }
240
246
 
241
247
  const x = item.position?.X ?? 0;
242
248
  const y = item.position?.Y ?? 0;
@@ -7,9 +7,17 @@ export class GptService {
7
7
 
8
8
  client: AxiosInstance = axios.create();
9
9
 
10
- async GenerateAnnotations(title: string, question: number = 0): Promise<AxiosResponse<GptResponsePayload>> {
10
+ async GenerateAnnotations(
11
+ title: string,
12
+ question: number = 0
13
+ ): Promise<AxiosResponse<GptResponsePayload>> {
14
+ const testVersion =
15
+ window.location.href.includes("test.") ||
16
+ window.location.href.includes("localhost");
11
17
  return this.client.post(
12
- "https://test.api.singular.health/api/GPT/Smart/Annotation",
18
+ `https://${
19
+ testVersion ? "test." : ""
20
+ }api.singular.health/api/GPT/Smart/Annotation`,
13
21
  null,
14
22
  { params: { annotationTitle: title, question } }
15
23
  );