@alauda/doom 1.12.6 → 1.12.7
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.
|
@@ -3,7 +3,7 @@ import { clsx } from 'clsx';
|
|
|
3
3
|
import { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { Tooltip } from 'react-tooltip';
|
|
5
5
|
import { ApiMethod, interceptors, ResponseError, xfetch, } from 'x-fetch';
|
|
6
|
-
import { useCloudAuth } from "../context.js";
|
|
6
|
+
import { getCloudAuth, useCloudAuth } from "../context.js";
|
|
7
7
|
import { Chat } from "./Chat/index.js";
|
|
8
8
|
import { Preamble } from "./Preamble/index.js";
|
|
9
9
|
import { ResizableUserInput } from "./ResizableUserInput/index.js";
|
|
@@ -132,7 +132,7 @@ export const AIAssistant = ({ open, onOpenChange }) => {
|
|
|
132
132
|
await onSend_(content);
|
|
133
133
|
}
|
|
134
134
|
catch {
|
|
135
|
-
if (!
|
|
135
|
+
if (!isLoggedIn(getCloudAuth())) {
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
138
|
flushMessages((messages) => {
|
|
@@ -14,6 +14,7 @@ export interface CloudAuthContext {
|
|
|
14
14
|
}
|
|
15
15
|
export declare const CloudAuthContext: import("react").Context<CloudAuthContext>;
|
|
16
16
|
export declare const useCloudAuth: () => CloudAuthContext;
|
|
17
|
+
export declare const getCloudAuth: () => CloudAuth | null;
|
|
17
18
|
export declare const CloudAuthProvider: ({ children }: {
|
|
18
19
|
children: ReactNode;
|
|
19
20
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { CLOUD_AUTH_ORIGIN_KEY, CLOUD_AUTH_TOKEN_KEY } from './constants.js';
|
|
|
4
4
|
import { getAuthInfoFromToken, setLocalStorage } from './utils.js';
|
|
5
5
|
export const CloudAuthContext = createContext(null);
|
|
6
6
|
export const useCloudAuth = () => use(CloudAuthContext);
|
|
7
|
-
const getCloudAuth = () => {
|
|
7
|
+
export const getCloudAuth = () => {
|
|
8
8
|
const origin = localStorage.getItem(CLOUD_AUTH_ORIGIN_KEY);
|
|
9
9
|
const token = localStorage.getItem(CLOUD_AUTH_TOKEN_KEY);
|
|
10
10
|
if (origin == null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alauda/doom",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Doctor Doom making docs.",
|
|
6
6
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@alauda/doom-export": "^0.1.0",
|
|
44
44
|
"@cspell/eslint-plugin": "^8.19.4 || ^9.2.1",
|
|
45
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
45
|
+
"@eslint-react/eslint-plugin": "^1.53.0",
|
|
46
46
|
"@inquirer/prompts": "^7.8.4",
|
|
47
47
|
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
|
|
48
48
|
"@playwright/browser-chromium": "^1.55.0",
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"@rsbuild/plugin-sass": "^1.4.0",
|
|
51
51
|
"@rsbuild/plugin-svgr": "^1.2.2",
|
|
52
52
|
"@rsbuild/plugin-yaml": "^1.0.3",
|
|
53
|
-
"@rspress/core": "2.0.0-beta.
|
|
54
|
-
"@rspress/plugin-algolia": "2.0.0-beta.
|
|
55
|
-
"@rspress/plugin-llms": "2.0.0-beta.
|
|
56
|
-
"@rspress/plugin-sitemap": "2.0.0-beta.
|
|
57
|
-
"@rspress/shared": "2.0.0-beta.
|
|
53
|
+
"@rspress/core": "2.0.0-beta.31",
|
|
54
|
+
"@rspress/plugin-algolia": "2.0.0-beta.31",
|
|
55
|
+
"@rspress/plugin-llms": "2.0.0-beta.31",
|
|
56
|
+
"@rspress/plugin-sitemap": "2.0.0-beta.31",
|
|
57
|
+
"@rspress/shared": "2.0.0-beta.31",
|
|
58
58
|
"@shikijs/transformers": "^3.12.2",
|
|
59
59
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
60
60
|
"ab64": "^0.1.6",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"mdast-util-to-markdown": "^2.1.2",
|
|
76
76
|
"mdast-util-to-string": "^4.0.0",
|
|
77
77
|
"mermaid": "^11.10.1",
|
|
78
|
-
"openai": "
|
|
78
|
+
"openai": "^5.19.1",
|
|
79
79
|
"openapi-types": "^12.1.3",
|
|
80
80
|
"p-ratelimit": "^1.0.1",
|
|
81
81
|
"picomatch": "^4.0.3",
|