guideai-app 0.5.4-2 → 0.5.4-8
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 +105 -1
- package/dist/GuideAI.d.ts +2 -5
- package/dist/GuideAI.js +1 -1
- package/dist/GuideAI.js.LICENSE.txt +2 -17
- package/dist/buddy/buddyPropTools.d.ts +188 -0
- package/dist/buddy/buddyStore.d.ts +88 -0
- package/dist/buddy/buddyTools.d.ts +6 -0
- package/dist/buddy/types.d.ts +56 -0
- package/dist/components/DeveloperTools.d.ts +5 -3
- package/dist/components/Microphone.d.ts +17 -2
- package/dist/components/PlaybackLockDebugOverlayRoot.d.ts +1 -1
- package/dist/components/SessionRatingPopup.d.ts +16 -0
- package/dist/components/SubtitleInputBar.d.ts +23 -0
- package/dist/components/SubtitleSettingsMenu.d.ts +9 -0
- package/dist/components/TranscriptBox.d.ts +16 -12
- package/dist/components/TranscriptMessages.d.ts +8 -1
- package/dist/components/TranscriptNextStepBar.d.ts +34 -0
- package/dist/components/TranscriptSessionMicLevels.d.ts +8 -0
- package/dist/components/TranscriptStudioChrome.d.ts +8 -7
- package/dist/components/TranscriptTextInput.d.ts +4 -12
- package/dist/components/TranscriptToolbar.d.ts +3 -1
- package/dist/components/TranscriptWorkflowDrawer.d.ts +5 -7
- package/dist/contexts/GuideAIThemeContext.d.ts +13 -0
- package/dist/devtools/DeveloperToolsShell.d.ts +1 -1
- package/dist/devtools/TranscriptDeveloperToolsMenuItems.d.ts +45 -0
- package/dist/devtools/TranscriptUiDevtoolsPanel.d.ts +10 -0
- package/dist/devtools/adminToolDiagnostics/AdminToolDiagnosticsPanel.d.ts +1 -1
- package/dist/devtools/developerToolPanelId.d.ts +1 -1
- package/dist/devtools/devtoolsAdminPortalLinks.d.ts +11 -0
- package/dist/devtools/devtoolsAuth/DevtoolsAuthContext.d.ts +14 -0
- package/dist/devtools/devtoolsAuth/DevtoolsLoginModal.d.ts +13 -0
- package/dist/devtools/devtoolsAuth/devtoolsAccessTrigger.d.ts +9 -0
- package/dist/devtools/devtoolsAuth/devtoolsAdminApi.d.ts +13 -0
- package/dist/devtools/devtoolsAuth/devtoolsLoginModalStyles.d.ts +1 -0
- package/dist/devtools/devtoolsAuth/devtoolsPortalLogin.d.ts +15 -0
- package/dist/devtools/devtoolsAuth/devtoolsSessionStorage.d.ts +4 -0
- package/dist/devtools/devtoolsAuth/index.d.ts +9 -0
- package/dist/devtools/devtoolsAuth/types.d.ts +21 -0
- package/dist/devtools/devtoolsAuth/useDevtoolsAccess.d.ts +33 -0
- package/dist/devtools/devtoolsThemePreference.d.ts +3 -0
- package/dist/devtools/excavator/ExcavatorPanel.d.ts +17 -0
- package/dist/devtools/excavator/excavatorPanelStyles.d.ts +5 -0
- package/dist/devtools/excavator/excavatorSse.d.ts +6 -0
- package/dist/devtools/learn/LearnCaptureChrome.stub.d.ts +3 -0
- package/dist/devtools/learn/LearnModePanel.d.ts +18 -0
- package/dist/devtools/learn/LearnModePanel.stub.d.ts +3 -0
- package/dist/devtools/learn/LearnOrchestrationHost.d.ts +52 -0
- package/dist/devtools/learn/injectLearnModeStyles.d.ts +2 -0
- package/dist/devtools/learn/learnCaptureChrome.d.ts +33 -0
- package/dist/devtools/learn/learnCaptureLayout.d.ts +26 -0
- package/dist/devtools/learn/learnCaptureToolbar.d.ts +27 -0
- package/dist/devtools/learn/learnClarifyKickoff.d.ts +6 -0
- package/dist/devtools/learn/learnLiteTranscript.d.ts +22 -0
- package/dist/devtools/learn/learnModeStyles.d.ts +5 -0
- package/dist/devtools/learn/learnModeTypes.d.ts +5 -0
- package/dist/devtools/learn/learnOrchestrationStub.d.ts +5 -0
- package/dist/devtools/learn/learnPanelSyncFieldsEqual.d.ts +3 -0
- package/dist/devtools/learn/learnRealtimeSession.d.ts +10 -0
- package/dist/devtools/learn/learnRefBag.d.ts +41 -0
- package/dist/devtools/learn/learnSessionStorage.d.ts +23 -0
- package/dist/devtools/learn/learnWebRTCInit.d.ts +20 -0
- package/dist/devtools/learn/learnWorkspaceContext.d.ts +5 -0
- package/dist/devtools/learn/loadLearnOrchestration.d.ts +10 -0
- package/dist/devtools/learn/useLearnCaptureDuration.d.ts +4 -0
- package/dist/devtools/learn/useLearnClickCapture.d.ts +9 -0
- package/dist/devtools/learn/useLearnMode.d.ts +47 -0
- package/dist/devtools/learn/useLearnMode.stub.d.ts +3 -0
- package/dist/devtools/panelLayout.d.ts +6 -0
- package/dist/devtools/silentMessages/silentMessageDebug.d.ts +86 -0
- package/dist/devtools/silentMessages/useSilentMessageDebug.d.ts +18 -0
- package/dist/devtools/transcriptDevtoolsMenuProps.d.ts +33 -0
- package/dist/devtools/transcriptMoreMenu/DeveloperToolsAdminPortalFlyout.d.ts +20 -0
- package/dist/devtools/transcriptMoreMenu/DeveloperToolsLoggerFlyout.d.ts +16 -0
- package/dist/devtools/transcriptMoreMenu/DeveloperToolsMicPresetFlyout.d.ts +22 -0
- package/dist/devtools/transcriptMoreMenu/ThemePresetSwatch.d.ts +8 -0
- package/dist/devtools/transcriptMoreMenu/TranscriptDeveloperToolsMenuItems.d.ts +25 -0
- package/dist/devtools/transcriptMoreMenu/TranscriptDeveloperToolsThemeFlyout.d.ts +13 -0
- package/dist/devtools/transcriptMoreMenu/TranscriptMoreMenuDevtools.d.ts +27 -0
- package/dist/devtools/transcriptMoreMenu/devtoolsFlyoutTypes.d.ts +1 -0
- package/dist/devtools/transcriptMoreMenu/index.d.ts +2 -0
- package/dist/devtools/transcriptMoreMenu/readWindowGuideAILogger.d.ts +12 -0
- package/dist/devtools/transcriptMoreMenu/useTranscriptMoreMenuDebugFlyouts.d.ts +24 -0
- package/dist/devtools/useDraggableDialog.d.ts +8 -1
- package/dist/devtools/useGuideDeveloperTools.d.ts +16 -7
- package/dist/devtools/useGuideDevtoolsIntegration.d.ts +56 -0
- package/dist/devtools/workflowTester/WorkflowTesterPanel.d.ts +4 -28
- package/dist/devtools/workflowTester/WorkflowTesterPanel.stub.d.ts +3 -0
- package/dist/devtools/workflowTester/index.d.ts +1 -2
- package/dist/devtools/workflowTester/useWorkflowSimulationController.d.ts +12 -0
- package/dist/devtools/workflowTester/useWorkflowSimulationRun.d.ts +47 -0
- package/dist/devtools/workflowTester/workflowSimulationController.d.ts +31 -0
- package/dist/devtools/workflowTester/workflowSimulationDevtoolsApi.d.ts +51 -0
- package/dist/devtools/workflowTester/workflowSimulationFinishRun.d.ts +4 -0
- package/dist/devtools/workflowTester/workflowSimulationRunner.d.ts +46 -0
- package/dist/devtools/workflowTester/workflowSimulationRunnerAi.d.ts +20 -0
- package/dist/devtools/workflowTester/workflowSimulationSessionRestore.d.ts +21 -0
- package/dist/devtools/workflowTester/workflowSimulationTurnState.d.ts +20 -0
- package/dist/devtools/workflowTester/workflowSimulationTypes.d.ts +28 -0
- package/dist/devtools/workflowTester/workflowSimulationWaits.d.ts +55 -0
- package/dist/devtools/workflowTester/workflowTesterPanel.types.d.ts +25 -0
- package/dist/devtools/workflowTester/workflowTesterRunSessionStorage.d.ts +43 -0
- package/dist/devtools/workflowTester/workflowTesterWorkspaceBridge.d.ts +4 -2
- package/dist/hooks/useConversationSession.d.ts +16 -2
- package/dist/hooks/useGuideAIMutePipeline.d.ts +1 -0
- package/dist/hooks/useGuideAIThemeState.d.ts +6 -0
- package/dist/hooks/useHiddenRealtimeSteers.d.ts +3 -1
- package/dist/hooks/useLauncherTabDrag.d.ts +23 -0
- package/dist/hooks/useMicMute.d.ts +1 -0
- package/dist/hooks/useSessionRating.d.ts +21 -0
- package/dist/hooks/useSubtitleAppearancePrefs.d.ts +5 -0
- package/dist/hooks/useThemePortalProps.d.ts +4 -0
- package/dist/hooks/useTranscriptChrome.d.ts +7 -2
- package/dist/hooks/useTranscriptDisplayMode.d.ts +6 -0
- package/dist/hooks/useTranscriptPanelDragResize.d.ts +47 -0
- package/dist/hooks/useWebRTC.d.ts +9 -0
- package/dist/hooks/useWidgetWorkflowSession.d.ts +2 -0
- package/dist/hooks/useWorkflowTesterOverlay.d.ts +10 -10
- package/dist/hooks/useWorkspaceCatalog.d.ts +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/lib/workspaceEmbedIcons.d.ts +0 -1
- package/dist/playwrightBuddyHarness.d.ts +12 -0
- package/dist/playwrightBuddyHarness.js +1766 -0
- package/dist/playwrightSimulationHarness.d.ts +16 -0
- package/dist/playwrightSimulationHarness.js +1 -0
- package/dist/playwrightToolHarness.d.ts +6 -2
- package/dist/playwrightToolHarness.js +1 -1
- package/dist/sessionRating.defaults.d.ts +4 -0
- package/dist/sessionRatingPrompts.d.ts +1 -0
- package/dist/staticContext/collectContext.d.ts +24 -13
- package/dist/staticContext/collectors/domSignals.d.ts +29 -0
- package/dist/staticContext/collectors/jqueryUi.d.ts +7 -0
- package/dist/staticContext/collectors/visibility.d.ts +6 -0
- package/dist/staticContext/hostPageFrameworkProbe.d.ts +21 -0
- package/dist/staticContext/index.d.ts +3 -2
- package/dist/staticContext/types.d.ts +112 -4
- package/dist/staticContext/useStaticContext.d.ts +5 -3
- package/dist/stubs/workspaces.d.ts +2 -2
- package/dist/styles/GuideAI.styles.d.ts +5 -1
- package/dist/styles/guideAIStylesTabLauncher.d.ts +7 -0
- package/dist/styles/guideAIThemeTokens.d.ts +5 -0
- package/dist/styles/guideaiTestsiteWidgetTheme.d.ts +6 -0
- package/dist/themes/buildThemeCss.d.ts +8 -0
- package/dist/themes/guideAIThemeIds.d.ts +5 -0
- package/dist/themes/presetThemes.d.ts +9 -0
- package/dist/themes/syncGuideAITheme.d.ts +2 -0
- package/dist/themes/themeTokens.types.d.ts +37 -0
- package/dist/types/GuideAI.types.d.ts +43 -4
- package/dist/utils/api.d.ts +39 -0
- package/dist/utils/api.learn.d.ts +18 -0
- package/dist/utils/conversationContextSwitch.d.ts +41 -0
- package/dist/utils/conversationManager.d.ts +39 -2
- package/dist/utils/dataChannel.d.ts +15 -0
- package/dist/utils/dataChannelHelpers.d.ts +26 -6
- package/dist/utils/guideaiMirroredStorageKeys.d.ts +35 -0
- package/dist/utils/lastSystemToolCall.d.ts +2 -1
- package/dist/utils/localStorageHelper.d.ts +52 -32
- package/dist/utils/localStorageThrottle.d.ts +6 -0
- package/dist/utils/messageStorage.d.ts +20 -7
- package/dist/utils/parseWorkspaceSlugList.d.ts +13 -0
- package/dist/utils/pathIncludesAnyRef.d.ts +12 -0
- package/dist/utils/resolveCatalogWorkspaceSlug.d.ts +11 -0
- package/dist/utils/sessionRatingThrottle.d.ts +3 -0
- package/dist/utils/sessionStorageJson.d.ts +3 -0
- package/dist/utils/themeRegistry.d.ts +14 -0
- package/dist/utils/tools/clickElement.d.ts +6 -0
- package/dist/utils/tools/cursorStyles.d.ts +17 -0
- package/dist/utils/tools/descriptionToHighlightSelector.d.ts +1 -1
- package/dist/utils/tools/docToForm.d.ts +2 -2
- package/dist/utils/tools/elementInteractions.d.ts +35 -1
- package/dist/utils/tools/elementToBestInteractionSelector.d.ts +8 -0
- package/dist/utils/tools/fillField.d.ts +1 -1
- package/dist/utils/tools/hover.d.ts +6 -0
- package/dist/utils/tools/selectWorkspace.d.ts +45 -0
- package/dist/utils/tools/toolRegistry.d.ts +5 -1
- package/dist/utils/tools/workspaceToolBridge.d.ts +22 -0
- package/dist/utils/transcriptDisplayModePref.d.ts +4 -0
- package/dist/utils/transcriptFloatGeometry.d.ts +78 -0
- package/dist/utils/transcriptSubtitleUiPref.d.ts +5 -0
- package/dist/utils/webrtcConnection.d.ts +7 -0
- package/dist/utils/widgetBearerStorage.d.ts +2 -2
- package/dist/utils/widgetWorkspaces.d.ts +0 -2
- package/dist/utils/workflowProgressSync.d.ts +65 -0
- package/dist/utils/workflowSteer.d.ts +10 -0
- package/dist/utils/workspaceCatalog.d.ts +20 -3
- package/dist/utils/workspaceCatalogFatal.d.ts +4 -0
- package/dist/visualContext/defaultProvider.d.ts +4 -10
- package/dist/visualContext/screenshotEncoding.d.ts +37 -0
- package/dist/visualContext/useVisualContext.d.ts +2 -1
- package/dist/visualContext/visualContextCaptureLock.d.ts +17 -0
- package/package.json +2 -2
|
@@ -21,6 +21,7 @@ export interface UseGuideAIMutePipelineParams {
|
|
|
21
21
|
export declare function useGuideAIMutePipeline({ hooks, isConversationActive, conversationManagerRef, dataChannelManagerRef, mediaStreamRef, audioElementRef, hasMic, isDataChannelOpen, }: UseGuideAIMutePipelineParams): {
|
|
22
22
|
isMuted: boolean;
|
|
23
23
|
handleToggleMute: () => void;
|
|
24
|
+
applyMicMuted: (muted: boolean) => void;
|
|
24
25
|
applyMuteStateToMediaStreamTracks: () => void;
|
|
25
26
|
isAssistantPlaybackMuted: boolean;
|
|
26
27
|
handleToggleAssistantPlaybackMute: () => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { GuideAIThemeContextValue } from '../contexts/GuideAIThemeContext';
|
|
2
|
+
import type { GuideAIThemeId } from '../themes/guideAIThemeIds';
|
|
3
|
+
export declare function useGuideAIThemeState(themeProp?: GuideAIThemeId | null): {
|
|
4
|
+
activeThemeId: GuideAIThemeId | null;
|
|
5
|
+
themeContextValue: GuideAIThemeContextValue;
|
|
6
|
+
};
|
|
@@ -7,6 +7,8 @@ export interface UseHiddenRealtimeSteersParams {
|
|
|
7
7
|
isDataChannelOpen: boolean;
|
|
8
8
|
isConversationActive: boolean;
|
|
9
9
|
pendingWorkspaceGreetingRef: MutableRefObject<string | null>;
|
|
10
|
+
/** When true on connect, send a "what's next" resume steer instead of the greeting. */
|
|
11
|
+
pendingResumeSteerRef: MutableRefObject<boolean>;
|
|
10
12
|
pendingWorkflowSteerTitle: string | null;
|
|
11
13
|
clearPendingWorkflowSteerTitle: () => void;
|
|
12
14
|
dataChannelManagerRef: MutableRefObject<DataChannelManager | null>;
|
|
@@ -19,4 +21,4 @@ export interface UseHiddenRealtimeSteersParams {
|
|
|
19
21
|
* Hidden `conversation.item.create` + `response.create` for workspace greeting and workflow steer,
|
|
20
22
|
* with Noisy-preset interrupt lock sequencing via `scheduleInterruptLockThenSend`.
|
|
21
23
|
*/
|
|
22
|
-
export declare function useHiddenRealtimeSteers({ hooks, isDataChannelOpen, isConversationActive, pendingWorkspaceGreetingRef, pendingWorkflowSteerTitle, clearPendingWorkflowSteerTitle, dataChannelManagerRef, conversationManagerRef, scheduleInterruptLockThenSend, }: UseHiddenRealtimeSteersParams): void;
|
|
24
|
+
export declare function useHiddenRealtimeSteers({ hooks, isDataChannelOpen, isConversationActive, pendingWorkspaceGreetingRef, pendingResumeSteerRef, pendingWorkflowSteerTitle, clearPendingWorkflowSteerTitle, dataChannelManagerRef, conversationManagerRef, scheduleInterruptLockThenSend, }: UseHiddenRealtimeSteersParams): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Keep in sync with the `.guideai-tab-launcher` height in `guideAIStylesTabLauncher.ts`. */
|
|
2
|
+
export declare const LAUNCHER_TAB_HEIGHT_PX = 64;
|
|
3
|
+
export interface LauncherTabDragResult {
|
|
4
|
+
/** Current tab offset from the viewport top (px), clamped to the viewport. */
|
|
5
|
+
tabTopPx: number;
|
|
6
|
+
/** True while the pointer is down and has crossed the drag threshold. */
|
|
7
|
+
isDragging: boolean;
|
|
8
|
+
onTabPointerDown: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
9
|
+
onTabPointerMove: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
10
|
+
onTabPointerUp: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
11
|
+
/** Returns true exactly once after a drag, so the click that follows pointerup is swallowed. */
|
|
12
|
+
consumeDragClick: () => boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface UseLauncherTabDragParams {
|
|
15
|
+
/** Per-widget localStorage scope for the persisted vertical offset. */
|
|
16
|
+
prefsKey: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Vertical drag behavior for the side-tab launcher: pointer-driven `top` offset, viewport
|
|
20
|
+
* clamping (including on resize), persistence per widget key, and click-vs-drag disambiguation
|
|
21
|
+
* so releasing a drag does not toggle the conversation.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useLauncherTabDrag(React: typeof import('react'), { prefsKey }: UseLauncherTabDragParams): LauncherTabDragResult;
|
|
@@ -18,5 +18,6 @@ export interface UseMicMuteParams {
|
|
|
18
18
|
export declare function useMicMute({ hooks, mediaStreamRef, conversationManagerRef, hasMic, isConversationActive, onMicManuallyUnmuted, }: UseMicMuteParams): {
|
|
19
19
|
isMuted: boolean;
|
|
20
20
|
handleToggleMute: () => void;
|
|
21
|
+
applyMicMuted: (muted: boolean) => void;
|
|
21
22
|
applyMuteStateToMediaStreamTracks: () => void;
|
|
22
23
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { MutableRefObject } from 'react';
|
|
2
|
+
import type { ReactHooks } from '../utils/reactHooks';
|
|
3
|
+
import type { ConversationManager } from '../utils/conversationManager';
|
|
4
|
+
type UseSessionRatingParams = {
|
|
5
|
+
hooks: ReactHooks;
|
|
6
|
+
conversationManagerRef: MutableRefObject<ConversationManager | null>;
|
|
7
|
+
};
|
|
8
|
+
export declare function useSessionRating({ hooks, conversationManagerRef }: UseSessionRatingParams): {
|
|
9
|
+
isVisible: boolean;
|
|
10
|
+
isClosing: boolean;
|
|
11
|
+
promptTitle: string;
|
|
12
|
+
showCommentField: boolean;
|
|
13
|
+
comment: string;
|
|
14
|
+
setComment: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
15
|
+
maybeOpenSessionRating: (conversationId: string, sessionDurationMs: number) => void;
|
|
16
|
+
submitRating: (stars: number) => void;
|
|
17
|
+
dismiss: () => void;
|
|
18
|
+
handleTellUsMoreClick: () => void;
|
|
19
|
+
reset: () => void;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -11,7 +11,8 @@ export type UseTranscriptChromeParams = {
|
|
|
11
11
|
layoutPrefsKey: string;
|
|
12
12
|
showTranscript: boolean;
|
|
13
13
|
workspaceOptions: StubWorkspaceOption[];
|
|
14
|
-
|
|
14
|
+
/** When true, workspace catalog and workflows come from the API. */
|
|
15
|
+
catalogFromApi: boolean;
|
|
15
16
|
apiWorkflowsByWorkspaceId: Record<string, StubWorkflowItem[]> | null;
|
|
16
17
|
keyTrim: string;
|
|
17
18
|
hasPortalAuth: boolean;
|
|
@@ -30,10 +31,14 @@ export type TranscriptChrome = {
|
|
|
30
31
|
setTranscriptSessionMode: Dispatch<SetStateAction<TranscriptSessionMode>>;
|
|
31
32
|
setWorkflowDrawerOpen: Dispatch<SetStateAction<boolean>>;
|
|
32
33
|
handleToggleTranscriptPanelMode: () => void;
|
|
34
|
+
/** Float → dock (e.g. drag float card past the right viewport edge). */
|
|
35
|
+
handleDockTranscriptPanel: () => void;
|
|
36
|
+
/** Dock → float (e.g. drag docked panel away from the right edge). */
|
|
37
|
+
handleUndockTranscriptPanel: () => void;
|
|
33
38
|
handleTranscriptSessionModeChange: (mode: TranscriptSessionMode) => void;
|
|
34
39
|
};
|
|
35
40
|
/**
|
|
36
41
|
* Transcript dock/float preference, workflow drawer visibility, and workspace session mode
|
|
37
42
|
* (including reconnect + first workflow steer after mode change).
|
|
38
43
|
*/
|
|
39
|
-
export declare function useTranscriptChrome({ hooks, layoutPrefsKey, showTranscript, workspaceOptions,
|
|
44
|
+
export declare function useTranscriptChrome({ hooks, layoutPrefsKey, showTranscript, workspaceOptions, catalogFromApi, apiWorkflowsByWorkspaceId, keyTrim, hasPortalAuth, reestablishRealtimeSessionRef, queueWorkflowSteerTitle, clearPendingWorkflowSteerTitle, conversationManagerRef, sessionWorkflowIdForInitRef: sessionWorkflowIdForInitRefProp, }: UseTranscriptChromeParams): TranscriptChrome;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { TranscriptDisplayMode } from '../types/GuideAI.types';
|
|
2
|
+
import type { ReactHooks } from '../utils/reactHooks';
|
|
3
|
+
export declare function useTranscriptDisplayMode(hooks: ReactHooks): {
|
|
4
|
+
transcriptDisplayMode: TranscriptDisplayMode;
|
|
5
|
+
setTranscriptDisplayMode: (mode: TranscriptDisplayMode) => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { CSSProperties, PointerEvent as ReactPointerEvent, RefObject } from 'react';
|
|
2
|
+
import type { ReactHooks } from '../utils/reactHooks';
|
|
3
|
+
import { type FloatResizeCorner } from '../utils/transcriptFloatGeometry';
|
|
4
|
+
export type TranscriptWorkflowStripGestureHandlers = {
|
|
5
|
+
onPointerDown: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
6
|
+
onPointerMove: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
7
|
+
onPointerUp: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
8
|
+
onPointerCancel: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
9
|
+
};
|
|
10
|
+
export type UseTranscriptPanelDragResizeParams = {
|
|
11
|
+
hooks: Pick<ReactHooks, 'useState' | 'useEffect' | 'useLayoutEffect' | 'useRef' | 'useCallback' | 'useMemo'>;
|
|
12
|
+
isDockedPanel: boolean;
|
|
13
|
+
showTranscript: boolean;
|
|
14
|
+
workflowDrawerOpen: boolean;
|
|
15
|
+
drawerWidthPx: number;
|
|
16
|
+
onDrawerWidthChange?: (widthPx: number) => void;
|
|
17
|
+
onDockTranscriptPanel: () => void;
|
|
18
|
+
onUndockTranscriptPanel: () => void;
|
|
19
|
+
/** Tap on workflow handle when drag did not start (toggle workflow drawer). */
|
|
20
|
+
onToggleWorkflowDrawer: () => void;
|
|
21
|
+
/** Per-conversation key for persisting float geometry; cleared on conversation end. */
|
|
22
|
+
persistKey: string;
|
|
23
|
+
};
|
|
24
|
+
export type TranscriptPanelDragResize = {
|
|
25
|
+
transcriptBoxRef: RefObject<HTMLDivElement>;
|
|
26
|
+
floatSettling: boolean;
|
|
27
|
+
floatDragging: boolean;
|
|
28
|
+
floatResizeDragging: boolean;
|
|
29
|
+
/** True on the first paint when a persisted geometry is restored (suppress entry animation). */
|
|
30
|
+
enterAnimSuppressed: boolean;
|
|
31
|
+
floatStripGestureHandlers: TranscriptWorkflowStripGestureHandlers | undefined;
|
|
32
|
+
dockStripGestureHandlers: TranscriptWorkflowStripGestureHandlers | undefined;
|
|
33
|
+
onFloatCornerPointerDown: (corner: FloatResizeCorner) => (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
34
|
+
onDrawerResizePointerDown: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Float-only positioning style (bottom-left anchored). `null` => no custom geometry yet,
|
|
37
|
+
* caller applies the default responsive corner anchor.
|
|
38
|
+
*/
|
|
39
|
+
floatBoxStyle: CSSProperties | null;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Float transcript card drag / resize / dock with a single bottom-left pixel-geometry source of
|
|
43
|
+
* truth, viewport snapping on release, viewport-capped resize, persistence, and a tiny-threshold
|
|
44
|
+
* docked→float undock. Direct DOM writes during a gesture (rAF-batched) keep React renders out of
|
|
45
|
+
* the hot path; state is committed once on release.
|
|
46
|
+
*/
|
|
47
|
+
export declare function useTranscriptPanelDragResize({ hooks, isDockedPanel, showTranscript, workflowDrawerOpen, drawerWidthPx, onDrawerWidthChange, onDockTranscriptPanel, onUndockTranscriptPanel, onToggleWorkflowDrawer, persistKey, }: UseTranscriptPanelDragResizeParams): TranscriptPanelDragResize;
|
|
@@ -8,6 +8,7 @@ import { ConversationManager } from '../utils/conversationManager';
|
|
|
8
8
|
import type { RecordingStatus } from '../types/GuideAI.types';
|
|
9
9
|
import type { GuideAIEnvironment } from '../types/GuideAI.types';
|
|
10
10
|
import type { StoredMessage } from '../utils/messageStorage';
|
|
11
|
+
import type { MutableRefObject } from 'react';
|
|
11
12
|
export type PropTools = Record<string, {
|
|
12
13
|
description: string;
|
|
13
14
|
parameters: object;
|
|
@@ -67,6 +68,12 @@ export interface UseWebRTCParams {
|
|
|
67
68
|
workspaceGreetingRef?: {
|
|
68
69
|
current: string | null;
|
|
69
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* Workspace visual-context policy from each `/initialize` response. `undefined` means a
|
|
73
|
+
* legacy server omitted the field (host prop / default applies). Fires on every session
|
|
74
|
+
* (re)connect so workspace switches re-apply the new workspace's policy.
|
|
75
|
+
*/
|
|
76
|
+
onVisualContextPolicy?: (enabled: boolean | undefined) => void;
|
|
70
77
|
/** Fire-and-forget workspace catalog fetch in parallel with initialize (after access-key session if any). */
|
|
71
78
|
onWorkspaceCatalogPrefetch?: () => void;
|
|
72
79
|
/** Read at connect — published workflow id for /initialize (null = server default). */
|
|
@@ -77,6 +84,8 @@ export interface UseWebRTCParams {
|
|
|
77
84
|
rollupWorkflowsForInitRef?: {
|
|
78
85
|
current: boolean;
|
|
79
86
|
};
|
|
87
|
+
/** Filled by `useConversationSession`; used to renew WebRTC after `session_expired`. */
|
|
88
|
+
reestablishRealtimeSessionRef?: MutableRefObject<((callOptions?: InitializeWebRTCCallOptions) => Promise<boolean>) | null>;
|
|
80
89
|
}
|
|
81
90
|
/** One-shot options for a single `initializeWebRTC` call (e.g. reconnect before React commits new workspace). */
|
|
82
91
|
export type InitializeWebRTCCallOptions = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { MutableRefObject } from 'react';
|
|
2
2
|
import type { TranscriptSessionMode } from '../types/GuideAI.types';
|
|
3
3
|
import type { StubWorkspaceOption } from '../stubs/workspaces';
|
|
4
|
+
import type { ConversationManager } from '../utils/conversationManager';
|
|
4
5
|
import type { ReactHooks } from '../utils/reactHooks';
|
|
5
6
|
import type { InitializeWebRTCCallOptions } from './useWebRTC';
|
|
6
7
|
export type UseWidgetWorkflowSessionParams = {
|
|
@@ -14,6 +15,7 @@ export type UseWidgetWorkflowSessionParams = {
|
|
|
14
15
|
sessionWorkflowIdForInitRef?: MutableRefObject<string | null>;
|
|
15
16
|
/** Filled after `reestablishActiveRealtimeSession` is defined; read at call time. */
|
|
16
17
|
reestablishRef: MutableRefObject<((callOptions?: InitializeWebRTCCallOptions) => Promise<boolean>) | null>;
|
|
18
|
+
conversationManagerRef: MutableRefObject<ConversationManager | null>;
|
|
17
19
|
/**
|
|
18
20
|
* Optional shared ref (e.g. with `useTranscriptChrome`) so clearing workflow id on session mode
|
|
19
21
|
* change stays in sync. Takes precedence over `sessionWorkflowIdForInitRef` when both are set.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { ReactHooks } from '../utils/reactHooks';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Workflow tester → same `queueWorkflowSteerTitle` path as transcript workflow focus.
|
|
4
|
+
* {@link useWorkflowTesterSteerBridge} assigns {@link queueWorkflowSteerForWorkflowTester.current}.
|
|
5
|
+
*/
|
|
6
|
+
export declare const queueWorkflowSteerForWorkflowTester: {
|
|
7
|
+
current: ((workflowStepLabel: string) => void) | null;
|
|
8
|
+
};
|
|
9
|
+
export interface UseWorkflowTesterSteerBridgeParams {
|
|
3
10
|
hooks: ReactHooks;
|
|
4
11
|
/** Same `queueWorkflowSteerTitle` as transcript workflow focus; wired to the workflow tester bridge. */
|
|
5
12
|
queueWorkflowSteerTitle?: (title: string) => void;
|
|
6
13
|
}
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
* When `queueWorkflowSteerTitle` is provided, assigns {@link queueWorkflowSteerForWorkflowTester} for the panel.
|
|
10
|
-
*/
|
|
11
|
-
export declare function useWorkflowTesterOverlay({ hooks, queueWorkflowSteerTitle, }: UseWorkflowTesterOverlayParams): {
|
|
12
|
-
visible: boolean;
|
|
13
|
-
close: () => void;
|
|
14
|
-
toggle: () => void;
|
|
15
|
-
};
|
|
14
|
+
/** Wires workflow tester steer enqueue to transcript `queueWorkflowSteerTitle`. */
|
|
15
|
+
export declare function useWorkflowTesterSteerBridge({ hooks, queueWorkflowSteerTitle, }: UseWorkflowTesterSteerBridgeParams): void;
|
|
@@ -18,6 +18,7 @@ export type UseWorkspaceCatalogParams = {
|
|
|
18
18
|
setApiWorkspaceOptions: Dispatch<SetStateAction<StubWorkspaceOption[] | null>>;
|
|
19
19
|
setApiWorkflowsByWorkspaceId: Dispatch<SetStateAction<Record<string, StubWorkflowItem[]> | null>>;
|
|
20
20
|
setTranscriptSessionMode: Dispatch<SetStateAction<TranscriptSessionMode>>;
|
|
21
|
+
setCatalogFatal: Dispatch<SetStateAction<boolean>>;
|
|
21
22
|
};
|
|
22
23
|
/**
|
|
23
24
|
* Workspace catalog fetch coalescing, pending-apply when the conversation is active but the data
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import GuideAI from './GuideAI';
|
|
|
2
2
|
import TranscriptBox from './components/TranscriptBox';
|
|
3
3
|
export default GuideAI;
|
|
4
4
|
export { TranscriptBox };
|
|
5
|
-
export type { GuideAIProps, GuideAIHostUserInfo, GuideAIEnvironment, TranscriptSessionMode, TranscriptPanelMode, MicPromptAnimationId, MicPromptPillExpandId, } from './types/GuideAI.types';
|
|
5
|
+
export type { GuideAIProps, GuideAIHostUserInfo, GuideAIEnvironment, GuideAILauncherOptions, GuideAILauncherTabSide, GuideAILauncherVariant, GuideAIThemeId, TranscriptSessionMode, TranscriptPanelMode, MicPromptAnimationId, MicPromptPillExpandId, } from './types/GuideAI.types';
|
|
6
6
|
export { MIC_PROMPT_ANIMATION_IDS, MIC_PROMPT_PILL_EXPAND_IDS, isMicPromptPillExpand, } from './types/GuideAI.types';
|
|
7
7
|
export * from './visualContext';
|
|
8
8
|
export * from './visualContext/types';
|
|
@@ -13,3 +13,6 @@ export { WIDGET_BEARER_TOKEN_STORAGE_KEY, type StoredWidgetBearerRecord, } from
|
|
|
13
13
|
export { clearStoredWidgetSession } from './utils/widgetSession';
|
|
14
14
|
export { type WidgetWorkspaceRow, type WidgetWorkspacesResponse, postWidgetProfile, } from './utils/api';
|
|
15
15
|
export { runHostUserInfoSync, resetWidgetEndUserIdentity, GUIDEAI_HOST_USERINFO_REFRESH_EVENT, } from './utils/hostUserIdentity';
|
|
16
|
+
export { GUIDEAI_THEME_IDS, isGuideAIThemeId } from './themes/guideAIThemeIds';
|
|
17
|
+
export { GUIDEAI_PRESET_THEMES, GUIDEAI_LIGHT_PRESETS, GUIDEAI_DARK_PRESETS, } from './themes/presetThemes';
|
|
18
|
+
export type { GuideAIThemePreset } from './themes/themeTokens.types';
|
|
@@ -47,7 +47,6 @@ declare const ICON_MAP: {
|
|
|
47
47
|
readonly video: LucideIcon;
|
|
48
48
|
};
|
|
49
49
|
export type WorkspaceEmbedIconId = keyof typeof ICON_MAP;
|
|
50
|
-
export declare const WORKSPACE_EMBED_ICON_IDS: WorkspaceEmbedIconId[];
|
|
51
50
|
export declare function isWorkspaceEmbedIconId(id: string): id is WorkspaceEmbedIconId;
|
|
52
51
|
export declare const DEFAULT_WORKSPACE_EMBED_ICON: WorkspaceEmbedIconId;
|
|
53
52
|
export declare function WorkspaceEmbedIcon({ iconId, className }: {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BuddyState } from './buddy/types';
|
|
2
|
+
export type PlaywrightBuddyHarness = {
|
|
3
|
+
executeTool: (name: string, args: string) => Promise<unknown>;
|
|
4
|
+
readState: (userId?: string) => BuddyState;
|
|
5
|
+
clearState: (userId?: string) => BuddyState;
|
|
6
|
+
toolNames: readonly string[];
|
|
7
|
+
};
|
|
8
|
+
declare global {
|
|
9
|
+
interface Window {
|
|
10
|
+
__GUIDEAI_BUDDY__?: PlaywrightBuddyHarness;
|
|
11
|
+
}
|
|
12
|
+
}
|