@arcteninc/core 0.0.110 → 0.0.112
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/README.md +66 -53
- package/dist/components/ArctenAgent.d.ts +51 -0
- package/dist/components/ArctenAgent.d.ts.map +1 -0
- package/dist/components/ai-elements/prompt-input.d.ts +187 -0
- package/dist/components/ai-elements/prompt-input.d.ts.map +1 -0
- package/dist/components/ai-elements/reasoning.d.ts +17 -0
- package/dist/components/ai-elements/reasoning.d.ts.map +1 -0
- package/dist/components/ai-elements/response.d.ts +8 -0
- package/dist/components/ai-elements/response.d.ts.map +1 -0
- package/dist/components/ai-elements/shimmer.d.ts +10 -0
- package/dist/components/ai-elements/shimmer.d.ts.map +1 -0
- package/dist/components/citation-button.d.ts +14 -0
- package/dist/components/citation-button.d.ts.map +1 -0
- package/dist/components/citation-text-renderer.d.ts +31 -0
- package/dist/components/citation-text-renderer.d.ts.map +1 -0
- package/dist/components/secure-modals/EmailModal.d.ts +10 -0
- package/dist/components/secure-modals/EmailModal.d.ts.map +1 -0
- package/dist/components/secure-modals/FormModal.d.ts +20 -0
- package/dist/components/secure-modals/FormModal.d.ts.map +1 -0
- package/dist/components/secure-modals/PasswordModal.d.ts +10 -0
- package/dist/components/secure-modals/PasswordModal.d.ts.map +1 -0
- package/dist/components/secure-modals/PhoneModal.d.ts +10 -0
- package/dist/components/secure-modals/PhoneModal.d.ts.map +1 -0
- package/dist/components/secure-modals/PinModal.d.ts +11 -0
- package/dist/components/secure-modals/PinModal.d.ts.map +1 -0
- package/dist/components/secure-modals/SecureModalProvider.d.ts +13 -0
- package/dist/components/secure-modals/SecureModalProvider.d.ts.map +1 -0
- package/dist/components/secure-modals/TextModal.d.ts +11 -0
- package/dist/components/secure-modals/TextModal.d.ts.map +1 -0
- package/dist/components/secure-modals/index.d.ts +10 -0
- package/dist/components/secure-modals/index.d.ts.map +1 -0
- package/dist/components/secure-modals/types.d.ts +34 -0
- package/dist/components/secure-modals/types.d.ts.map +1 -0
- package/dist/components/tool-call-approval.d.ts +9 -0
- package/dist/components/tool-call-approval.d.ts.map +1 -0
- package/dist/components/tool-call-result.d.ts +8 -0
- package/dist/components/tool-call-result.d.ts.map +1 -0
- package/dist/components/ui/autotextarea.d.ts +19 -0
- package/dist/components/ui/autotextarea.d.ts.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +14 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/command.d.ts +19 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +16 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/hover-card.d.ts +7 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/core.css +1 -0
- package/dist/index.cjs +16 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +8681 -452
- package/dist/lib/useAgent.d.ts +2 -1
- package/dist/lib/useAgent.d.ts.map +1 -1
- package/dist/types/tool-description.d.ts +0 -1
- package/dist/types/tool-description.d.ts.map +1 -1
- package/dist/types/use-agent.d.ts +50 -2
- package/dist/types/use-agent.d.ts.map +1 -1
- package/dist/utils/form-generator.d.ts +29 -0
- package/dist/utils/form-generator.d.ts.map +1 -0
- package/dist/utils/secure-param-detector.d.ts +26 -0
- package/dist/utils/secure-param-detector.d.ts.map +1 -0
- package/package.json +26 -2
- package/scripts/cli-extract-types-auto-wrapper.cjs +1 -0
- package/scripts/cli-extract-types-auto.js +1 -0
- package/scripts/cli-extract-types-auto.ts +0 -0
package/dist/lib/useAgent.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { UseAgentOptions, UseAgentReturn } from '../types/use-agent';
|
|
2
|
-
export declare function useAgent({ apiBaseUrl, tokenEndpoint, clientToken: providedToken, skipTokenFetch, user, tools, safeTools, toolMetadata, systemPrompt, initialMessages, conversationId: initialConversationId, state: controlledState, onStateChange, allowStateEdits, onToolCall, onFinish, sources, ragConfig, ragFilters,
|
|
2
|
+
export declare function useAgent({ apiBaseUrl, tokenEndpoint, clientToken: providedToken, skipTokenFetch, user, tools, safeTools, toolMetadata, sensitiveParams, sensitiveOutputs, autoDetectSensitive, autoFormGeneration, formMode, systemPrompt, agentId, agentName, initialMessages, conversationId: initialConversationId, state: controlledState, onStateChange, allowStateEdits, onToolCall, onFinish, sources, ragConfig, ragFilters, // Deprecated: use ragConfig or sources instead
|
|
3
|
+
secureInputHandler, }?: UseAgentOptions): UseAgentReturn;
|
|
3
4
|
//# sourceMappingURL=useAgent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAgent.d.ts","sourceRoot":"","sources":["../../src/lib/useAgent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAgent.d.ts","sourceRoot":"","sources":["../../src/lib/useAgent.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAKf,MAAM,oBAAoB,CAAC;AA2S5B,wBAAgB,QAAQ,CAAC,EACvB,UAAqC,EACrC,aAAmC,EACnC,WAAW,EAAE,aAAa,EAC1B,cAAsB,EACtB,IAAI,EACJ,KAAU,EACV,SAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,mBAA2B,EAC3B,kBAA0B,EAC1B,QAAiB,EAEjB,YAAiB,EACjB,OAAO,EACP,SAAS,EACT,eAAoB,EACpB,cAAc,EAAE,qBAAqB,EACrC,KAAK,EAAE,eAAe,EACtB,aAAa,EACb,eAAsB,EACtB,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EAAE,+CAA+C;AAC3D,kBAAkB,GACnB,GAAE,eAAoB,GAAG,cAAc,CAq4CvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-description.d.ts","sourceRoot":"","sources":["../../src/types/tool-description.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tool-description.d.ts","sourceRoot":"","sources":["../../src/types/tool-description.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ"}
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
import { UIMessage } from '@ai-sdk/react';
|
|
2
|
-
import {
|
|
3
|
-
export type
|
|
2
|
+
import { SecureModalType, SecureInputRequest, SecureFormRequest } from '../components/secure-modals/types';
|
|
3
|
+
export type ToolFunction = (...args: any[]) => any;
|
|
4
|
+
/**
|
|
5
|
+
* Handler interface for collecting secure inputs without React.
|
|
6
|
+
* Implement this interface to provide your own secure input collection mechanism
|
|
7
|
+
* (e.g., using vanilla JS, Vue, Svelte, or any other framework).
|
|
8
|
+
*/
|
|
9
|
+
export interface SecureInputHandler {
|
|
10
|
+
/**
|
|
11
|
+
* Request a single secure input from the user.
|
|
12
|
+
* @param request The secure input request details
|
|
13
|
+
* @returns A Promise that resolves with the user's input, or null if cancelled
|
|
14
|
+
*/
|
|
15
|
+
showSecureModal: (request: SecureInputRequest) => Promise<string | null>;
|
|
16
|
+
/**
|
|
17
|
+
* Request a secure form with multiple fields from the user.
|
|
18
|
+
* @param request The secure form request details
|
|
19
|
+
* @returns A Promise that resolves with the form values, or null if cancelled
|
|
20
|
+
*/
|
|
21
|
+
showSecureForm: (request: SecureFormRequest) => Promise<Record<string, string> | null>;
|
|
22
|
+
}
|
|
4
23
|
export interface ToolCall {
|
|
5
24
|
toolCallId: string;
|
|
6
25
|
toolName: string;
|
|
@@ -35,6 +54,20 @@ export interface RagConfig {
|
|
|
35
54
|
tags?: string[];
|
|
36
55
|
};
|
|
37
56
|
}
|
|
57
|
+
export type SensitiveParamConfig = string[] | Record<string, SecureModalType>;
|
|
58
|
+
export type SensitiveOutputConfig = boolean | string[] | {
|
|
59
|
+
strategy?: "full" | "fields";
|
|
60
|
+
fields?: string[];
|
|
61
|
+
placeholder?: string;
|
|
62
|
+
includeFieldStatus?: boolean;
|
|
63
|
+
preserve?: string[];
|
|
64
|
+
};
|
|
65
|
+
export interface ToolMetadataWithSensitive {
|
|
66
|
+
[toolName: string]: {
|
|
67
|
+
sensitiveParams?: SensitiveParamConfig;
|
|
68
|
+
[key: string]: any;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
38
71
|
export interface UseAgentOptions {
|
|
39
72
|
apiBaseUrl?: string;
|
|
40
73
|
tokenEndpoint?: string;
|
|
@@ -47,7 +80,17 @@ export interface UseAgentOptions {
|
|
|
47
80
|
tools?: ToolFunction[];
|
|
48
81
|
safeTools?: ToolFunction[];
|
|
49
82
|
toolMetadata?: any;
|
|
83
|
+
sensitiveParams?: Record<string, SensitiveParamConfig>;
|
|
84
|
+
sensitiveOutputs?: Record<string, SensitiveOutputConfig>;
|
|
85
|
+
autoDetectSensitive?: boolean;
|
|
86
|
+
autoFormGeneration?: boolean;
|
|
87
|
+
formMode?: 'individual' | 'batch' | 'auto';
|
|
88
|
+
/**
|
|
89
|
+
* @deprecated Configure prompts on the dashboard or per-agent. This has no effect on requests.
|
|
90
|
+
*/
|
|
50
91
|
systemPrompt?: string;
|
|
92
|
+
agentId?: string;
|
|
93
|
+
agentName?: string;
|
|
51
94
|
initialMessages?: UIMessage[];
|
|
52
95
|
conversationId?: string;
|
|
53
96
|
state?: Record<string, any>;
|
|
@@ -64,6 +107,7 @@ export interface UseAgentOptions {
|
|
|
64
107
|
lang?: string;
|
|
65
108
|
tags?: string[];
|
|
66
109
|
};
|
|
110
|
+
secureInputHandler?: SecureInputHandler;
|
|
67
111
|
}
|
|
68
112
|
export interface UseAgentReturn {
|
|
69
113
|
id: string | null;
|
|
@@ -91,5 +135,9 @@ export interface UseAgentReturn {
|
|
|
91
135
|
setState: (updates: Record<string, any>) => Promise<void>;
|
|
92
136
|
isStateLoading: boolean;
|
|
93
137
|
stateError: Error | null;
|
|
138
|
+
pendingSecureInputs: SecureInputRequest[];
|
|
139
|
+
completeSecureInput: (requestId: string, value: string | null) => void;
|
|
140
|
+
pendingSecureForms: SecureFormRequest[];
|
|
141
|
+
completeSecureForm: (requestId: string, values: Record<string, string> | null) => void;
|
|
94
142
|
}
|
|
95
143
|
//# sourceMappingURL=use-agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-agent.d.ts","sourceRoot":"","sources":["../../src/types/use-agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAA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IAC1C,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAEvE,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,kBAAkB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;CACxF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SecureModalType } from '../components/secure-modals/types';
|
|
2
|
+
import { FormField } from '../components/secure-modals/FormModal';
|
|
3
|
+
export interface ToolFormConfig {
|
|
4
|
+
shouldUseForm: boolean;
|
|
5
|
+
fields: FormField[];
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Analyze tool parameters to determine if we should use a form instead of individual modals
|
|
11
|
+
*/
|
|
12
|
+
export declare function shouldUseFormForTool(toolName: string, allParams: string[], sensitiveParams: Record<string, SecureModalType>): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Generate form configuration for a tool
|
|
15
|
+
*/
|
|
16
|
+
export declare function generateFormConfig(toolName: string, allParams: string[], sensitiveParams: Record<string, SecureModalType>, aiProvidedValues?: Record<string, any>): ToolFormConfig;
|
|
17
|
+
/**
|
|
18
|
+
* Extract parameter names from tool metadata
|
|
19
|
+
*/
|
|
20
|
+
export declare function extractParameterNames(toolMetadata: any): string[];
|
|
21
|
+
/**
|
|
22
|
+
* Determine if we should use batch form collection for a specific tool call
|
|
23
|
+
*/
|
|
24
|
+
export declare function shouldUseBatchCollection(toolName: string, toolMetadata: any, sensitiveParams: Record<string, SecureModalType>, aiProvidedArgs: Record<string, any>): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Check if a tool has any parameters that need user input
|
|
27
|
+
*/
|
|
28
|
+
export declare function toolNeedsUserInput(toolMetadata: any, sensitiveParams: Record<string, SecureModalType>, aiProvidedArgs: Record<string, any>): boolean;
|
|
29
|
+
//# sourceMappingURL=form-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-generator.d.ts","sourceRoot":"","sources":["../../src/utils/form-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAEvE,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EAAE,EACnB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAC/C,OAAO,CAIT;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EAAE,EACnB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EAChD,gBAAgB,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GACzC,cAAc,CA+DhB;AAgGD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,GAAG,GAAG,MAAM,EAAE,CAMjE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,GAAG,EACjB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EAChD,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAClC,OAAO,CAST;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,GAAG,EACjB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EAChD,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAClC,OAAO,CAOT"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SecureModalType } from '../components/secure-modals/types';
|
|
2
|
+
/**
|
|
3
|
+
* Auto-detect the secure modal type based on parameter name
|
|
4
|
+
*/
|
|
5
|
+
export declare function detectSecureParamType(paramName: string): SecureModalType | null;
|
|
6
|
+
/**
|
|
7
|
+
* Check if a parameter name indicates sensitive data that should be collected securely
|
|
8
|
+
*/
|
|
9
|
+
export declare function isSensitiveParam(paramName: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Get user-friendly titles and descriptions for different modal types
|
|
12
|
+
*/
|
|
13
|
+
export declare function getModalMetadata(type: SecureModalType, paramName: string): {
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Process sensitive parameter configurations and merge with auto-detection
|
|
20
|
+
*/
|
|
21
|
+
export declare function processSensitiveParams(toolMetadata: Record<string, any>, autoDetectSensitive?: boolean): Record<string, Record<string, SecureModalType>>;
|
|
22
|
+
/**
|
|
23
|
+
* Get all sensitive parameters for a specific tool
|
|
24
|
+
*/
|
|
25
|
+
export declare function getToolSensitiveParams(toolName: string, toolMetadata: Record<string, any>, autoDetectSensitive?: boolean): Record<string, SecureModalType>;
|
|
26
|
+
//# sourceMappingURL=secure-param-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secure-param-detector.d.ts","sourceRoot":"","sources":["../../src/utils/secure-param-detector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AA2DzE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAa/E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM;WACtB,MAAM;iBAAe,MAAM;iBAAe,MAAM;EAuClG;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjC,mBAAmB,GAAE,OAAe,GACnC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CA2BjD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjC,mBAAmB,GAAE,OAAe,GACnC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAGjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcteninc/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.112",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"types": "./dist/server.d.ts",
|
|
16
16
|
"import": "./dist/server.mjs",
|
|
17
17
|
"require": "./dist/server.cjs"
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
"./styles": "./dist/core.css"
|
|
19
20
|
},
|
|
20
21
|
"sideEffects": false,
|
|
21
22
|
"bin": {
|
|
@@ -56,10 +57,33 @@
|
|
|
56
57
|
"ts-json-schema-generator": "^2.4.0",
|
|
57
58
|
"typescript": "^5.9.3",
|
|
58
59
|
"tsx": "^4.19.2",
|
|
60
|
+
"@ai-sdk/openai": "^3.0.0-beta.47",
|
|
59
61
|
"@ai-sdk/react": "^3.0.0-beta.92",
|
|
62
|
+
"@emotion/is-prop-valid": "^1.4.0",
|
|
63
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
64
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
65
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
66
|
+
"@radix-ui/react-hover-card": "^1.1.15",
|
|
67
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
68
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
69
|
+
"@radix-ui/react-tooltip": "^1.2.8",
|
|
70
|
+
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
71
|
+
"@use-gesture/react": "^10.3.1",
|
|
60
72
|
"acorn": "^8.15.0",
|
|
61
73
|
"ai": "^6.0.0-beta.94",
|
|
74
|
+
"class-variance-authority": "^0.7.1",
|
|
75
|
+
"clsx": "^2.1.1",
|
|
76
|
+
"cmdk": "^1.1.1",
|
|
62
77
|
"glob": "^11.0.3",
|
|
78
|
+
"lucide-react": "^0.553.0",
|
|
79
|
+
"motion": "^12.23.24",
|
|
80
|
+
"nanoid": "^5.1.6",
|
|
81
|
+
"react-resizable-panels": "^3.0.6",
|
|
82
|
+
"rehype-katex": "^7.0.1",
|
|
83
|
+
"shadcn": "^3.5.0",
|
|
84
|
+
"streamdown": "^1.4.0",
|
|
85
|
+
"tailwind-merge": "^3.3.1",
|
|
86
|
+
"tw-animate-css": "^1.4.0",
|
|
63
87
|
"zod": "^3.24.1",
|
|
64
88
|
"zod-to-json-schema": "^3.24.6"
|
|
65
89
|
}
|
|
File without changes
|