@sqlrooms/ai 0.18.1 → 0.19.1
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/components/AnalysisResultsContainer.d.ts.map +1 -1
- package/dist/components/AnalysisResultsContainer.js +2 -2
- package/dist/components/AnalysisResultsContainer.js.map +1 -1
- package/dist/components/tools/ToolResult.js +2 -2
- package/dist/components/tools/ToolResult.js.map +1 -1
- package/dist/schemas.d.ts +22 -22
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalysisResultsContainer.d.ts","sourceRoot":"","sources":["../../src/components/AnalysisResultsContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAe,MAAM,OAAO,CAAC;AAKpC,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,
|
|
1
|
+
{"version":3,"file":"AnalysisResultsContainer.d.ts","sourceRoot":"","sources":["../../src/components/AnalysisResultsContainer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAe,MAAM,OAAO,CAAC;AAKpC,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAoDA,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn, SkeletonPane } from '@sqlrooms/ui';
|
|
2
|
+
import { cn, ScrollArea, ScrollBar, SkeletonPane } from '@sqlrooms/ui';
|
|
3
3
|
import { ChevronDown } from 'lucide-react';
|
|
4
4
|
import { useRef } from 'react';
|
|
5
5
|
import { useStoreWithAi } from '../AiSlice';
|
|
@@ -21,6 +21,6 @@ export const AnalysisResultsContainer = ({ className }) => {
|
|
|
21
21
|
deleteAnalysisResult(currentSession.id, id);
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
return (_jsxs("div", { className: cn('relative flex h-full w-full flex-col', className), children: [_jsxs(
|
|
24
|
+
return (_jsxs("div", { className: cn('relative flex h-full w-full flex-col', className), children: [_jsxs(ScrollArea, { ref: containerRef, className: "flex w-full flex-grow flex-col gap-5", children: [currentSession?.analysisResults.map((result) => (_jsx(AnalysisResult, { result: result, onDeleteAnalysisResult: onDeleteAnalysisResult }, result.id))), isRunningAnalysis && _jsx(SkeletonPane, { className: "p-4" }), _jsx("div", { ref: endRef, className: "h-10 w-full shrink-0" }), _jsx(ScrollBar, { orientation: "vertical" }), _jsx(ScrollBar, { orientation: "horizontal" })] }), _jsx("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 flex justify-center", children: _jsx("button", { onClick: scrollToBottom, className: cn('bg-primary hover:bg-primary/90 text-primary-foreground pointer-events-auto z-50', 'mb-6 translate-y-4 rounded-full p-2 opacity-0 shadow-md transition-all duration-200', showScrollButton && 'translate-y-0 opacity-100'), "aria-label": "Scroll to bottom", children: _jsx(ChevronDown, { className: "h-5 w-5" }) }) })] }));
|
|
25
25
|
};
|
|
26
26
|
//# sourceMappingURL=AnalysisResultsContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnalysisResultsContainer.js","sourceRoot":"","sources":["../../src/components/AnalysisResultsContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,EAAE,EAAE,YAAY,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"AnalysisResultsContainer.js","sourceRoot":"","sources":["../../src/components/AnalysisResultsContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAC,MAAM,cAAc,CAAC;AACrE,OAAO,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AACzC,OAAc,EAAC,MAAM,EAAC,MAAM,OAAO,CAAC;AACpC,OAAO,EAAC,cAAc,EAAC,MAAM,YAAY,CAAC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AE,sBAAsB,IAFzC,MAAM,CAAC,EAAE,CAGd,CACH,CAAC,EACD,iBAAiB,IAAI,KAAC,YAAY,IAAC,SAAS,EAAC,KAAK,GAAG,EACtD,cAAK,GAAG,EAAE,MAAM,EAAE,SAAS,EAAC,sBAAsB,GAAG,EACrD,KAAC,SAAS,IAAC,WAAW,EAAC,UAAU,GAAG,EACpC,KAAC,SAAS,IAAC,WAAW,EAAC,YAAY,GAAG,IAC3B,EACb,cAAK,SAAS,EAAC,qEAAqE,YAClF,iBACE,OAAO,EAAE,cAAc,EACvB,SAAS,EAAE,EAAE,CACX,iFAAiF,EACjF,qFAAqF,EACrF,gBAAgB,IAAI,2BAA2B,CAChD,gBACU,kBAAkB,YAE7B,KAAC,WAAW,IAAC,SAAS,EAAC,SAAS,GAAG,GAC5B,GACL,IACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {cn, ScrollArea, ScrollBar, SkeletonPane} from '@sqlrooms/ui';\nimport {ChevronDown} from 'lucide-react';\nimport React, {useRef} from 'react';\nimport {useStoreWithAi} from '../AiSlice';\nimport {useScrollToBottom} from '../hooks/useScrollToBottom';\nimport {AnalysisResult} from './AnalysisResult';\n\nexport const AnalysisResultsContainer: React.FC<{\n className?: string;\n}> = ({className}) => {\n const isRunningAnalysis = useStoreWithAi((s) => s.ai.isRunningAnalysis);\n const currentSession = useStoreWithAi((s) => s.ai.getCurrentSession());\n const deleteAnalysisResult = useStoreWithAi((s) => s.ai.deleteAnalysisResult);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const endRef = useRef<HTMLDivElement>(null);\n const {showScrollButton, scrollToBottom} = useScrollToBottom({\n containerRef,\n endRef,\n dataToObserve: currentSession?.analysisResults,\n });\n\n const onDeleteAnalysisResult = (id: string) => {\n if (currentSession) {\n deleteAnalysisResult(currentSession.id, id);\n }\n };\n\n return (\n <div className={cn('relative flex h-full w-full flex-col', className)}>\n <ScrollArea\n ref={containerRef}\n className=\"flex w-full flex-grow flex-col gap-5\"\n >\n {currentSession?.analysisResults.map((result) => (\n <AnalysisResult\n key={result.id}\n result={result}\n onDeleteAnalysisResult={onDeleteAnalysisResult}\n />\n ))}\n {isRunningAnalysis && <SkeletonPane className=\"p-4\" />}\n <div ref={endRef} className=\"h-10 w-full shrink-0\" />\n <ScrollBar orientation=\"vertical\" />\n <ScrollBar orientation=\"horizontal\" />\n </ScrollArea>\n <div className=\"pointer-events-none absolute inset-x-0 bottom-0 flex justify-center\">\n <button\n onClick={scrollToBottom}\n className={cn(\n 'bg-primary hover:bg-primary/90 text-primary-foreground pointer-events-auto z-50',\n 'mb-6 translate-y-4 rounded-full p-2 opacity-0 shadow-md transition-all duration-200',\n showScrollButton && 'translate-y-0 opacity-100',\n )}\n aria-label=\"Scroll to bottom\"\n >\n <ChevronDown className=\"h-5 w-5\" />\n </button>\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { JsonMonacoEditor } from '@sqlrooms/monaco-editor';
|
|
3
3
|
import { Button, useDisclosure } from '@sqlrooms/ui';
|
|
4
|
-
import {
|
|
4
|
+
import { TriangleAlertIcon } from 'lucide-react';
|
|
5
5
|
import { useStoreWithAi } from '../../AiSlice';
|
|
6
6
|
import { MessageContainer } from '../MessageContainer';
|
|
7
7
|
import { ToolCallErrorBoundary } from './ToolResultErrorBoundary';
|
|
@@ -22,7 +22,7 @@ export const ToolResult = ({ toolCallMessage, errorMessage, }) => {
|
|
|
22
22
|
llmResult,
|
|
23
23
|
additionalData,
|
|
24
24
|
isCompleted,
|
|
25
|
-
}, children: [_jsx("div", { className: "text-sm text-gray-500", children: reason && _jsx("span", { children: reason }) }), ToolComponent && isSuccess && isCompleted && (_jsx(ToolCallErrorBoundary, { children: typeof ToolComponent === 'function' ? (_jsx(ToolComponent, { ...llmResult, ...additionalData })) : (ToolComponent) })), isCompleted && (errorMessage || !isSuccess) && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(
|
|
25
|
+
}, children: [_jsx("div", { className: "text-sm text-gray-500", children: reason && _jsx("span", { children: reason }) }), ToolComponent && isSuccess && isCompleted && (_jsx(ToolCallErrorBoundary, { children: typeof ToolComponent === 'function' ? (_jsx(ToolComponent, { ...llmResult, ...additionalData })) : (ToolComponent) })), isCompleted && (errorMessage || !isSuccess) && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Button, { className: "w-fit", variant: "ghost", size: "xs", onClick: () => toggleShowDetails(), children: _jsxs("p", { className: "flex items-center gap-2 text-xs text-orange-500", children: [_jsx(TriangleAlertIcon, {}), "Tool call failed"] }) }), showDetails && (_jsx("div", { className: "h-[300px] w-full overflow-hidden rounded-md border", children: _jsx(JsonMonacoEditor, { value: toolCallMessage, readOnly: true, options: {
|
|
26
26
|
lineNumbers: false,
|
|
27
27
|
minimap: { enabled: false },
|
|
28
28
|
scrollBeyondLastLine: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolResult.js","sourceRoot":"","sources":["../../../src/components/tools/ToolResult.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,cAAc,CAAC;AACnD,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"ToolResult.js","sourceRoot":"","sources":["../../../src/components/tools/ToolResult.tsx"],"names":[],"mappings":";AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,cAAc,CAAC;AACnD,OAAO,EAAC,iBAAiB,EAAC,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BA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AAC,YAAY,IAAI,CAAC,SAAS,CAAC,IAAI,CAC9C,eAAK,SAAS,EAAC,qBAAqB,aAClC,KAAC,MAAM,IACL,SAAS,EAAC,OAAO,EACjB,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,EAAE,YAElC,aAAG,SAAS,EAAC,iDAAiD,aAC5D,KAAC,iBAAiB,KAAG,wBAEnB,GACG,EACR,WAAW,IAAI,CACd,cAAK,SAAS,EAAC,oDAAoD,YACjE,KAAC,gBAAgB,IACf,KAAK,EAAE,eAAe,EACtB,QAAQ,EAAE,IAAI,EACd,OAAO,EAAE;gCACP,WAAW,EAAE,KAAK;gCAClB,OAAO,EAAE,EAAC,OAAO,EAAE,KAAK,EAAC;gCACzB,oBAAoB,EAAE,KAAK;gCAC3B,QAAQ,EAAE,IAAI;6BACf,GACD,GACE,CACP,IACG,CACP,IACgB,CACpB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {ToolCallMessage} from '@openassistant/core';\nimport {JsonMonacoEditor} from '@sqlrooms/monaco-editor';\nimport {Button, useDisclosure} from '@sqlrooms/ui';\nimport {TriangleAlertIcon} from 'lucide-react';\nimport React from 'react';\nimport {useStoreWithAi} from '../../AiSlice';\nimport {MessageContainer} from '../MessageContainer';\nimport {ToolCallErrorBoundary} from './ToolResultErrorBoundary';\n\ntype ToolResultProps = {\n toolCallMessage: ToolCallMessage;\n errorMessage?: string;\n};\n\nexport const ToolResult: React.FC<ToolResultProps> = ({\n toolCallMessage,\n errorMessage,\n}) => {\n const {isOpen: showDetails, onToggle: toggleShowDetails} =\n useDisclosure(false);\n const {toolName, args, llmResult, additionalData, text, isCompleted} =\n toolCallMessage;\n\n const ToolComponent = useStoreWithAi((state) =>\n state.ai.findToolComponent(toolName),\n );\n\n // check if args has a property called 'reason'\n const reason = args.reasoning as string;\n\n // check if llmResult is an object and has a success property\n const isSuccess =\n typeof llmResult === 'object' &&\n llmResult !== null &&\n 'success' in llmResult &&\n llmResult.success === true;\n\n return !isCompleted ? (\n <div className=\"text-sm text-gray-500\">{text}</div>\n ) : (\n <MessageContainer\n isSuccess={isSuccess}\n type={toolName}\n content={{\n toolName,\n args,\n llmResult,\n additionalData,\n isCompleted,\n }}\n >\n <div className=\"text-sm text-gray-500\">\n {reason && <span>{reason}</span>}\n </div>\n {ToolComponent && isSuccess && isCompleted && (\n <ToolCallErrorBoundary>\n {typeof ToolComponent === 'function' ? (\n <ToolComponent\n {...(llmResult as Record<string, unknown>)}\n {...(additionalData as Record<string, unknown>)}\n />\n ) : (\n ToolComponent\n )}\n </ToolCallErrorBoundary>\n )}\n {isCompleted && (errorMessage || !isSuccess) && (\n <div className=\"flex flex-col gap-2\">\n <Button\n className=\"w-fit\"\n variant=\"ghost\"\n size=\"xs\"\n onClick={() => toggleShowDetails()}\n >\n <p className=\"flex items-center gap-2 text-xs text-orange-500\">\n <TriangleAlertIcon />\n Tool call failed\n </p>\n </Button>\n {showDetails && (\n <div className=\"h-[300px] w-full overflow-hidden rounded-md border\">\n <JsonMonacoEditor\n value={toolCallMessage}\n readOnly={true}\n options={{\n lineNumbers: false,\n minimap: {enabled: false},\n scrollBeyondLastLine: false,\n wordWrap: 'on',\n }}\n />\n </div>\n )}\n </div>\n )}\n </MessageContainer>\n );\n};\n"]}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ export declare const QueryToolParameters: z.ZodObject<{
|
|
|
4
4
|
sqlQuery: z.ZodString;
|
|
5
5
|
reasoning: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
type: "query";
|
|
8
7
|
sqlQuery: string;
|
|
8
|
+
type: "query";
|
|
9
9
|
reasoning: string;
|
|
10
10
|
}, {
|
|
11
|
-
type: "query";
|
|
12
11
|
sqlQuery: string;
|
|
12
|
+
type: "query";
|
|
13
13
|
reasoning: string;
|
|
14
14
|
}>;
|
|
15
15
|
export type QueryToolParameters = z.infer<typeof QueryToolParameters>;
|
|
@@ -23,28 +23,28 @@ export declare const ToolCallSchema: z.ZodObject<{
|
|
|
23
23
|
sqlQuery: z.ZodString;
|
|
24
24
|
reasoning: z.ZodString;
|
|
25
25
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
type: "query";
|
|
27
26
|
sqlQuery: string;
|
|
27
|
+
type: "query";
|
|
28
28
|
reasoning: string;
|
|
29
29
|
}, {
|
|
30
|
-
type: "query";
|
|
31
30
|
sqlQuery: string;
|
|
31
|
+
type: "query";
|
|
32
32
|
reasoning: string;
|
|
33
33
|
}>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
35
|
toolName: string;
|
|
36
36
|
toolCallId: string;
|
|
37
37
|
args: {
|
|
38
|
-
type: "query";
|
|
39
38
|
sqlQuery: string;
|
|
39
|
+
type: "query";
|
|
40
40
|
reasoning: string;
|
|
41
41
|
};
|
|
42
42
|
}, {
|
|
43
43
|
toolName: string;
|
|
44
44
|
toolCallId: string;
|
|
45
45
|
args: {
|
|
46
|
-
type: "query";
|
|
47
46
|
sqlQuery: string;
|
|
47
|
+
type: "query";
|
|
48
48
|
reasoning: string;
|
|
49
49
|
};
|
|
50
50
|
}>;
|
|
@@ -54,13 +54,13 @@ export declare const QueryResultElementSchema: z.ZodObject<{
|
|
|
54
54
|
title: z.ZodString;
|
|
55
55
|
sqlQuery: z.ZodString;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
type: "query-result";
|
|
58
|
-
sqlQuery: string;
|
|
59
57
|
title: string;
|
|
60
|
-
}, {
|
|
61
|
-
type: "query-result";
|
|
62
58
|
sqlQuery: string;
|
|
59
|
+
type: "query-result";
|
|
60
|
+
}, {
|
|
63
61
|
title: string;
|
|
62
|
+
sqlQuery: string;
|
|
63
|
+
type: "query-result";
|
|
64
64
|
}>;
|
|
65
65
|
export type QueryResultElementSchema = z.infer<typeof QueryResultElementSchema>;
|
|
66
66
|
export declare const ElementSchema: z.ZodUnion<[z.ZodObject<{
|
|
@@ -68,13 +68,13 @@ export declare const ElementSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
68
68
|
title: z.ZodString;
|
|
69
69
|
sqlQuery: z.ZodString;
|
|
70
70
|
}, "strip", z.ZodTypeAny, {
|
|
71
|
-
type: "query-result";
|
|
72
|
-
sqlQuery: string;
|
|
73
71
|
title: string;
|
|
74
|
-
}, {
|
|
75
|
-
type: "query-result";
|
|
76
72
|
sqlQuery: string;
|
|
73
|
+
type: "query-result";
|
|
74
|
+
}, {
|
|
77
75
|
title: string;
|
|
76
|
+
sqlQuery: string;
|
|
77
|
+
type: "query-result";
|
|
78
78
|
}>, z.ZodString]>;
|
|
79
79
|
export type ElementSchema = z.infer<typeof ElementSchema>;
|
|
80
80
|
export declare const ToolCallMessageSchema: z.ZodObject<{
|
|
@@ -84,27 +84,27 @@ export declare const ToolCallMessageSchema: z.ZodObject<{
|
|
|
84
84
|
title: z.ZodString;
|
|
85
85
|
sqlQuery: z.ZodString;
|
|
86
86
|
}, "strip", z.ZodTypeAny, {
|
|
87
|
-
type: "query-result";
|
|
88
|
-
sqlQuery: string;
|
|
89
87
|
title: string;
|
|
90
|
-
}, {
|
|
91
|
-
type: "query-result";
|
|
92
88
|
sqlQuery: string;
|
|
89
|
+
type: "query-result";
|
|
90
|
+
}, {
|
|
93
91
|
title: string;
|
|
92
|
+
sqlQuery: string;
|
|
93
|
+
type: "query-result";
|
|
94
94
|
}>, z.ZodString]>;
|
|
95
95
|
}, "strip", z.ZodTypeAny, {
|
|
96
96
|
toolCallId: string;
|
|
97
97
|
element: string | {
|
|
98
|
-
type: "query-result";
|
|
99
|
-
sqlQuery: string;
|
|
100
98
|
title: string;
|
|
99
|
+
sqlQuery: string;
|
|
100
|
+
type: "query-result";
|
|
101
101
|
};
|
|
102
102
|
}, {
|
|
103
103
|
toolCallId: string;
|
|
104
104
|
element: string | {
|
|
105
|
-
type: "query-result";
|
|
106
|
-
sqlQuery: string;
|
|
107
105
|
title: string;
|
|
106
|
+
sqlQuery: string;
|
|
107
|
+
type: "query-result";
|
|
108
108
|
};
|
|
109
109
|
}>;
|
|
110
110
|
export type ToolCallMessageSchema = z.infer<typeof ToolCallMessageSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sqlrooms/ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"@ai-sdk/provider": "^1.1.3",
|
|
22
22
|
"@openassistant/core": "^0.2.7",
|
|
23
23
|
"@paralleldrive/cuid2": "^2.2.2",
|
|
24
|
-
"@sqlrooms/data-table": "0.
|
|
25
|
-
"@sqlrooms/duckdb": "0.
|
|
26
|
-
"@sqlrooms/monaco-editor": "0.
|
|
27
|
-
"@sqlrooms/room-config": "0.
|
|
28
|
-
"@sqlrooms/room-shell": "0.
|
|
29
|
-
"@sqlrooms/ui": "0.
|
|
30
|
-
"@sqlrooms/utils": "0.
|
|
24
|
+
"@sqlrooms/data-table": "0.19.1",
|
|
25
|
+
"@sqlrooms/duckdb": "0.19.1",
|
|
26
|
+
"@sqlrooms/monaco-editor": "0.19.1",
|
|
27
|
+
"@sqlrooms/room-config": "0.19.1",
|
|
28
|
+
"@sqlrooms/room-shell": "0.19.1",
|
|
29
|
+
"@sqlrooms/ui": "0.19.1",
|
|
30
|
+
"@sqlrooms/utils": "0.19.1",
|
|
31
31
|
"ai": "^4.3.16",
|
|
32
32
|
"immer": "^10.1.1",
|
|
33
33
|
"lucide-react": "^0.475.0",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"typecheck": "tsc --noEmit",
|
|
46
46
|
"typedoc": "typedoc"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "9cd7bbec3d915fa8b3997af840574a8430f74523"
|
|
49
49
|
}
|