@scalar/agent-chat 0.12.52 → 0.12.54

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.
@@ -1 +1 @@
1
- {"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../src/App.vue"],"names":[],"mappings":"AA6EA,OAAO,EAAW,KAAK,GAAG,EAAE,MAAM,KAAK,CAAA;AAGvC,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,KAAK,WAAW,GAAG;IACjB,iBAAiB,EAAE,gBAAgB,EAAE,CAAA;IACrC,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,MAAM,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,MAAM,CAAA;IAC1B,qBAAqB,CAAC,EAAE,MAAM,MAAM,CAAA;IACpC,sEAAsE;IACtE,wBAAwB,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IACnD,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACzB,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAC;AAuBF,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BgG,CAAC;WAAc,CAAC;;;;;iBAErE,CAAC;;;;;;;;;;;;;;;CAfrD,CAAA;AAIF,MAAM,MAAM,WAAW,GAAG;IACxB,gBAAgB,EAAE,OAAO,KAAK,CAAC,gBAAgB,CAAA;CAChD,CAAA;AA+CD,QAAA,MAAM,YAAY;;;;kFAIhB,CAAC;wBACkB,OAAO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declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
5
- toggle: (v: "preview" | "raw") => any;
5
+ toggle: (v: "raw" | "preview") => any;
6
6
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
7
- onToggle?: ((v: "preview" | "raw") => any) | undefined;
7
+ onToggle?: ((v: "raw" | "preview") => any) | undefined;
8
8
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
9
  declare const _default: typeof __VLS_export;
10
10
  export default _default;
package/dist/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "packages/agent-chat"
12
12
  },
13
- "version": "0.12.52",
13
+ "version": "0.12.54",
14
14
  "engines": {
15
15
  "node": ">=22"
16
16
  },
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/state/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,KAAK,UAAU,EAAY,MAAM,0BAA0B,CAAA;AAEpE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAG/E,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,gCAAgC,CAAA;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAGvE,OAAO,EAAwB,KAAK,WAAW,EAAE,KAAK,SAAS,EAA+C,MAAM,IAAI,CAAA;AAExH,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAA0C,MAAM,KAAK,CAAA;AAE3G,OAAO,EAAE,KAAK,GAAG,EAAyC,MAAM,OAAO,CAAA;AAGvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,KAAK,EACV,gCAAgC,E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,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IACnD,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAmDD,wBAAgB,WAAW,CAAC,EAC1B,wBAAwB,EACxB,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,IAAI,EACJ,UAAU,EACV,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,UAAU,GACX,EAAE;IACD,wBAAwB,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC/D,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,MAAM,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,MAAM,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,MAAM,CAAA;IAC1B,qBAAqB,CAAC,EAAE,MAAM,MAAM,CAAA;IACpC,wBAAwB,CAAC,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IACnD,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACjC,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GAAG,KAAK,CAuNR;AAED,wBAAgB,QAAQ,UAQvB"}
@@ -15,7 +15,7 @@ import { apiReferenceConfigurationSchema } from "@scalar/schemas/api-reference";
15
15
  import { coerce } from "@scalar/validation";
16
16
  import { createWorkspaceStore } from "@scalar/workspace-store/client";
17
17
  import { createWorkspaceEventBus } from "@scalar/workspace-store/events";
18
- import { isAsyncApiDocument } from "@scalar/workspace-store/schemas/type-guards";
18
+ import { isAsyncApiDocument, isOpenApiDocument } from "@scalar/workspace-store/schemas/type-guards";
19
19
  import { DefaultChatTransport, lastAssistantMessageIsCompleteWithToolCalls } from "ai";
20
20
  import { n } from "neverpanic";
21
21
  //#region src/state/state.ts
@@ -34,12 +34,12 @@ function createChat({ registryDocuments, workspaceStore, baseUrl, getAccessToken
34
34
  }),
35
35
  onToolCall({ toolCall }) {
36
36
  if (toolCall.dynamic) return;
37
- if ((toolCall.toolName === "execute-request" || toolCall.toolName === "ask-for-authentication") && isAsyncApiDocument(workspaceStore.workspace.documents[toolCall.input.documentName])) {
37
+ if ((toolCall.toolName === "execute-request" || toolCall.toolName === "ask-for-authentication") && !isOpenApiDocument(workspaceStore.workspace.documents[toolCall.input.documentName])) {
38
38
  chat.addToolOutput({
39
39
  tool: toolCall.toolName,
40
40
  toolCallId: toolCall.toolCallId,
41
41
  state: "output-error",
42
- errorText: "Live AsyncAPI messaging and authentication are not supported in Ask AI. Ask for an explanation or code example instead."
42
+ errorText: isAsyncApiDocument(workspaceStore.workspace.documents[toolCall.input.documentName]) ? "Live AsyncAPI messaging and authentication are not supported in Ask AI. Ask for an explanation or code example instead." : "Requests and authentication require an OpenAPI document. This document format is not supported in Ask AI."
43
43
  });
44
44
  return;
45
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","names":[],"sources":["../../src/state/state.ts"],"sourcesContent":["import { Chat } from '@ai-sdk/vue'\nimport { type ModalState, useModal } from '@scalar/components/modal'\nimport { apiReferenceConfigurationSchema } from '@scalar/schemas/api-reference'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport { useToasts } from '@scalar/use-toasts'\nimport { coerce } from '@scalar/validation'\nimport { type WorkspaceStore, createWorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { createWorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { isAsyncApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { DefaultChatTransport, type UIDataTypes, type UIMessage, lastAssistantMessageIsCompleteWithToolCalls } from 'ai'\nimport { n } from 'neverpanic'\nimport { type ComputedRef, type InjectionKey, type Ref, computed, inject, reactive, ref, watch } from 'vue'\n\nimport { type Api, createApi, createAuthorizationHeaders } from '@/api'\nimport { URLS } from '@/consts/urls'\nimport { createError } from '@/entities'\nimport type { ApiMetadata } from '@/entities/registry/document'\nimport type {\n ASK_FOR_AUTHENTICATION_TOOL_NAME,\n AskForAuthenticationInput,\n} from '@/entities/tools/ask-for-authentication'\nimport {\n EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME,\n type ExecuteClientSideRequestToolInput,\n type ExecuteClientSideRequestToolOutput,\n} from '@/entities/tools/execute-request'\nimport type {\n GetOpenAPISpecsSummaryToolOutput,\n SUMMARIZE_OPENAPI_SPECS_TOOL_NAME,\n} from '@/entities/tools/get-openapi-specs-summary'\nimport type {\n SEARCH_OPENAPI_OPERATIONS_TOOL_NAME,\n SearchOpenAPIOperationsToolInput,\n SearchOpenAPIOperationsToolOutput,\n} from '@/entities/tools/search-openapi-operations'\nimport { useTermsAndConditions } from '@/hooks/use-term-and-conditions'\nimport { type UploadTmpDocumentState, removeTmpDocFromLocalStorage } from '@/hooks/use-upload-tmp-document'\nimport { persistencePlugin } from '@/plugins/persistance'\nimport { loadDocument } from '@/registry/add-documents-to-store'\nimport { createDocumentName } from '@/registry/create-document-name'\nimport type { ChatMode } from '@/types'\n\nexport type RegistryDocument = {\n namespace: string\n slug: string\n}\n\nexport type Tools = {\n [SEARCH_OPENAPI_OPERATIONS_TOOL_NAME]: {\n input: SearchOpenAPIOperationsToolInput\n output: SearchOpenAPIOperationsToolOutput\n }\n [EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME]: {\n input: ExecuteClientSideRequestToolInput\n output: ExecuteClientSideRequestToolOutput\n }\n [SUMMARIZE_OPENAPI_SPECS_TOOL_NAME]: {\n input: object\n output: GetOpenAPISpecsSummaryToolOutput\n }\n [ASK_FOR_AUTHENTICATION_TOOL_NAME]: {\n input: AskForAuthenticationInput\n output: unknown\n }\n}\n\nexport const STATE_SYMBOL: InjectionKey<State> = Symbol('STATE_SYMBOL')\n\nconst { toast } = useToasts()\n\ntype State = {\n pendingRequestIds: Ref<Set<string>>\n prompt: Ref<string>\n chat: Chat<UIMessage<unknown, UIDataTypes, Tools>>\n workspaceStore: WorkspaceStore\n loading: ComputedRef<boolean>\n settingsModal: ModalState\n eventBus: WorkspaceEventBus\n proxyUrl: ComputedRef<string>\n proxyUrlRaw: Ref<string | undefined>\n config: ComputedRef<ApiReferenceConfigurationRaw>\n registryUrl: string\n dashboardUrl: string\n baseUrl: string\n platformProxyUrl: string\n isLoggedIn?: Ref<boolean>\n registryDocuments: Ref<ApiMetadata[]>\n pendingDocuments: Record<string, boolean>\n mode: ChatMode\n terms: { accepted: Ref<boolean>; accept: () => void }\n addDocument: (document: { namespace: string; slug: string; removable?: boolean; tmp?: boolean }) => Promise<void>\n addDocumentAsync: (document: { namespace: string; slug: string; removable?: boolean }) => Promise<void>\n removeDocument: (document: { namespace: string; slug: string }) => void\n getAccessToken?: () => string\n getAgentKey?: () => string\n api: Api\n uploadState: Ref<UploadTmpDocumentState | undefined>\n uploadedTmpDocumentUrl: Ref<string | undefined>\n curatedDocuments: Ref<ApiMetadata[]>\n getActiveDocumentJson?: () => string\n getActiveDocumentContext?: () => string | undefined\n hideAddApi?: boolean\n}\n\nfunction createChat({\n registryDocuments,\n workspaceStore,\n baseUrl,\n getAccessToken,\n getAgentKey,\n}: {\n registryDocuments: Ref<ApiMetadata[]>\n workspaceStore: WorkspaceStore\n baseUrl: string\n getAccessToken?: () => string\n getAgentKey?: () => string\n}) {\n const chat = new Chat<UIMessage<unknown, UIDataTypes, Tools>>({\n sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithToolCalls,\n transport: new DefaultChatTransport({\n api: `${baseUrl}/vector/openapi/chat`,\n headers: () => createAuthorizationHeaders({ getAccessToken, getAgentKey }),\n body: () => ({\n registryDocuments: registryDocuments.value,\n }),\n }),\n onToolCall({ toolCall }): void {\n if (toolCall.dynamic) {\n return\n }\n\n if (\n (toolCall.toolName === EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME ||\n toolCall.toolName === 'ask-for-authentication') &&\n isAsyncApiDocument(workspaceStore.workspace.documents[toolCall.input.documentName])\n ) {\n // Tool callbacks run inside the stream queue; enqueue the result without waiting on that queue.\n void chat.addToolOutput({\n tool: toolCall.toolName,\n toolCallId: toolCall.toolCallId,\n state: 'output-error',\n errorText:\n 'Live AsyncAPI messaging and authentication are not supported in Ask AI. Ask for an explanation or code example instead.',\n })\n return\n }\n },\n })\n\n return chat\n}\n\nexport function createState({\n initialRegistryDocuments,\n registryUrl,\n dashboardUrl,\n platformProxyUrl,\n baseUrl,\n mode,\n isLoggedIn,\n getAccessToken,\n getAgentKey,\n getActiveDocumentJson,\n getActiveDocumentContext,\n prefilledMessageRef,\n hideAddApi,\n}: {\n initialRegistryDocuments: { namespace: string; slug: string }[]\n registryUrl: string\n dashboardUrl: string\n platformProxyUrl: string\n baseUrl: string\n mode: ChatMode\n isLoggedIn?: Ref<boolean>\n getAccessToken?: () => string\n getAgentKey?: () => string\n getActiveDocumentJson?: () => string\n getActiveDocumentContext?: () => string | undefined\n prefilledMessageRef?: Ref<string>\n hideAddApi?: boolean\n}): State {\n const prompt = ref<State['prompt']['value']>(prefilledMessageRef?.value ?? '')\n const registryDocuments = ref<ApiMetadata[]>([])\n const pendingDocuments = reactive<Record<string, boolean>>({})\n const curatedDocuments = ref<ApiMetadata[]>([])\n const proxyUrlRaw = ref<State['proxyUrlRaw']['value']>(URLS.DEFAULT_PROXY_URL)\n const proxyUrl = computed(() => proxyUrlRaw.value?.trim() || URLS.DEFAULT_PROXY_URL)\n const uploadedTmpDocumentUrl = ref<string>()\n const terms = useTermsAndConditions()\n\n const eventBus = createWorkspaceEventBus()\n const workspaceStore = createWorkspaceStore({\n plugins: [\n persistencePlugin({\n persistAuth: true,\n }),\n ],\n })\n\n const config = computed(() =>\n coerce(apiReferenceConfigurationSchema, {\n proxyUrl: proxyUrl.value,\n persistAuth: true,\n }),\n )\n\n const chat = createChat({\n registryDocuments,\n workspaceStore,\n baseUrl,\n getAccessToken,\n getAgentKey,\n })\n\n const api = createApi({\n baseUrl,\n getAccessToken,\n getAgentKey,\n })\n\n const loading = computed(\n () =>\n chat.status === 'submitted' ||\n (chat.status === 'streaming' && !chat.lastMessage?.parts.some((part) => part.type === 'text')),\n )\n\n watch(\n () => chat.status,\n () => {\n if (chat.status === 'streaming') {\n prompt.value = ''\n }\n },\n )\n\n if (prefilledMessageRef) {\n watch(prefilledMessageRef, (val) => {\n if (val) {\n prompt.value = val\n }\n })\n }\n\n const settingsModal = useModal()\n\n async function addDocument({\n namespace,\n slug,\n removable = true,\n tmp = false,\n }: {\n namespace: string\n slug: string\n removable?: boolean\n tmp?: boolean\n }) {\n const matchingDoc = registryDocuments.value.find((doc) => doc.namespace === namespace && doc.slug === slug)\n\n if (matchingDoc) {\n return\n }\n\n const identifier = `@${namespace}/${slug}`\n\n pendingDocuments[identifier] = true\n\n const loadDocumentResult = await loadDocument({\n namespace,\n slug,\n workspaceStore,\n registryUrl,\n registryDocuments,\n config: config.value,\n getAccessToken,\n api,\n removable,\n })\n\n pendingDocuments[identifier] = false\n\n if (!loadDocumentResult.success) {\n /**\n * If we are unable to load a document, we just remove it\n * from tmp local storage, do not warn the user.\n */\n if (tmp) {\n removeTmpDocFromLocalStorage()\n throw loadDocumentResult.error\n }\n\n console.warn('[AGENT]: Unable to load document', loadDocumentResult.error)\n toast(`Unable to load the document @${namespace}/${slug}`, 'warn')\n throw loadDocumentResult.error\n }\n }\n\n /**\n * Waits for document to be available in embeddings\n * and adds to the list\n */\n async function addDocumentAsync({\n namespace,\n slug,\n removable = true,\n }: {\n namespace: string\n slug: string\n removable?: boolean\n }) {\n const matchingDoc = registryDocuments.value.find((doc) => doc.namespace === namespace && doc.slug === slug)\n\n if (matchingDoc) {\n return\n }\n\n const identifier = `@${namespace}/${slug}`\n\n pendingDocuments[identifier] = true\n\n const embeddingStatusResponse = await n.fromUnsafe(\n () =>\n fetch(`${baseUrl}/vector/registry/embeddings/${namespace}/${slug}`, {\n method: 'GET',\n }),\n (originalError) => createError('FAILED_TO_GET_EMBEDDING_STATUS', originalError),\n )\n\n if (embeddingStatusResponse.success && embeddingStatusResponse.data.ok) {\n const loadDocumentResult = await loadDocument({\n namespace,\n slug,\n workspaceStore,\n registryUrl,\n registryDocuments,\n config: config.value,\n getAccessToken,\n api,\n removable,\n })\n\n if (!loadDocumentResult.success) {\n console.warn('[AGENT]: Unable to load document', loadDocumentResult.error)\n toast(`Unable to load the document @${namespace}/${slug}`, 'warn')\n }\n } else {\n console.warn('[AGENT]: Document could not be embedded')\n toast(`Unable to embed the document @${namespace}/${slug}`, 'warn')\n }\n\n pendingDocuments[identifier] = false\n }\n\n function removeDocument({ namespace, slug }: { namespace: string; slug: string }) {\n registryDocuments.value = registryDocuments.value.filter(\n (doc) => !(doc.namespace === namespace && doc.slug === slug),\n )\n\n workspaceStore.deleteDocument(createDocumentName(namespace, slug))\n }\n\n initialRegistryDocuments.forEach(({ namespace, slug }) => addDocument({ namespace, slug, removable: false }))\n\n return {\n pendingRequestIds: ref(new Set<string>()),\n prompt,\n chat,\n workspaceStore,\n eventBus,\n loading,\n settingsModal,\n config,\n registryUrl,\n dashboardUrl,\n platformProxyUrl,\n baseUrl,\n registryDocuments,\n pendingDocuments,\n proxyUrl,\n proxyUrlRaw,\n mode,\n terms,\n isLoggedIn,\n addDocument,\n addDocumentAsync,\n removeDocument,\n getAccessToken,\n getAgentKey,\n api,\n uploadState: ref<UploadTmpDocumentState>(),\n uploadedTmpDocumentUrl,\n curatedDocuments,\n getActiveDocumentJson,\n getActiveDocumentContext,\n hideAddApi,\n }\n}\n\nexport function useState() {\n const state = inject(STATE_SYMBOL)\n\n if (!state) {\n throw new Error('No state provided.')\n }\n\n return state\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmEA,IAAa,eAAoC,OAAO,cAAc;AAEtE,IAAM,EAAE,UAAU,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EA,IAAI,wBAAwB,WAAW,wBAAwB,KAAK,IAAI;GACtE,MAAM,qBAAqB,MAAM,aAAa;IAC5C;IACA;IACA;IACA;IACA;IACA,QAAQ,OAAO;IACf;IACA;IACA;GACF,CAAC;GAED,IAAI,CAAC,mBAAmB,SAAS;IAC/B,QAAQ,KAAK,oCAAoC,mBAAmB,KAAK;IACzE,MAAM,gCAAgC,UAAU,GAAG,QAAQ,MAAM;GACnE;EACF,OAAO;GACL,QAAQ,KAAK,yCAAyC;GACtD,MAAM,iCAAiC,UAAU,GAAG,QAAQ,MAAM;EACpE;EAEA,iBAAiB,cAAc;CACjC;CAEA,SAAS,eAAe,EAAE,WAAW,QAA6C;EAChF,kBAAkB,QAAQ,kBAAkB,MAAM,QAC/C,QAAQ,EAAE,IAAI,cAAc,aAAa,IAAI,SAAS,KACzD;EAEA,eAAe,eAAe,mBAAmB,WAAW,IAAI,CAAC;CACnE;CAEA,yBAAyB,SAAS,EAAE,WAAW,WAAW,YAAY;EAAE;EAAW;EAAM,WAAW;CAAM,CAAC,CAAC;CAE5G,OAAO;EACL,mBAAmB,oBAAI,IAAI,IAAY,CAAC;EACxC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,aAAa,IAA4B;EACzC;EACA;EACA;EACA;EACA;CACF;AACF;AAEA,SAAgB,WAAW;CACzB,MAAM,QAAQ,OAAO,YAAY;CAEjC,IAAI,CAAC,OACH,MAAM,IAAI,MAAM,oBAAoB;CAGtC,OAAO;AACT"}
1
+ {"version":3,"file":"state.js","names":[],"sources":["../../src/state/state.ts"],"sourcesContent":["import { Chat } from '@ai-sdk/vue'\nimport { type ModalState, useModal } from '@scalar/components/modal'\nimport { apiReferenceConfigurationSchema } from '@scalar/schemas/api-reference'\nimport type { ApiReferenceConfigurationRaw } from '@scalar/types/api-reference'\nimport { useToasts } from '@scalar/use-toasts'\nimport { coerce } from '@scalar/validation'\nimport { type WorkspaceStore, createWorkspaceStore } from '@scalar/workspace-store/client'\nimport type { WorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { createWorkspaceEventBus } from '@scalar/workspace-store/events'\nimport { isAsyncApiDocument, isOpenApiDocument } from '@scalar/workspace-store/schemas/type-guards'\nimport { DefaultChatTransport, type UIDataTypes, type UIMessage, lastAssistantMessageIsCompleteWithToolCalls } from 'ai'\nimport { n } from 'neverpanic'\nimport { type ComputedRef, type InjectionKey, type Ref, computed, inject, reactive, ref, watch } from 'vue'\n\nimport { type Api, createApi, createAuthorizationHeaders } from '@/api'\nimport { URLS } from '@/consts/urls'\nimport { createError } from '@/entities'\nimport type { ApiMetadata } from '@/entities/registry/document'\nimport type {\n ASK_FOR_AUTHENTICATION_TOOL_NAME,\n AskForAuthenticationInput,\n} from '@/entities/tools/ask-for-authentication'\nimport {\n EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME,\n type ExecuteClientSideRequestToolInput,\n type ExecuteClientSideRequestToolOutput,\n} from '@/entities/tools/execute-request'\nimport type {\n GetOpenAPISpecsSummaryToolOutput,\n SUMMARIZE_OPENAPI_SPECS_TOOL_NAME,\n} from '@/entities/tools/get-openapi-specs-summary'\nimport type {\n SEARCH_OPENAPI_OPERATIONS_TOOL_NAME,\n SearchOpenAPIOperationsToolInput,\n SearchOpenAPIOperationsToolOutput,\n} from '@/entities/tools/search-openapi-operations'\nimport { useTermsAndConditions } from '@/hooks/use-term-and-conditions'\nimport { type UploadTmpDocumentState, removeTmpDocFromLocalStorage } from '@/hooks/use-upload-tmp-document'\nimport { persistencePlugin } from '@/plugins/persistance'\nimport { loadDocument } from '@/registry/add-documents-to-store'\nimport { createDocumentName } from '@/registry/create-document-name'\nimport type { ChatMode } from '@/types'\n\nexport type RegistryDocument = {\n namespace: string\n slug: string\n}\n\nexport type Tools = {\n [SEARCH_OPENAPI_OPERATIONS_TOOL_NAME]: {\n input: SearchOpenAPIOperationsToolInput\n output: SearchOpenAPIOperationsToolOutput\n }\n [EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME]: {\n input: ExecuteClientSideRequestToolInput\n output: ExecuteClientSideRequestToolOutput\n }\n [SUMMARIZE_OPENAPI_SPECS_TOOL_NAME]: {\n input: object\n output: GetOpenAPISpecsSummaryToolOutput\n }\n [ASK_FOR_AUTHENTICATION_TOOL_NAME]: {\n input: AskForAuthenticationInput\n output: unknown\n }\n}\n\nexport const STATE_SYMBOL: InjectionKey<State> = Symbol('STATE_SYMBOL')\n\nconst { toast } = useToasts()\n\ntype State = {\n pendingRequestIds: Ref<Set<string>>\n prompt: Ref<string>\n chat: Chat<UIMessage<unknown, UIDataTypes, Tools>>\n workspaceStore: WorkspaceStore\n loading: ComputedRef<boolean>\n settingsModal: ModalState\n eventBus: WorkspaceEventBus\n proxyUrl: ComputedRef<string>\n proxyUrlRaw: Ref<string | undefined>\n config: ComputedRef<ApiReferenceConfigurationRaw>\n registryUrl: string\n dashboardUrl: string\n baseUrl: string\n platformProxyUrl: string\n isLoggedIn?: Ref<boolean>\n registryDocuments: Ref<ApiMetadata[]>\n pendingDocuments: Record<string, boolean>\n mode: ChatMode\n terms: { accepted: Ref<boolean>; accept: () => void }\n addDocument: (document: { namespace: string; slug: string; removable?: boolean; tmp?: boolean }) => Promise<void>\n addDocumentAsync: (document: { namespace: string; slug: string; removable?: boolean }) => Promise<void>\n removeDocument: (document: { namespace: string; slug: string }) => void\n getAccessToken?: () => string\n getAgentKey?: () => string\n api: Api\n uploadState: Ref<UploadTmpDocumentState | undefined>\n uploadedTmpDocumentUrl: Ref<string | undefined>\n curatedDocuments: Ref<ApiMetadata[]>\n getActiveDocumentJson?: () => string\n getActiveDocumentContext?: () => string | undefined\n hideAddApi?: boolean\n}\n\nfunction createChat({\n registryDocuments,\n workspaceStore,\n baseUrl,\n getAccessToken,\n getAgentKey,\n}: {\n registryDocuments: Ref<ApiMetadata[]>\n workspaceStore: WorkspaceStore\n baseUrl: string\n getAccessToken?: () => string\n getAgentKey?: () => string\n}) {\n const chat = new Chat<UIMessage<unknown, UIDataTypes, Tools>>({\n sendAutomaticallyWhen: lastAssistantMessageIsCompleteWithToolCalls,\n transport: new DefaultChatTransport({\n api: `${baseUrl}/vector/openapi/chat`,\n headers: () => createAuthorizationHeaders({ getAccessToken, getAgentKey }),\n body: () => ({\n registryDocuments: registryDocuments.value,\n }),\n }),\n onToolCall({ toolCall }): void {\n if (toolCall.dynamic) {\n return\n }\n\n if (\n (toolCall.toolName === EXECUTE_CLIENT_SIDE_REQUEST_TOOL_NAME ||\n toolCall.toolName === 'ask-for-authentication') &&\n !isOpenApiDocument(workspaceStore.workspace.documents[toolCall.input.documentName])\n ) {\n // Tool callbacks run inside the stream queue; enqueue the result without waiting on that queue.\n void chat.addToolOutput({\n tool: toolCall.toolName,\n toolCallId: toolCall.toolCallId,\n state: 'output-error',\n errorText: isAsyncApiDocument(workspaceStore.workspace.documents[toolCall.input.documentName])\n ? 'Live AsyncAPI messaging and authentication are not supported in Ask AI. Ask for an explanation or code example instead.'\n : 'Requests and authentication require an OpenAPI document. This document format is not supported in Ask AI.',\n })\n return\n }\n },\n })\n\n return chat\n}\n\nexport function createState({\n initialRegistryDocuments,\n registryUrl,\n dashboardUrl,\n platformProxyUrl,\n baseUrl,\n mode,\n isLoggedIn,\n getAccessToken,\n getAgentKey,\n getActiveDocumentJson,\n getActiveDocumentContext,\n prefilledMessageRef,\n hideAddApi,\n}: {\n initialRegistryDocuments: { namespace: string; slug: string }[]\n registryUrl: string\n dashboardUrl: string\n platformProxyUrl: string\n baseUrl: string\n mode: ChatMode\n isLoggedIn?: Ref<boolean>\n getAccessToken?: () => string\n getAgentKey?: () => string\n getActiveDocumentJson?: () => string\n getActiveDocumentContext?: () => string | undefined\n prefilledMessageRef?: Ref<string>\n hideAddApi?: boolean\n}): State {\n const prompt = ref<State['prompt']['value']>(prefilledMessageRef?.value ?? '')\n const registryDocuments = ref<ApiMetadata[]>([])\n const pendingDocuments = reactive<Record<string, boolean>>({})\n const curatedDocuments = ref<ApiMetadata[]>([])\n const proxyUrlRaw = ref<State['proxyUrlRaw']['value']>(URLS.DEFAULT_PROXY_URL)\n const proxyUrl = computed(() => proxyUrlRaw.value?.trim() || URLS.DEFAULT_PROXY_URL)\n const uploadedTmpDocumentUrl = ref<string>()\n const terms = useTermsAndConditions()\n\n const eventBus = createWorkspaceEventBus()\n const workspaceStore = createWorkspaceStore({\n plugins: [\n persistencePlugin({\n persistAuth: true,\n }),\n ],\n })\n\n const config = computed(() =>\n coerce(apiReferenceConfigurationSchema, {\n proxyUrl: proxyUrl.value,\n persistAuth: true,\n }),\n )\n\n const chat = createChat({\n registryDocuments,\n workspaceStore,\n baseUrl,\n getAccessToken,\n getAgentKey,\n })\n\n const api = createApi({\n baseUrl,\n getAccessToken,\n getAgentKey,\n })\n\n const loading = computed(\n () =>\n chat.status === 'submitted' ||\n (chat.status === 'streaming' && !chat.lastMessage?.parts.some((part) => part.type === 'text')),\n )\n\n watch(\n () => chat.status,\n () => {\n if (chat.status === 'streaming') {\n prompt.value = ''\n }\n },\n )\n\n if (prefilledMessageRef) {\n watch(prefilledMessageRef, (val) => {\n if (val) {\n prompt.value = val\n }\n })\n }\n\n const settingsModal = useModal()\n\n async function addDocument({\n namespace,\n slug,\n removable = true,\n tmp = false,\n }: {\n namespace: string\n slug: string\n removable?: boolean\n tmp?: boolean\n }) {\n const matchingDoc = registryDocuments.value.find((doc) => doc.namespace === namespace && doc.slug === slug)\n\n if (matchingDoc) {\n return\n }\n\n const identifier = `@${namespace}/${slug}`\n\n pendingDocuments[identifier] = true\n\n const loadDocumentResult = await loadDocument({\n namespace,\n slug,\n workspaceStore,\n registryUrl,\n registryDocuments,\n config: config.value,\n getAccessToken,\n api,\n removable,\n })\n\n pendingDocuments[identifier] = false\n\n if (!loadDocumentResult.success) {\n /**\n * If we are unable to load a document, we just remove it\n * from tmp local storage, do not warn the user.\n */\n if (tmp) {\n removeTmpDocFromLocalStorage()\n throw loadDocumentResult.error\n }\n\n console.warn('[AGENT]: Unable to load document', loadDocumentResult.error)\n toast(`Unable to load the document @${namespace}/${slug}`, 'warn')\n throw loadDocumentResult.error\n }\n }\n\n /**\n * Waits for document to be available in embeddings\n * and adds to the list\n */\n async function addDocumentAsync({\n namespace,\n slug,\n removable = true,\n }: {\n namespace: string\n slug: string\n removable?: boolean\n }) {\n const matchingDoc = registryDocuments.value.find((doc) => doc.namespace === namespace && doc.slug === slug)\n\n if (matchingDoc) {\n return\n }\n\n const identifier = `@${namespace}/${slug}`\n\n pendingDocuments[identifier] = true\n\n const embeddingStatusResponse = await n.fromUnsafe(\n () =>\n fetch(`${baseUrl}/vector/registry/embeddings/${namespace}/${slug}`, {\n method: 'GET',\n }),\n (originalError) => createError('FAILED_TO_GET_EMBEDDING_STATUS', originalError),\n )\n\n if (embeddingStatusResponse.success && embeddingStatusResponse.data.ok) {\n const loadDocumentResult = await loadDocument({\n namespace,\n slug,\n workspaceStore,\n registryUrl,\n registryDocuments,\n config: config.value,\n getAccessToken,\n api,\n removable,\n })\n\n if (!loadDocumentResult.success) {\n console.warn('[AGENT]: Unable to load document', loadDocumentResult.error)\n toast(`Unable to load the document @${namespace}/${slug}`, 'warn')\n }\n } else {\n console.warn('[AGENT]: Document could not be embedded')\n toast(`Unable to embed the document @${namespace}/${slug}`, 'warn')\n }\n\n pendingDocuments[identifier] = false\n }\n\n function removeDocument({ namespace, slug }: { namespace: string; slug: string }) {\n registryDocuments.value = registryDocuments.value.filter(\n (doc) => !(doc.namespace === namespace && doc.slug === slug),\n )\n\n workspaceStore.deleteDocument(createDocumentName(namespace, slug))\n }\n\n initialRegistryDocuments.forEach(({ namespace, slug }) => addDocument({ namespace, slug, removable: false }))\n\n return {\n pendingRequestIds: ref(new Set<string>()),\n prompt,\n chat,\n workspaceStore,\n eventBus,\n loading,\n settingsModal,\n config,\n registryUrl,\n dashboardUrl,\n platformProxyUrl,\n baseUrl,\n registryDocuments,\n pendingDocuments,\n proxyUrl,\n proxyUrlRaw,\n mode,\n terms,\n isLoggedIn,\n addDocument,\n addDocumentAsync,\n removeDocument,\n getAccessToken,\n getAgentKey,\n api,\n uploadState: ref<UploadTmpDocumentState>(),\n uploadedTmpDocumentUrl,\n curatedDocuments,\n getActiveDocumentJson,\n getActiveDocumentContext,\n hideAddApi,\n }\n}\n\nexport function useState() {\n const state = inject(STATE_SYMBOL)\n\n if (!state) {\n throw new Error('No state provided.')\n }\n\n return state\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmEA,IAAa,eAAoC,OAAO,cAAc;AAEtE,IAAM,EAAE,UAAU,UAAU;AAoC5B,SAAS,WAAW,EAClB,mBACA,gBACA,SACA,gBACA,eAOC;CACD,MAAM,OAAO,IAAI,KAA6C;EAC5D,uBAAuB;EACvB,WAAW,IAAI,qBAAqB;GAClC,KAAK,GAAG,QAAQ;GAChB,eAAe,2BAA2B;IAAE;IAAgB;GAAY,CAAC;GACzE,aAAa,EACX,mBAAmB,kBAAkB,MACvC;EACF,CAAC;EACD,WAAW,EAAE,YAAkB;GAC7B,IAAI,SAAS,SACX;GAGF,KACG,SAAS,aAAA,qBACR,SAAS,aAAa,6BACxB,CAAC,kBAAkB,eAAe,UAAU,UAAU,SAAS,MAAM,aAAa,GAClF;IAEA,KAAU,cAAc;KACtB,MAAM,SAAS;KACf,YAAY,SAAS;KACrB,OAAO;KACP,WAAW,mBAAmB,eAAe,UAAU,UAAU,SAAS,MAAM,aAAa,IACzF,4HACA;IACN,CAAC;IACD;GACF;EACF;CACF,CAAC;CAED,OAAO;AACT;AAEA,SAAgB,YAAY,EAC1B,0BACA,aACA,cACA,kBACA,SACA,MACA,YACA,gBACA,aACA,uBACA,0BACA,qBACA,cAeQ;CACR,MAAM,SAAS,IAA8B,qBAAqB,SAAS,EAAE;CAC7E,MAAM,oBAAoB,IAAmB,CAAC,CAAC;CAC/C,MAAM,mBAAmB,SAAkC,CAAC,CAAC;CAC7D,MAAM,mBAAmB,IAAmB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ACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,aAAa,IAA4B;EACzC;EACA;EACA;EACA;EACA;CACF;AACF;AAEA,SAAgB,WAAW;CACzB,MAAM,QAAQ,OAAO,YAAY;CAEjC,IAAI,CAAC,OACH,MAAM,IAAI,MAAM,oBAAoB;CAGtC,OAAO;AACT"}
package/dist/style.css CHANGED
@@ -175,6 +175,50 @@
175
175
  }
176
176
  }
177
177
 
178
+ .scalar-card {
179
+ --scalar-card-surface: var(--scalar-background-1);
180
+ --scalar-card-surface-raised: var(--scalar-background-2);
181
+ --scalar-card-surface-shadow: var(--scalar-shadow-1),
182
+ 0 0 0 var(--scalar-border-width) var(--scalar-border-color);
183
+ }
184
+
185
+ @supports (color: oklch(from white l c h)) {
186
+ .scalar-card {
187
+ --scalar-card-surface: oklch(from var(--scalar-background-2) calc(l + .055) c h);
188
+ --scalar-card-surface-raised: var(--scalar-card-surface);
189
+ }
190
+
191
+ @supports (color: color-mix(in lab, red, red)) {
192
+ .scalar-card {
193
+ --scalar-card-surface-raised: color-mix(in oklab,
194
+ var(--scalar-card-surface),
195
+ var(--scalar-color-1) 8%);
196
+ }
197
+ }
198
+ }
199
+
200
+ .scalar-card-content:where(:not(.scalar-card-header, .scalar-card-footer)) {
201
+ background: var(--scalar-card-surface);
202
+ border-radius: var(--scalar-radius-xl);
203
+ box-shadow: var(--scalar-card-surface-shadow);
204
+ }
205
+
206
+ :where(.scalar-card-content:not(.scalar-card-header, .scalar-card-footer)) + .scalar-card-content:where(:not(.scalar-card-header, .scalar-card-footer)) {
207
+ margin-top: 4px;
208
+ }
209
+
210
+ :where(.scalar-card-header, .scalar-card-footer) {
211
+ border-radius: var(--scalar-radius-xl);
212
+ }
213
+
214
+ :where(.scalar-card.p-1 > .scalar-card-header:first-child:not(:last-child)) {
215
+ margin-block: -2px 2px;
216
+ }
217
+
218
+ :where(.scalar-card.p-1 > .scalar-card-footer:last-child:not(:first-child)) {
219
+ margin-block: 2px -2px;
220
+ }
221
+
178
222
  .scalar-app .hljs-regexp, .scalar-app .hljs-string, .scalar-app .hljs-built_in, .scalar-app .hljs-subst, .scalar-app .hljs-name, .scalar-app .hljs-doctag, .scalar-app .hljs-section, .scalar-app .hljs-title {
179
223
  color: var(--scalar-color-blue);
180
224
  }
@@ -192,10 +236,18 @@
192
236
  background-color: var(--scalar-background-2);
193
237
  }
194
238
 
239
+ .scalar-code-block.bg-transparent .scalar-code-copy-backdrop {
240
+ background: var(--scalar-card-surface, transparent);
241
+ }
242
+
195
243
  .scalar-code-block.bg-b-2 .scalar-code-copy {
196
244
  background-color: var(--scalar-background-3);
197
245
  }
198
246
 
247
+ .scalar-code-block.bg-transparent .scalar-code-copy {
248
+ background: var(--scalar-card-surface-raised, var(--scalar-background-2));
249
+ }
250
+
199
251
  .toggle-icon-ellipse[data-v-8f507267] {
200
252
  background: var(--scalar-background-1);
201
253
  border-radius: 50%;
@@ -1876,18 +1928,18 @@
1876
1928
  }
1877
1929
  }
1878
1930
 
1879
- [data-v-321c6212] .code-input-lite__editor {
1931
+ [data-v-81035f01] .code-input-lite__editor {
1880
1932
  font-family: var(--scalar-font);
1881
1933
  font-size: var(--scalar-small);
1882
1934
  background-color: #0000;
1883
1935
  padding: 5px 8px;
1884
1936
  }
1885
1937
 
1886
- [data-v-321c6212] .scalar-pill:not(:last-of-type) {
1938
+ [data-v-81035f01] .scalar-pill:not(:last-of-type) {
1887
1939
  margin-right: .15em;
1888
1940
  }
1889
1941
 
1890
- [data-v-321c6212] .scalar-pill:not(:first-of-type) {
1942
+ [data-v-81035f01] .scalar-pill:not(:first-of-type) {
1891
1943
  margin-left: .5px;
1892
1944
  }
1893
1945
 
@@ -2122,58 +2174,58 @@ input[data-v-029a43f5]::placeholder {
2122
2174
  background: var(--scalar-background-2);
2123
2175
  }
2124
2176
 
2125
- [data-v-6edfa5a3] .cm-editor {
2177
+ [data-v-b5b0a654] .cm-editor {
2126
2178
  outline: none;
2127
2179
  width: 100%;
2128
2180
  height: 100%;
2129
2181
  }
2130
2182
 
2131
- [data-v-6edfa5a3] .cm-line {
2183
+ [data-v-b5b0a654] .cm-line {
2132
2184
  padding: 0;
2133
2185
  }
2134
2186
 
2135
- [data-v-6edfa5a3] .cm-content {
2187
+ [data-v-b5b0a654] .cm-content {
2136
2188
  font-size: var(--scalar-small);
2137
2189
  align-items: center;
2138
2190
  padding: 0;
2139
2191
  display: flex;
2140
2192
  }
2141
2193
 
2142
- .scroll-timeline-x[data-v-6edfa5a3] {
2194
+ .scroll-timeline-x[data-v-b5b0a654] {
2143
2195
  -ms-overflow-style: none;
2144
2196
  -webkit-mask-image: linear-gradient(to right, #0000 0, #000 6px calc(100% - 24px), #0000 100%);
2145
2197
  mask-image: linear-gradient(to right, #0000 0, #000 6px calc(100% - 24px), #0000 100%);
2146
2198
  }
2147
2199
 
2148
- .scroll-timeline-x-hidden[data-v-6edfa5a3] {
2200
+ .scroll-timeline-x-hidden[data-v-b5b0a654] {
2149
2201
  overflow-x: auto;
2150
2202
  }
2151
2203
 
2152
- .scroll-timeline-x-hidden[data-v-6edfa5a3] .cm-scroller {
2204
+ .scroll-timeline-x-hidden[data-v-b5b0a654] .cm-scroller {
2153
2205
  scrollbar-width: none;
2154
2206
  -ms-overflow-style: none;
2155
2207
  padding-right: 20px;
2156
2208
  overflow: auto;
2157
2209
  }
2158
2210
 
2159
- .scroll-timeline-x-hidden[data-v-6edfa5a3]::-webkit-scrollbar {
2211
+ .scroll-timeline-x-hidden[data-v-b5b0a654]::-webkit-scrollbar {
2160
2212
  width: 0;
2161
2213
  height: 0;
2162
2214
  display: none;
2163
2215
  }
2164
2216
 
2165
- .scroll-timeline-x-hidden[data-v-6edfa5a3] .cm-scroller::-webkit-scrollbar {
2217
+ .scroll-timeline-x-hidden[data-v-b5b0a654] .cm-scroller::-webkit-scrollbar {
2166
2218
  width: 0;
2167
2219
  height: 0;
2168
2220
  display: none;
2169
2221
  }
2170
2222
 
2171
- .scroll-timeline-x-address[data-v-6edfa5a3] {
2223
+ .scroll-timeline-x-address[data-v-b5b0a654] {
2172
2224
  scrollbar-width: none;
2173
2225
  line-height: 27px;
2174
2226
  }
2175
2227
 
2176
- .scroll-timeline-x-address[data-v-6edfa5a3]:after {
2228
+ .scroll-timeline-x-address[data-v-b5b0a654]:after {
2177
2229
  content: "";
2178
2230
  cursor: text;
2179
2231
  width: 24px;
@@ -2182,39 +2234,39 @@ input[data-v-029a43f5]::placeholder {
2182
2234
  right: 0;
2183
2235
  }
2184
2236
 
2185
- .address-bar-bg-states[data-v-6edfa5a3] {
2237
+ .address-bar-bg-states[data-v-b5b0a654] {
2186
2238
  --scalar-address-bar-bg: var(--scalar-background-1);
2187
2239
  }
2188
2240
 
2189
2241
  @supports (color: color-mix(in lab, red, red)) {
2190
- .address-bar-bg-states[data-v-6edfa5a3] {
2242
+ .address-bar-bg-states[data-v-b5b0a654] {
2191
2243
  --scalar-address-bar-bg: color-mix(in srgb,
2192
2244
  var(--scalar-background-1),
2193
2245
  var(--scalar-background-2));
2194
2246
  }
2195
2247
  }
2196
2248
 
2197
- .address-bar-bg-states[data-v-6edfa5a3] {
2249
+ .address-bar-bg-states[data-v-b5b0a654] {
2198
2250
  background: var(--scalar-address-bar-bg);
2199
2251
  }
2200
2252
 
2201
- .address-bar-bg-states[data-v-6edfa5a3]:has(.cm-focused) {
2253
+ .address-bar-bg-states[data-v-b5b0a654]:has(.cm-focused) {
2202
2254
  --scalar-address-bar-bg: var(--scalar-background-1);
2203
2255
  border-color: var(--scalar-border-color);
2204
2256
  outline-width: 1px;
2205
2257
  outline-style: solid;
2206
2258
  }
2207
2259
 
2208
- .address-bar-bg-states:has(.cm-focused) .fade-left[data-v-6edfa5a3], .address-bar-bg-states:has(.cm-focused) .fade-right[data-v-6edfa5a3] {
2260
+ .address-bar-bg-states:has(.cm-focused) .fade-left[data-v-b5b0a654], .address-bar-bg-states:has(.cm-focused) .fade-right[data-v-b5b0a654] {
2209
2261
  --scalar-address-bar-bg: var(--scalar-background-1);
2210
2262
  }
2211
2263
 
2212
- .app-exit-button[data-v-3a29d7a0] {
2264
+ .app-exit-button[data-v-6fb4c4d5] {
2213
2265
  color: #fff;
2214
2266
  background: #0000001a;
2215
2267
  }
2216
2268
 
2217
- .app-exit-button[data-v-3a29d7a0]:hover {
2269
+ .app-exit-button[data-v-6fb4c4d5]:hover {
2218
2270
  background: #ffffff1a;
2219
2271
  }
2220
2272
 
@@ -2582,6 +2634,10 @@ input[data-v-029a43f5]::placeholder {
2582
2634
  order: 9999;
2583
2635
  }
2584
2636
 
2637
+ .scalar-app .col-span-2 {
2638
+ grid-column: span 2 / span 2;
2639
+ }
2640
+
2585
2641
  .scalar-app .col-span-full {
2586
2642
  grid-column: 1 / -1;
2587
2643
  }
@@ -2863,6 +2919,10 @@ input[data-v-029a43f5]::placeholder {
2863
2919
  max-height: fit-content;
2864
2920
  }
2865
2921
 
2922
+ .scalar-app .max-h-none {
2923
+ max-height: none;
2924
+ }
2925
+
2866
2926
  .scalar-app .max-h-radix-popper {
2867
2927
  max-height: calc(var(--radix-popper-available-height) - 8px);
2868
2928
  }
@@ -3111,6 +3171,10 @@ input[data-v-029a43f5]::placeholder {
3111
3171
  resize: vertical;
3112
3172
  }
3113
3173
 
3174
+ .scalar-app .list-none {
3175
+ list-style-type: none;
3176
+ }
3177
+
3114
3178
  .scalar-app .appearance-none {
3115
3179
  appearance: none;
3116
3180
  }
@@ -3639,7 +3703,15 @@ input[data-v-029a43f5]::placeholder {
3639
3703
  text-wrap: wrap;
3640
3704
  }
3641
3705
 
3642
- .scalar-app .break-words, .scalar-app .wrap-break-word {
3706
+ .scalar-app .break-words {
3707
+ overflow-wrap: break-word;
3708
+ }
3709
+
3710
+ .scalar-app .wrap-anywhere {
3711
+ overflow-wrap: anywhere;
3712
+ }
3713
+
3714
+ .scalar-app .wrap-break-word {
3643
3715
  overflow-wrap: break-word;
3644
3716
  }
3645
3717
 
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "packages/agent-chat"
12
12
  },
13
- "version": "0.12.52",
13
+ "version": "0.12.54",
14
14
  "engines": {
15
15
  "node": ">=22"
16
16
  },
@@ -45,34 +45,34 @@
45
45
  "dist"
46
46
  ],
47
47
  "dependencies": {
48
- "@ai-sdk/vue": "4.0.142",
49
- "@scalar/api-client": "3.25.1",
50
- "@scalar/components": "0.34.1",
51
- "@scalar/helpers": "0.18.0",
52
- "@scalar/icons": "0.7.8",
53
- "@scalar/json-magic": "0.19.1",
54
- "@scalar/openapi-types": "0.9.9",
55
- "@scalar/schemas": "0.17.1",
56
- "@scalar/themes": "0.20.0",
57
- "@scalar/types": "0.28.1",
58
- "@scalar/use-toasts": "0.10.6",
59
- "@scalar/validation": "0.6.7",
60
- "@scalar/workspace-store": "0.71.1",
48
+ "@ai-sdk/vue": "4.0.171",
49
+ "@scalar/api-client": "3.27.0",
50
+ "@scalar/components": "0.35.1",
51
+ "@scalar/helpers": "0.18.1",
52
+ "@scalar/icons": "0.7.10",
53
+ "@scalar/json-magic": "0.20.1",
54
+ "@scalar/openapi-types": "0.9.10",
55
+ "@scalar/schemas": "0.18.1",
56
+ "@scalar/themes": "0.20.2",
57
+ "@scalar/types": "0.30.0",
58
+ "@scalar/use-toasts": "0.10.8",
59
+ "@scalar/validation": "0.6.9",
60
+ "@scalar/workspace-store": "0.73.0",
61
61
  "@vueuse/core": "15.0.0",
62
- "ai": "7.0.142",
62
+ "ai": "7.0.171",
63
63
  "js-base64": "^3.9.4",
64
64
  "neverpanic": "0.0.8",
65
65
  "truncate-json": "3.0.1",
66
66
  "vue": "^3.5.44"
67
67
  },
68
68
  "devDependencies": {
69
- "@scalar/sidebar": "0.12.9",
69
+ "@scalar/sidebar": "0.12.11",
70
70
  "@tailwindcss/cli": "^4.3.3",
71
71
  "@tailwindcss/vite": "^4.3.3",
72
72
  "@types/jsdom": "30.0.0",
73
73
  "@vitejs/plugin-vue": "^6.0.10",
74
74
  "@vue/test-utils": "2.5.1",
75
- "hono": "^4.13.13",
75
+ "hono": "^4.13.16",
76
76
  "jsdom": "30.1.3",
77
77
  "tailwindcss": "^4.3.3",
78
78
  "vite": "8.3.4",