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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StoredMessage } from '../../utils/messageStorage';
|
|
3
|
+
export type LearnLiteLine = {
|
|
4
|
+
kind: 'narration';
|
|
5
|
+
text: string;
|
|
6
|
+
key: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'assistant';
|
|
9
|
+
text: string;
|
|
10
|
+
key: string;
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'click';
|
|
13
|
+
selector: string;
|
|
14
|
+
key: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function buildLearnLiteLines(messages: StoredMessage[]): LearnLiteLine[];
|
|
17
|
+
export type LearnLiteTranscriptProps = {
|
|
18
|
+
lines: LearnLiteLine[];
|
|
19
|
+
/** Clarifying phase — Q&A copy instead of capture listening hint. */
|
|
20
|
+
clarifying?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function LearnLiteTranscript({ lines, clarifying }: LearnLiteTranscriptProps): React.JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type LearnPhase = 'off' | 'capturing' | 'capturing_paused' | 'clarifying' | 'generating';
|
|
2
|
+
export declare function learnModeActiveForInit(phase: LearnPhase): boolean;
|
|
3
|
+
export declare function learnCaptureOkClampPhase(phase: LearnPhase): string | null;
|
|
4
|
+
/** Lite capture chrome (banner + lite transcript + toolbar); hides full transcript shell. */
|
|
5
|
+
export declare function learnFocusModeActive(phase: LearnPhase, clarifyDone: boolean): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LearnModePanelProps } from './LearnModePanel';
|
|
2
|
+
import type { LearnPhase } from './learnModeTypes';
|
|
3
|
+
export declare const LEARN_PHASE_OFF: LearnPhase;
|
|
4
|
+
/** Learn panel props before lazy orchestration loads (phase stays off). */
|
|
5
|
+
export declare function createLearnOrchestrationStub(onRequestOrchestration: () => void): LearnModePanelProps;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MutableRefObject } from 'react';
|
|
2
|
+
import type { RecordingStatus } from '../../types/GuideAI.types';
|
|
3
|
+
export type LearnRealtimeSessionDeps = {
|
|
4
|
+
hasInitializedRef: MutableRefObject<boolean>;
|
|
5
|
+
startConversationSession: () => Promise<boolean>;
|
|
6
|
+
setStatus: (status: RecordingStatus) => void;
|
|
7
|
+
setIsConversationActive: (active: boolean) => void;
|
|
8
|
+
};
|
|
9
|
+
/** Ensure a realtime voice session for Learn capture / clarify (moved out of GuideAI). */
|
|
10
|
+
export declare function createEnsureLearnRealtimeSession(deps: LearnRealtimeSessionDeps): () => Promise<boolean>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Module-level learn refs for WebRTC / data-channel hot paths (no GuideAI re-renders).
|
|
3
|
+
* `useLearnMode` syncs these when phase changes.
|
|
4
|
+
*/
|
|
5
|
+
export declare const learnModeRef: {
|
|
6
|
+
current: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const learnInitPhaseRef: {
|
|
9
|
+
current: "capture" | "clarify";
|
|
10
|
+
};
|
|
11
|
+
export declare const learnClarifyConversationIdRef: {
|
|
12
|
+
current: string | null;
|
|
13
|
+
};
|
|
14
|
+
export declare const learnCapturePhaseRef: {
|
|
15
|
+
current: string | null;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Capture-phase conversation id to reuse on connect. Normally `null` (each Start capture creates a
|
|
19
|
+
* fresh learn conversation); set only when restoring a capture session after a page reload so the
|
|
20
|
+
* reconnect re-attaches to the original conversation instead of forking a new one.
|
|
21
|
+
*/
|
|
22
|
+
export declare const learnCaptureConversationIdRef: {
|
|
23
|
+
current: string | null;
|
|
24
|
+
};
|
|
25
|
+
export declare const learnRefBag: {
|
|
26
|
+
learnModeRef: {
|
|
27
|
+
current: boolean;
|
|
28
|
+
};
|
|
29
|
+
learnInitPhaseRef: {
|
|
30
|
+
current: "capture" | "clarify";
|
|
31
|
+
};
|
|
32
|
+
learnClarifyConversationIdRef: {
|
|
33
|
+
current: string | null;
|
|
34
|
+
};
|
|
35
|
+
learnCapturePhaseRef: {
|
|
36
|
+
current: string | null;
|
|
37
|
+
};
|
|
38
|
+
learnCaptureConversationIdRef: {
|
|
39
|
+
current: string | null;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { LearnPhase } from './learnModeTypes';
|
|
2
|
+
/** Phases worth restoring after a reload — `off` / `generating` are never persisted directly. */
|
|
3
|
+
export type RestorableLearnPhase = Extract<LearnPhase, 'capturing' | 'capturing_paused' | 'clarifying'>;
|
|
4
|
+
export type PendingLearnSession = {
|
|
5
|
+
phase: RestorableLearnPhase;
|
|
6
|
+
/** Server learn conversation id (capture conversation; reused for clarify re-init + generate). */
|
|
7
|
+
conversationId: string;
|
|
8
|
+
/** Locked workspace slug for generate. */
|
|
9
|
+
workspaceSlug: string;
|
|
10
|
+
proposedTitle: string;
|
|
11
|
+
/** True once the admin clicked "Done clarifying" (focus exited; Generate available). */
|
|
12
|
+
clarifyDone: boolean;
|
|
13
|
+
/** Ms since epoch — when the session was last persisted. */
|
|
14
|
+
startedAt: number;
|
|
15
|
+
};
|
|
16
|
+
export declare function getPendingLearnSession(): PendingLearnSession | null;
|
|
17
|
+
export declare function refreshLearnSessionActiveFlag(): void;
|
|
18
|
+
/** Cheap, allocation-free check for hot paths (e.g. GuideAI auto-restore gate). */
|
|
19
|
+
export declare function isLearnSessionActive(): boolean;
|
|
20
|
+
/** True when sessionStorage holds a resumable learn session (no side effects). */
|
|
21
|
+
export declare function hasPendingLearnSession(): boolean;
|
|
22
|
+
export declare function setPendingLearnSession(session: PendingLearnSession): void;
|
|
23
|
+
export declare function clearPendingLearnSession(): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type LearnWebRTCPropToolDef = {
|
|
2
|
+
description: string;
|
|
3
|
+
parameters: object;
|
|
4
|
+
};
|
|
5
|
+
export type LearnWebRTCPropTools = Record<string, LearnWebRTCPropToolDef>;
|
|
6
|
+
export type LearnWebRTCInitResolution = {
|
|
7
|
+
learnActive: boolean;
|
|
8
|
+
initializeEndpoint: string;
|
|
9
|
+
propToolsSerialized: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
parameters: object;
|
|
13
|
+
}> | undefined;
|
|
14
|
+
learnPhase: 'capture' | 'clarify' | undefined;
|
|
15
|
+
learnConversationId: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
/** Learn stop/capture reconnect closes the data channel before the peer connection. */
|
|
18
|
+
export declare function shouldSkipChatResetOnDataChannelClose(isRenewingRealtimeSession: boolean): boolean;
|
|
19
|
+
/** Resolves `/learn/initialize` vs `/initialize` and related payload fields from module-level learn refs. */
|
|
20
|
+
export declare function resolveLearnWebRTCInit(apiBase: string, propTools?: LearnWebRTCPropTools): LearnWebRTCInitResolution;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StubWorkspaceOption } from '../../stubs/workspaces';
|
|
2
|
+
export declare function resolveLearnWorkspaceContext(transcriptSessionMode: string, workspaceOptions: StubWorkspaceOption[], widgetAuthWorkspace?: string): {
|
|
3
|
+
workspaceSlug: string;
|
|
4
|
+
workspaceName: string;
|
|
5
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { LearnOrchestrationHostProps } from './LearnOrchestrationHost';
|
|
3
|
+
export type LearnOrchestrationLoadResult = {
|
|
4
|
+
LearnOrchestrationHost: ComponentType<LearnOrchestrationHostProps>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Dynamic entry for Learn orchestration (`useLearnMode`, capture chrome, focus callbacks).
|
|
8
|
+
* Loaded on first Learn tab open or Start capture — not on widget mount.
|
|
9
|
+
*/
|
|
10
|
+
export declare function loadLearnOrchestration(): Promise<LearnOrchestrationLoadResult>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ReactHooks } from '../../utils/reactHooks';
|
|
2
|
+
import type { LearnPhase } from './learnModeTypes';
|
|
3
|
+
/** Elapsed capture time in MM:SS, excluding paused intervals. */
|
|
4
|
+
export declare function useLearnCaptureDuration(hooks: ReactHooks, phase: LearnPhase, capturePausedAt: number | null): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactHooks } from '../../utils/reactHooks';
|
|
2
|
+
import type { ConversationManager } from '../../utils/conversationManager';
|
|
3
|
+
import type { DataChannelManager } from '../../utils/dataChannel';
|
|
4
|
+
import type { LearnPhase } from './learnModeTypes';
|
|
5
|
+
export declare function useLearnClickCapture(hooks: ReactHooks, params: {
|
|
6
|
+
phase: LearnPhase;
|
|
7
|
+
getConversationManager: () => ConversationManager | null;
|
|
8
|
+
getDataChannelManager: () => DataChannelManager | null;
|
|
9
|
+
}): void;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ReactHooks } from '../../utils/reactHooks';
|
|
2
|
+
import type { GuideAIEnvironment } from '../../types/GuideAI.types';
|
|
3
|
+
import type { ConversationManager } from '../../utils/conversationManager';
|
|
4
|
+
import type { DataChannelManager } from '../../utils/dataChannel';
|
|
5
|
+
import { type LearnPhase } from './learnModeTypes';
|
|
6
|
+
export type UseLearnModeParams = {
|
|
7
|
+
hooks: ReactHooks;
|
|
8
|
+
adminAvailable: boolean;
|
|
9
|
+
conversationIdRef: {
|
|
10
|
+
current: string | null;
|
|
11
|
+
};
|
|
12
|
+
getConversationManager: () => ConversationManager | null;
|
|
13
|
+
getDataChannelManager: () => DataChannelManager | null;
|
|
14
|
+
cleanupWebRTC: () => void;
|
|
15
|
+
ensureRealtimeSession: () => Promise<boolean>;
|
|
16
|
+
/** Whether the host widget has finished its initial setup (gates reload-restore reconnect). */
|
|
17
|
+
isWidgetInitialized: () => boolean;
|
|
18
|
+
/** Same as transcript Reset chat (`handleResetChat`), without confirm. */
|
|
19
|
+
performResetChat: () => void | Promise<void>;
|
|
20
|
+
handleToggleMute: () => void;
|
|
21
|
+
applyMicMuted: (muted: boolean) => void;
|
|
22
|
+
isMuted: boolean;
|
|
23
|
+
isAssistantPlaybackMuted: boolean;
|
|
24
|
+
handleToggleAssistantPlaybackMute: () => void;
|
|
25
|
+
workspaceSlug: string;
|
|
26
|
+
environment?: GuideAIEnvironment;
|
|
27
|
+
portalToken: string | null;
|
|
28
|
+
syncTranscriptFromStorage: () => void;
|
|
29
|
+
};
|
|
30
|
+
export type UseLearnModeResult = {
|
|
31
|
+
phase: LearnPhase;
|
|
32
|
+
learnFocusMode: boolean;
|
|
33
|
+
capturePausedAt: number | null;
|
|
34
|
+
proposedTitle: string;
|
|
35
|
+
setProposedTitle: (t: string) => void;
|
|
36
|
+
generatedWorkflowId: string | null;
|
|
37
|
+
adminWorkflowUrl: string | null;
|
|
38
|
+
clarifyDone: boolean;
|
|
39
|
+
startCapture: () => Promise<void>;
|
|
40
|
+
pauseCapture: () => void;
|
|
41
|
+
resumeCapture: () => void;
|
|
42
|
+
stopCapture: () => Promise<void>;
|
|
43
|
+
finishClarifying: () => Promise<void>;
|
|
44
|
+
generateWorkflow: () => Promise<void>;
|
|
45
|
+
cancelLearn: () => void;
|
|
46
|
+
};
|
|
47
|
+
export declare function useLearnMode(params: UseLearnModeParams): UseLearnModeResult;
|
|
@@ -5,3 +5,9 @@ export declare const DEVTOOLS_PANEL_WIDTH_PX = 520;
|
|
|
5
5
|
* Initial top-left for a right-aligned devtools dialog (avoids overlapping the widget).
|
|
6
6
|
*/
|
|
7
7
|
export declare function getInitialRightAlignedPanelPosition(panelWidth: number, top?: number, margin?: number): DraggableDialogPosition;
|
|
8
|
+
/** Clamp a stored / dragged position so the shell stays on-screen. */
|
|
9
|
+
export declare function clampDevtoolsShellPosition(position: DraggableDialogPosition): DraggableDialogPosition;
|
|
10
|
+
/**
|
|
11
|
+
* Restored shell position from localStorage, or the default right-aligned placement.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getDevtoolsShellInitialPosition(): DraggableDialogPosition;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Devtools "silent message" debug bus.
|
|
3
|
+
*
|
|
4
|
+
* Several GuideAI subsystems push context to the realtime LLM **without** showing a
|
|
5
|
+
* transcript line: hidden workspace greetings / workflow & resume steers, session-state
|
|
6
|
+
* notes (mic / playback unmuted), Static Context page blobs, Visual Context
|
|
7
|
+
* screenshots, the resume context replayed after a session restart (recent transcript +
|
|
8
|
+
* static-context snapshots sent once on refresh/reconnect), and the tool calls
|
|
9
|
+
* (function_call → function_call_output) the model runs against the page. When the
|
|
10
|
+
* operator turns on the **Show silent messages** developer-tools flag, those sends are
|
|
11
|
+
* surfaced as clickable entries in the transcript so they can be inspected (full text,
|
|
12
|
+
* pretty JSON, or the full-size screenshot).
|
|
13
|
+
*
|
|
14
|
+
* This module is the wire: emitters dispatch a `window` CustomEvent that
|
|
15
|
+
* `useSilentMessageDebug` listens to.
|
|
16
|
+
*
|
|
17
|
+
* PERFORMANCE CONTRACT (keep for every current and future emitter): this is a
|
|
18
|
+
* developer-only diagnostic and must never slow down or inhibit the normal user
|
|
19
|
+
* experience. Emission is **gated on the persisted "Show silent messages" flag**, so
|
|
20
|
+
* production users (who cannot reach this administrator-only toggle) pay nothing beyond
|
|
21
|
+
* a boolean check per hidden send — no classification, no string building, no JSON
|
|
22
|
+
* pretty-printing, no event allocation or dispatch. Any new emitter MUST check the flag
|
|
23
|
+
* first and return before doing any other work, and emitters must never throw into the
|
|
24
|
+
* send path they observe.
|
|
25
|
+
*/
|
|
26
|
+
/** Dispatched on `window` for every silent message sent to the realtime LLM. */
|
|
27
|
+
export declare const SILENT_MESSAGE_DEBUG_EVENT = "guideai:silent-message";
|
|
28
|
+
/** Dispatched on `window` when the "Show silent messages" flag is toggled. */
|
|
29
|
+
export declare const SILENT_MESSAGE_DEBUG_FLAG_EVENT = "guideai:silent-message-flag";
|
|
30
|
+
export type SilentMessageKind = 'steer' | 'session_note' | 'static_context' | 'resume_context' | 'screenshot' | 'tool_call' | 'tool_failure';
|
|
31
|
+
export type SilentMessageDetailType = 'text' | 'json' | 'image';
|
|
32
|
+
export interface SilentDebugMessage {
|
|
33
|
+
/** Unique per entry (timestamp + counter) so React keys stay stable across merges. */
|
|
34
|
+
id: string;
|
|
35
|
+
kind: SilentMessageKind;
|
|
36
|
+
/** Short badge label, e.g. "Steer", "Static context", "Screenshot". */
|
|
37
|
+
label: string;
|
|
38
|
+
/** One-line preview shown inline in the transcript. */
|
|
39
|
+
summary: string;
|
|
40
|
+
detailType: SilentMessageDetailType;
|
|
41
|
+
/** Full payload for the detail view: text, pretty-printed JSON, or an image data URL. */
|
|
42
|
+
detail: string;
|
|
43
|
+
timestamp: number;
|
|
44
|
+
}
|
|
45
|
+
/** Subset of {@link SilentDebugMessage} that callers provide; `id` is assigned on emit. */
|
|
46
|
+
export type SilentDebugMessageInput = Omit<SilentDebugMessage, 'id'>;
|
|
47
|
+
/**
|
|
48
|
+
* Classify a context-only realtime user-text send into a debug entry. Used by the
|
|
49
|
+
* shared text chokepoint (`sendSilentRealtimeUserNote`) so steers, session notes, and
|
|
50
|
+
* Static Context blobs all surface with the right label and detail rendering.
|
|
51
|
+
*/
|
|
52
|
+
export declare function classifySilentText(text: string): SilentDebugMessageInput | null;
|
|
53
|
+
/**
|
|
54
|
+
* Dispatch a silent-message debug entry on `window`. No-op outside the browser or when
|
|
55
|
+
* the "Show silent messages" flag is off (the production default).
|
|
56
|
+
*/
|
|
57
|
+
export declare function emitSilentDebugMessage(input: SilentDebugMessageInput): void;
|
|
58
|
+
/**
|
|
59
|
+
* Convenience wrapper: classify a context-only user-text send, then emit it.
|
|
60
|
+
* `summaryOverride` replaces the inline preview (e.g. the static-context trigger).
|
|
61
|
+
* Returns before classifying (JSON parse / pretty-print) when the flag is off.
|
|
62
|
+
*/
|
|
63
|
+
export declare function emitSilentDebugTextMessage(text: string, summaryOverride?: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* Emit a debug entry for the resume context replayed once after a realtime session is
|
|
66
|
+
* re-established (e.g. the user refreshed the page mid-conversation): the recent
|
|
67
|
+
* transcript plus the static-context page snapshots recorded before the restart.
|
|
68
|
+
* Returns before any string work when the flag is off (the production default), so the
|
|
69
|
+
* reconnect path pays only a boolean check.
|
|
70
|
+
*/
|
|
71
|
+
export declare function emitSilentDebugResumeContextMessage(text: string): void;
|
|
72
|
+
/** Outcome of a realtime tool call for {@link emitSilentDebugToolCallMessage}. */
|
|
73
|
+
export interface SilentToolCallOutcome {
|
|
74
|
+
/** Value returned by the tool handler; included in the detail view when present. */
|
|
75
|
+
result?: unknown;
|
|
76
|
+
/** Failure description; when set the entry is emitted as a "Tool failed" row. */
|
|
77
|
+
error?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Emit a debug entry for a realtime tool call (`function_call` from the model).
|
|
81
|
+
* Returns before any JSON formatting when the flag is off (the production default),
|
|
82
|
+
* so the assistant tool path pays only a boolean check per call.
|
|
83
|
+
*/
|
|
84
|
+
export declare function emitSilentDebugToolCallMessage(name: string, argsJson: string, outcome?: SilentToolCallOutcome): void;
|
|
85
|
+
/** Notify listeners that the "Show silent messages" flag changed. */
|
|
86
|
+
export declare function emitSilentMessageDebugFlagChange(enabled: boolean): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collects silent/hidden LLM messages for the devtools "Show silent messages" transcript
|
|
3
|
+
* view. Only accumulates while the persisted flag is enabled (emitters are also gated on
|
|
4
|
+
* the same flag, so nothing is even dispatched for production users — this developer
|
|
5
|
+
* tool must never slow the normal user experience) so the transcript can interleave
|
|
6
|
+
* these entries (steers, session notes, static context, the post-refresh resume context,
|
|
7
|
+
* screenshots, tool calls and tool failures) with normal messages. Disabling the flag
|
|
8
|
+
* clears any collected entries.
|
|
9
|
+
* See `silentMessageDebug.ts` for the emitters.
|
|
10
|
+
*/
|
|
11
|
+
import { type SilentDebugMessage } from './silentMessageDebug';
|
|
12
|
+
export interface UseSilentMessageDebugResult {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
entries: SilentDebugMessage[];
|
|
15
|
+
toggle: () => void;
|
|
16
|
+
clear: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function useSilentMessageDebug(React: typeof import('react')): UseSilentMessageDebugResult;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Shell toggle control inside transcript ⋯ → Developer tools. */
|
|
2
|
+
export type DeveloperToolsShellControl = {
|
|
3
|
+
shellOpen: boolean;
|
|
4
|
+
onToggleShell: () => void;
|
|
5
|
+
} | null;
|
|
6
|
+
import type { GuideAIEnvironment } from '../types/GuideAI.types';
|
|
7
|
+
/** Grouped devtools props for TranscriptBox / TranscriptTextInput / TranscriptToolbar. */
|
|
8
|
+
export type TranscriptDevtoolsMenuProps = {
|
|
9
|
+
/** Full Developer tools section in ⋯ (extension admin or embed after admin login). */
|
|
10
|
+
sectionVisible: boolean;
|
|
11
|
+
shellControl: DeveloperToolsShellControl;
|
|
12
|
+
/** Open in admin flyout (conversation / workflow). */
|
|
13
|
+
adminPortal?: {
|
|
14
|
+
getServerConversationId: () => string | null;
|
|
15
|
+
environment?: GuideAIEnvironment;
|
|
16
|
+
};
|
|
17
|
+
login: {
|
|
18
|
+
/** Embed: Developer login row after hidden unlock, before admin sign-in. */
|
|
19
|
+
visible: boolean;
|
|
20
|
+
onOpen: () => void;
|
|
21
|
+
showLogout: boolean;
|
|
22
|
+
onLogout: () => void;
|
|
23
|
+
};
|
|
24
|
+
unlock: {
|
|
25
|
+
/** Embed: triple-click transcript workflow title. No-op in extension. */
|
|
26
|
+
onToolbarTitleClick: () => void;
|
|
27
|
+
};
|
|
28
|
+
/** Surface silent/hidden LLM messages (steers, static context, screenshots) in the transcript. */
|
|
29
|
+
silentMessages?: {
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
onToggle: () => void;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GuideAIEnvironment } from '../../types/GuideAI.types';
|
|
3
|
+
type DeveloperToolsAdminPortalFlyoutProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
flyoutStyle: React.CSSProperties | null;
|
|
6
|
+
usePortal: boolean;
|
|
7
|
+
ReactDOM?: {
|
|
8
|
+
createPortal: (children: React.ReactNode, container: Element) => React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
listRef: React.RefObject<HTMLUListElement>;
|
|
11
|
+
themePortalProps: {
|
|
12
|
+
'data-guideai-theme'?: string;
|
|
13
|
+
};
|
|
14
|
+
getServerConversationId: () => string | null;
|
|
15
|
+
widgetEnvironment?: GuideAIEnvironment;
|
|
16
|
+
onCloseMenu: () => void;
|
|
17
|
+
};
|
|
18
|
+
/** Portaled Open in admin submenu (⋯ → Developer tools). */
|
|
19
|
+
export declare function DeveloperToolsAdminPortalFlyout({ open, flyoutStyle, usePortal, ReactDOM, listRef, themePortalProps, getServerConversationId, widgetEnvironment, onCloseMenu, }: DeveloperToolsAdminPortalFlyoutProps): React.ReactNode;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type DeveloperToolsLoggerFlyoutProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
flyoutStyle: React.CSSProperties | null;
|
|
5
|
+
usePortal: boolean;
|
|
6
|
+
ReactDOM?: {
|
|
7
|
+
createPortal: (children: React.ReactNode, container: Element) => React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
listRef: React.RefObject<HTMLUListElement>;
|
|
10
|
+
themePortalProps: {
|
|
11
|
+
'data-guideai-theme'?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/** Portaled Console debugger submenu (⋯ → Developer tools). */
|
|
15
|
+
export declare function DeveloperToolsLoggerFlyout({ open, flyoutStyle, usePortal, ReactDOM, listRef, themePortalProps, }: DeveloperToolsLoggerFlyoutProps): React.ReactNode;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MicPresetId } from '../../types/audioConfig.types';
|
|
3
|
+
import type { DevtoolsDebugFlyoutId } from './devtoolsFlyoutTypes';
|
|
4
|
+
type DeveloperToolsMicPresetFlyoutProps = {
|
|
5
|
+
moreMenuOpen: boolean;
|
|
6
|
+
debugFlyout: null | DevtoolsDebugFlyoutId;
|
|
7
|
+
flyoutStyle: React.CSSProperties | null;
|
|
8
|
+
usePortal: boolean;
|
|
9
|
+
ReactDOM?: {
|
|
10
|
+
createPortal: (children: React.ReactNode, container: Element) => React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
listRef: React.RefObject<HTMLUListElement>;
|
|
13
|
+
themePortalProps: {
|
|
14
|
+
'data-guideai-theme'?: string;
|
|
15
|
+
};
|
|
16
|
+
micPreset: MicPresetId;
|
|
17
|
+
onApplyMicPreset?: (preset: MicPresetId) => void;
|
|
18
|
+
onCloseFlyout: () => void;
|
|
19
|
+
onCloseMenu: () => void;
|
|
20
|
+
};
|
|
21
|
+
export declare function DeveloperToolsMicPresetFlyout({ moreMenuOpen, debugFlyout, flyoutStyle, usePortal, ReactDOM, listRef, themePortalProps, micPreset, onApplyMicPreset, onCloseFlyout, onCloseMenu, }: DeveloperToolsMicPresetFlyoutProps): React.ReactNode;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GuideAIThemePreset } from '../../themes/themeTokens.types';
|
|
3
|
+
type ThemePresetSwatchProps = {
|
|
4
|
+
preset: Pick<GuideAIThemePreset, 'tokens'>;
|
|
5
|
+
};
|
|
6
|
+
/** Accent dot for the devtools theme picker (light/dark grouping is in section headers). */
|
|
7
|
+
export declare function ThemePresetSwatch({ preset }: ThemePresetSwatchProps): React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DeveloperToolsShellControl } from '../transcriptDevtoolsMenuProps';
|
|
3
|
+
import type { DevtoolsDebugFlyoutId } from './devtoolsFlyoutTypes';
|
|
4
|
+
type TranscriptDeveloperToolsMoreMenuItemsProps = {
|
|
5
|
+
sectionVisible: boolean;
|
|
6
|
+
shellControl: DeveloperToolsShellControl;
|
|
7
|
+
loginVisible: boolean;
|
|
8
|
+
onOpenLogin: () => void;
|
|
9
|
+
showLogout: boolean;
|
|
10
|
+
onLogout: () => void;
|
|
11
|
+
onCloseMenu: () => void;
|
|
12
|
+
debugFlyout: null | DevtoolsDebugFlyoutId;
|
|
13
|
+
setDebugFlyout: React.Dispatch<React.SetStateAction<null | DevtoolsDebugFlyoutId>>;
|
|
14
|
+
loggerFlyoutTriggerRef: React.RefObject<HTMLButtonElement>;
|
|
15
|
+
adminPortalFlyoutTriggerRef: React.RefObject<HTMLButtonElement>;
|
|
16
|
+
themeFlyoutTriggerRef: React.RefObject<HTMLButtonElement>;
|
|
17
|
+
getServerConversationId?: () => string | null;
|
|
18
|
+
silentMessages?: {
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
onToggle: () => void;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
/** Developer login + Developer tools rows in transcript ⋯. */
|
|
24
|
+
export declare function TranscriptDeveloperToolsMoreMenuItems({ sectionVisible, shellControl, loginVisible, onOpenLogin, showLogout, onLogout, onCloseMenu, debugFlyout, setDebugFlyout, loggerFlyoutTriggerRef, adminPortalFlyoutTriggerRef, themeFlyoutTriggerRef, getServerConversationId, silentMessages, }: TranscriptDeveloperToolsMoreMenuItemsProps): React.JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type DeveloperToolsThemeFlyoutProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
flyoutStyle: React.CSSProperties | null;
|
|
5
|
+
usePortal: boolean;
|
|
6
|
+
ReactDOM?: {
|
|
7
|
+
createPortal: (children: React.ReactNode, container: Element) => React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
listRef: React.RefObject<HTMLUListElement>;
|
|
10
|
+
onCloseMenu: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare function DeveloperToolsThemeFlyout({ open, flyoutStyle, usePortal, ReactDOM, listRef, onCloseMenu, }: DeveloperToolsThemeFlyoutProps): React.ReactNode;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MicPresetId } from '../../types/audioConfig.types';
|
|
3
|
+
import type { TranscriptDevtoolsMenuProps } from '../transcriptDevtoolsMenuProps';
|
|
4
|
+
import type { TranscriptMoreMenuDebugFlyoutRefs } from './useTranscriptMoreMenuDebugFlyouts';
|
|
5
|
+
import type { DevtoolsDebugFlyoutId } from './devtoolsFlyoutTypes';
|
|
6
|
+
export type TranscriptMoreMenuDevtoolsMenuProps = {
|
|
7
|
+
transcriptDevtools?: TranscriptDevtoolsMenuProps;
|
|
8
|
+
micPreset: MicPresetId;
|
|
9
|
+
onApplyMicPreset?: (preset: MicPresetId) => void;
|
|
10
|
+
debugFlyout: null | DevtoolsDebugFlyoutId;
|
|
11
|
+
setDebugFlyout: React.Dispatch<React.SetStateAction<null | DevtoolsDebugFlyoutId>>;
|
|
12
|
+
refs: TranscriptMoreMenuDebugFlyoutRefs;
|
|
13
|
+
onCloseMenu: () => void;
|
|
14
|
+
};
|
|
15
|
+
export type TranscriptMoreMenuDevtoolsPortalsProps = Omit<TranscriptMoreMenuDevtoolsMenuProps, 'setDebugFlyout'> & {
|
|
16
|
+
moreMenuOpen: boolean;
|
|
17
|
+
flyoutStyle: React.CSSProperties | null;
|
|
18
|
+
closeFlyout: () => void;
|
|
19
|
+
usePortal: boolean;
|
|
20
|
+
ReactDOM?: {
|
|
21
|
+
createPortal: (children: React.ReactNode, container: Element) => React.ReactNode;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/** Transcript ⋯ menu rows for mic preset + developer tools (inside the more-menu `<ul>`). */
|
|
25
|
+
export declare function TranscriptMoreMenuDevtools({ transcriptDevtools, micPreset, onApplyMicPreset, debugFlyout, setDebugFlyout, refs, onCloseMenu, }: TranscriptMoreMenuDevtoolsMenuProps): React.JSX.Element | null;
|
|
26
|
+
/** Portaled debug flyouts — mount next to the transcript more menu portal. */
|
|
27
|
+
export declare function TranscriptMoreMenuDevtoolsPortals({ transcriptDevtools, micPreset, onApplyMicPreset, moreMenuOpen, debugFlyout, flyoutStyle, refs, onCloseMenu, closeFlyout, usePortal, ReactDOM, }: TranscriptMoreMenuDevtoolsPortalsProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type DevtoolsDebugFlyoutId = 'logger' | 'micPreset' | 'adminPortal' | 'theme';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LoggerComponentKey } from '../../utils/logger';
|
|
2
|
+
type WindowGuideAILogger = {
|
|
3
|
+
enable?: () => void;
|
|
4
|
+
disable?: () => void;
|
|
5
|
+
getStatus?: () => {
|
|
6
|
+
manualEnabled: boolean;
|
|
7
|
+
components: Record<LoggerComponentKey, boolean>;
|
|
8
|
+
};
|
|
9
|
+
setComponentEnabled?: (c: LoggerComponentKey, enabled: boolean) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare function readWindowGuideAILogger(): WindowGuideAILogger | undefined;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DevtoolsDebugFlyoutId } from './devtoolsFlyoutTypes';
|
|
3
|
+
export type TranscriptMoreMenuDebugFlyoutRefs = {
|
|
4
|
+
loggerFlyoutTriggerRef: React.RefObject<HTMLButtonElement>;
|
|
5
|
+
adminPortalFlyoutTriggerRef: React.RefObject<HTMLButtonElement>;
|
|
6
|
+
themeFlyoutTriggerRef: React.RefObject<HTMLButtonElement>;
|
|
7
|
+
micPresetFlyoutTriggerRef: React.RefObject<HTMLButtonElement>;
|
|
8
|
+
loggerDebugFlyoutListRef: React.RefObject<HTMLUListElement>;
|
|
9
|
+
adminPortalFlyoutListRef: React.RefObject<HTMLUListElement>;
|
|
10
|
+
themeFlyoutListRef: React.RefObject<HTMLUListElement>;
|
|
11
|
+
micPresetFlyoutListRef: React.RefObject<HTMLUListElement>;
|
|
12
|
+
};
|
|
13
|
+
export declare function useTranscriptMoreMenuDebugFlyouts(moreMenuOpen: boolean, moreMenuPlacement: {
|
|
14
|
+
left: number;
|
|
15
|
+
bottom: number;
|
|
16
|
+
minWidth: number;
|
|
17
|
+
} | null): {
|
|
18
|
+
debugFlyout: DevtoolsDebugFlyoutId | null;
|
|
19
|
+
setDebugFlyout: React.Dispatch<React.SetStateAction<DevtoolsDebugFlyoutId | null>>;
|
|
20
|
+
flyoutStyle: React.CSSProperties | null;
|
|
21
|
+
refs: TranscriptMoreMenuDebugFlyoutRefs;
|
|
22
|
+
outsideClickRefs: React.RefObject<HTMLUListElement>[];
|
|
23
|
+
closeFlyout: () => void;
|
|
24
|
+
};
|
|
@@ -7,14 +7,21 @@ interface UseDraggableDialogParams {
|
|
|
7
7
|
initialPosition: () => DraggableDialogPosition;
|
|
8
8
|
minVisibleWidth: number;
|
|
9
9
|
minVisibleHeight: number;
|
|
10
|
+
/** When set, used during drag instead of minVisibleWidth/Height (e.g. measured panel size). */
|
|
11
|
+
clampSize?: () => {
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
};
|
|
10
15
|
ignoreSelector?: string;
|
|
16
|
+
/** Called when the user finishes a drag (pointer up) with the settled position. */
|
|
17
|
+
onPositionSettled?: (position: DraggableDialogPosition) => void;
|
|
11
18
|
/**
|
|
12
19
|
* Host dialog handles drag/position; keep hook API stable with a fixed `{0,0}` position
|
|
13
20
|
* and inert drag handlers (e.g. panels nested in {@link DeveloperToolsShell}).
|
|
14
21
|
*/
|
|
15
22
|
embedded?: boolean;
|
|
16
23
|
}
|
|
17
|
-
export declare function useDraggableDialog(React: typeof import('react'), { initialPosition, minVisibleWidth, minVisibleHeight, ignoreSelector, embedded, }: UseDraggableDialogParams): {
|
|
24
|
+
export declare function useDraggableDialog(React: typeof import('react'), { initialPosition, minVisibleWidth, minVisibleHeight, clampSize, ignoreSelector, onPositionSettled, embedded, }: UseDraggableDialogParams): {
|
|
18
25
|
position: DraggableDialogPosition;
|
|
19
26
|
setPosition: import("react").Dispatch<import("react").SetStateAction<DraggableDialogPosition>>;
|
|
20
27
|
dialogRef: import("react").MutableRefObject<HTMLDivElement | null>;
|