guideai-app 0.4.3-3 → 0.4.3-4
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/GuideAI.d.ts +1 -1
- package/dist/GuideAI.js +1 -1
- package/dist/GuideAI.js.map +1 -1
- package/dist/components/ResetButton.d.ts +13 -0
- package/dist/components/TranscriptBox.d.ts +3 -1
- package/dist/components/TranscriptTextInput.d.ts +2 -1
- package/dist/styles/GuideAI.styles.d.ts +0 -1
- package/dist/types/GuideAI.types.d.ts +0 -6
- package/dist/utils/api.d.ts +0 -7
- package/dist/utils/constants.d.ts +0 -1
- package/dist/utils/elementInteractions.d.ts +32 -1
- package/dist/utils/hover.d.ts +2 -0
- package/dist/utils/logger.d.ts +1 -5
- package/dist/utils/messageStorage.d.ts +5 -0
- package/package.json +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TranscriptPosition, MicButtonPosition } from '../types/GuideAI.types';
|
|
2
|
+
interface ResetButtonProps {
|
|
3
|
+
transcriptPosition: TranscriptPosition;
|
|
4
|
+
micPosition?: MicButtonPosition;
|
|
5
|
+
isConversationActive?: boolean;
|
|
6
|
+
handleResetChatHistory?: () => void;
|
|
7
|
+
React: typeof import('react');
|
|
8
|
+
}
|
|
9
|
+
declare const ResetButton: {
|
|
10
|
+
({ transcriptPosition, micPosition, isConversationActive, handleResetChatHistory, React }: ResetButtonProps): import("react").JSX.Element | null;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export default ResetButton;
|
|
@@ -18,10 +18,12 @@ interface TranscriptBoxProps {
|
|
|
18
18
|
isMuted?: boolean;
|
|
19
19
|
handleToggleMute?: () => void;
|
|
20
20
|
isConversationActive?: boolean;
|
|
21
|
+
handleResetChatHistory?: () => void;
|
|
22
|
+
isDataChannelOpen?: boolean;
|
|
21
23
|
React: typeof import('react');
|
|
22
24
|
}
|
|
23
25
|
declare const TranscriptBox: {
|
|
24
|
-
({ allMessages, showTranscript, handleCloseTranscript, showToggleButton, handleToggleTranscript, showTextInput, textInput, setTextInput, handleTextSubmit, handleTextKeyPress, textPlaceholder, micPosition, transcriptPosition, hasMic, isMuted, handleToggleMute, isConversationActive, React }: TranscriptBoxProps): import("react").JSX.Element | null;
|
|
26
|
+
({ allMessages, showTranscript, handleCloseTranscript, showToggleButton, handleToggleTranscript, showTextInput, textInput, setTextInput, handleTextSubmit, handleTextKeyPress, textPlaceholder, micPosition, transcriptPosition, hasMic, isMuted, handleToggleMute, isConversationActive, handleResetChatHistory, isDataChannelOpen, React }: TranscriptBoxProps): import("react").JSX.Element | null;
|
|
25
27
|
displayName: string;
|
|
26
28
|
};
|
|
27
29
|
export default TranscriptBox;
|
|
@@ -4,7 +4,8 @@ interface TranscriptTextInputProps {
|
|
|
4
4
|
handleTextSubmit?: () => void;
|
|
5
5
|
handleTextKeyPress?: (event: React.KeyboardEvent) => void;
|
|
6
6
|
textPlaceholder?: string;
|
|
7
|
+
isDataChannelOpen?: boolean;
|
|
7
8
|
React: typeof import('react');
|
|
8
9
|
}
|
|
9
|
-
declare const TranscriptTextInput: ({ textInput, setTextInput, handleTextSubmit, handleTextKeyPress, textPlaceholder, React }: TranscriptTextInputProps) => import("react").JSX.Element;
|
|
10
|
+
declare const TranscriptTextInput: ({ textInput, setTextInput, handleTextSubmit, handleTextKeyPress, textPlaceholder, isDataChannelOpen, React }: TranscriptTextInputProps) => import("react").JSX.Element;
|
|
10
11
|
export default TranscriptTextInput;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { MetadataConfig, UserMetadata } from './metadata.types';
|
|
2
1
|
import { VisualContextConfig } from '../visualContext/types';
|
|
3
2
|
export type RecordingStatus = 'idle' | 'recording' | 'processing' | 'playing';
|
|
4
3
|
export type UseStateHook = <T>(initialState: T | (() => T)) => [T, (value: T | ((prev: T) => T)) => void];
|
|
@@ -29,11 +28,6 @@ export interface GuideAIProps {
|
|
|
29
28
|
ReactDOM: any;
|
|
30
29
|
position?: GuideAIPosition;
|
|
31
30
|
onError?: (error: string | Error, context?: string) => void;
|
|
32
|
-
metadata?: {
|
|
33
|
-
config?: MetadataConfig;
|
|
34
|
-
initialUserData?: Partial<UserMetadata>;
|
|
35
|
-
onMetadataUpdate?: (metadata: UserMetadata) => void;
|
|
36
|
-
};
|
|
37
31
|
transcript?: {
|
|
38
32
|
enabled?: boolean;
|
|
39
33
|
showToggleButton?: boolean;
|
package/dist/utils/api.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { MetadataUpdate } from '../types/metadata.types';
|
|
2
1
|
import { GuideAIEnvironment } from '../types/GuideAI.types';
|
|
3
2
|
interface Workflow {
|
|
4
3
|
id: string;
|
|
@@ -16,13 +15,7 @@ interface ConversationData {
|
|
|
16
15
|
ephemeralToken: string;
|
|
17
16
|
prompt: string;
|
|
18
17
|
workflows: Workflow[];
|
|
19
|
-
userMetadata?: {
|
|
20
|
-
visitCount: number;
|
|
21
|
-
loginCount?: number;
|
|
22
|
-
email?: string;
|
|
23
|
-
};
|
|
24
18
|
}
|
|
25
19
|
export declare const createNewConversation: (organizationKey: string, onError: (error: Error, context: string) => void, workflowKey?: string, environment?: GuideAIEnvironment) => Promise<ConversationData | null>;
|
|
26
20
|
export type { Workflow };
|
|
27
21
|
export declare const logMessage: (content: string, sender: "GUIDEAI" | "HUMAN", conversationId: string | null, organizationKey: string, onError: (error: Error, context: string) => void, environment?: GuideAIEnvironment) => Promise<void>;
|
|
28
|
-
export declare const sendMetadataUpdates: (updates: MetadataUpdate[], organizationKey: string, onError: (error: Error, context: string) => void, environment?: GuideAIEnvironment) => Promise<boolean>;
|
|
@@ -5,6 +5,5 @@ export declare const GUIDE_AI_API_BASE_DEV = "https://dev.getguide.ai/api";
|
|
|
5
5
|
export declare const GUIDE_AI_API_BASE_LOCAL = "http://localhost:3000/api";
|
|
6
6
|
export declare const getApiBaseUrl: (environment?: "development" | "production" | "local") => string;
|
|
7
7
|
export declare const GUIDE_AI_API_BASE = "https://www.getguide.ai/api";
|
|
8
|
-
export declare const METADATA_API_BASE = "http://localhost:3000/api";
|
|
9
8
|
export declare const OPENAI_REALTIME_BASE = "https://api.openai.com/v1/realtime";
|
|
10
9
|
export type ElementInteractionType = "HIGHLIGHT" | "HOVERANDCLICK";
|
|
@@ -17,7 +17,7 @@ export declare const findElementBySelector: (selector: string) => Element | null
|
|
|
17
17
|
export declare const interactWithElement: (element: Element, cursorElement: HTMLElement | null, state: ElementInteractionType, hoverTime?: number) => Promise<HTMLElement | null>;
|
|
18
18
|
export declare const processSelectorsInteraction: (selectors: string | string[], isInteracting: boolean, setIsInteracting: (interacting: boolean) => void, onEachElement: (element: Element, cursor: HTMLElement | null, index: number) => Promise<HTMLElement | null>, onComplete?: (lastElement: Element | null, cursor: HTMLElement | null) => Promise<void>) => Promise<boolean>;
|
|
19
19
|
export declare const parseArgs: (argsToUse: string) => Promise<any>;
|
|
20
|
-
export declare const
|
|
20
|
+
export declare const Highlight_Click_Tool: {
|
|
21
21
|
type: string;
|
|
22
22
|
name: string;
|
|
23
23
|
description: string;
|
|
@@ -42,6 +42,37 @@ export declare const Highlight_Tool: {
|
|
|
42
42
|
required: string[];
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
+
export declare const Hover_Click_Tool: {
|
|
46
|
+
type: string;
|
|
47
|
+
name: string;
|
|
48
|
+
description: string;
|
|
49
|
+
parameters: {
|
|
50
|
+
type: string;
|
|
51
|
+
properties: {
|
|
52
|
+
selector: {
|
|
53
|
+
oneOf: ({
|
|
54
|
+
type: string;
|
|
55
|
+
description: string;
|
|
56
|
+
items?: undefined;
|
|
57
|
+
} | {
|
|
58
|
+
type: string;
|
|
59
|
+
items: {
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
description: string;
|
|
63
|
+
})[];
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
hoverTime: {
|
|
67
|
+
type: string;
|
|
68
|
+
description: string;
|
|
69
|
+
minimum: number;
|
|
70
|
+
maximum: number;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
required: string[];
|
|
74
|
+
};
|
|
75
|
+
};
|
|
45
76
|
export declare const Hover_Tool: {
|
|
46
77
|
type: string;
|
|
47
78
|
name: string;
|
package/dist/utils/logger.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type Component = 'GuideAI' | '
|
|
1
|
+
type Component = 'GuideAI' | 'API' | 'TranscriptBox' | 'Onboarding' | 'VisualContext' | 'MessageStorage';
|
|
2
2
|
declare class Logger {
|
|
3
3
|
private static formatMessage;
|
|
4
4
|
private static checkLoggingEnabled;
|
|
@@ -30,9 +30,5 @@ declare class Logger {
|
|
|
30
30
|
* Conversation flow tracking
|
|
31
31
|
*/
|
|
32
32
|
static conversation(action: string, data?: any): void;
|
|
33
|
-
/**
|
|
34
|
-
* Metadata tracking logging
|
|
35
|
-
*/
|
|
36
|
-
static metadata(action: string, data?: any): void;
|
|
37
33
|
}
|
|
38
34
|
export default Logger;
|
|
@@ -34,3 +34,8 @@ export declare const checkForStoredConversation: (currentOrganizationKey: string
|
|
|
34
34
|
messages: StoredMessage[] | null;
|
|
35
35
|
};
|
|
36
36
|
export declare const formatConversationContext: (messages: StoredMessage[], maxMessages?: number) => string;
|
|
37
|
+
/**
|
|
38
|
+
* Get messages from localStorage as the single source of truth
|
|
39
|
+
* This ensures all components read from the same storage location
|
|
40
|
+
*/
|
|
41
|
+
export declare const getMessagesFromStorage: (organizationKey: string) => StoredMessage[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "guideai-app",
|
|
3
|
-
"version": "0.4.3-
|
|
3
|
+
"version": "0.4.3-4",
|
|
4
4
|
"description": "AI-powered guide component for React applications",
|
|
5
5
|
"main": "dist/GuideAI.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"openai": "^4.28.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
42
|
-
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
41
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
42
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@testing-library/jest-dom": "^6.9.1",
|