guideai-app 0.5.1 → 0.5.4-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +179 -80
- package/dist/GuideAI.d.ts +1 -1
- package/dist/GuideAI.js +1 -1
- package/dist/GuideAI.js.LICENSE.txt +7 -0
- package/dist/GuideAI.js.map +1 -1
- package/dist/__mocks__/fileMock.d.ts +2 -0
- package/dist/components/AudioConfigDialog.d.ts +22 -0
- package/dist/components/DeveloperTools.d.ts +36 -0
- package/dist/components/MicGlyphs.d.ts +9 -0
- package/dist/components/Microphone.d.ts +4 -2
- package/dist/components/NoisyPresetSuggestBanner.d.ts +12 -0
- package/dist/components/PlaybackInterruptLockDebugOverlay.d.ts +19 -0
- package/dist/components/PlaybackLockDebugOverlayRoot.d.ts +14 -0
- package/dist/components/ResetGlyph.d.ts +5 -0
- package/dist/components/SpeakerGlyphs.d.ts +9 -0
- package/dist/components/TranscriptBox.d.ts +65 -8
- package/dist/components/TranscriptMessages.d.ts +8 -1
- package/dist/components/TranscriptTextInput.d.ts +41 -2
- package/dist/components/TranscriptToolbar.d.ts +23 -0
- package/dist/components/TranscriptWorkflowDrawer.d.ts +39 -0
- package/dist/components/WelcomeBubble.d.ts +6 -1
- package/dist/components/WorkspaceStubIcon.d.ts +6 -0
- package/dist/contexts/AdminToolDiagnosticsContext.d.ts +6 -0
- package/dist/devtools/adminToolDiagnostics/AdminToolDiagnosticsPanel.d.ts +16 -0
- package/dist/devtools/adminToolDiagnostics/adminToolDiagnosticsPanelUtils.d.ts +8 -0
- package/dist/devtools/adminToolDiagnostics/adminToolDiagnosticsStyles.d.ts +5 -0
- package/dist/devtools/adminToolDiagnostics/buildDiagnosticsToolNameList.d.ts +6 -0
- package/dist/devtools/adminToolDiagnostics/getIdOrFallbackSelectorForDiagnostics.d.ts +5 -0
- package/dist/devtools/adminToolDiagnostics/index.d.ts +2 -0
- package/dist/devtools/useDraggableDialog.d.ts +23 -0
- package/dist/devtools/visualContextInspector/BufferIndicator.d.ts +15 -0
- package/dist/devtools/visualContextInspector/ConfigSection.d.ts +18 -0
- package/dist/devtools/visualContextInspector/ScreenshotList.d.ts +13 -0
- package/dist/devtools/visualContextInspector/VisualContextInspector.d.ts +36 -0
- package/dist/devtools/visualContextInspector/fieldInfo.d.ts +7 -0
- package/dist/devtools/visualContextInspector/index.d.ts +13 -0
- package/dist/devtools/visualContextInspector/inspectorStore.d.ts +35 -0
- package/dist/devtools/visualContextInspector/inspectorStyles.d.ts +13 -0
- package/dist/devtools/visualContextInspector/types.d.ts +27 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/useAssistantPlaybackMute.d.ts +16 -0
- package/dist/hooks/useAudioConfigSurface.d.ts +20 -0
- package/dist/hooks/useConversationSession.d.ts +69 -0
- package/dist/hooks/useDocToFormDropFlow.d.ts +31 -0
- package/dist/hooks/useGuideAIAPI.d.ts +3 -6
- package/dist/hooks/useGuideAILayout.d.ts +38 -0
- package/dist/hooks/useGuideAILocalStorageSync.d.ts +17 -0
- package/dist/hooks/useHiddenRealtimeSteers.d.ts +22 -0
- package/dist/hooks/useMicMute.d.ts +20 -0
- package/dist/hooks/useMicPreset.d.ts +19 -0
- package/dist/hooks/useMicPromptHook.d.ts +28 -0
- package/dist/hooks/useNoisyPresetSuggest.d.ts +19 -0
- package/dist/hooks/usePlaybackLockDebugOverlay.d.ts +12 -0
- package/dist/hooks/useProtectedPlayback.d.ts +36 -0
- package/dist/hooks/useTranscriptChrome.d.ts +39 -0
- package/dist/hooks/useTranscriptState.d.ts +1 -1
- package/dist/hooks/useWebRTC.d.ts +41 -6
- package/dist/hooks/useWidgetWorkflowSession.d.ts +35 -0
- package/dist/hooks/useWorkspaceCatalog.d.ts +32 -0
- package/dist/index.d.ts +6 -1
- package/dist/lib/workspaceEmbedIcons.d.ts +57 -0
- package/dist/micPrompt.defaults.d.ts +25 -0
- package/dist/playwrightToolHarness.d.ts +8 -0
- package/dist/playwrightToolHarness.js +3 -0
- package/dist/playwrightToolHarness.js.LICENSE.txt +16 -0
- package/dist/playwrightToolHarness.js.map +1 -0
- package/dist/staticContext/collectContext.d.ts +28 -0
- package/dist/staticContext/index.d.ts +8 -0
- package/dist/staticContext/types.d.ts +176 -0
- package/dist/staticContext/useStaticContext.d.ts +32 -0
- package/dist/stubs/workspaces.d.ts +36 -0
- package/dist/styles/GuideAI.styles.d.ts +2 -6
- package/dist/styles/GuideAI.styles.types.d.ts +6 -0
- package/dist/styles/guideAIStylesCore.d.ts +2 -0
- package/dist/styles/guideAIStylesDialogs.d.ts +2 -0
- package/dist/styles/guideAIStylesMicPrompt.d.ts +2 -0
- package/dist/styles/guideAIStylesTranscript.d.ts +2 -0
- package/dist/types/GuideAI.types.d.ts +63 -2
- package/dist/types/audioConfig.types.d.ts +78 -0
- package/dist/utils/api.d.ts +61 -15
- package/dist/utils/confettiBurst.d.ts +6 -0
- package/dist/utils/constants.d.ts +7 -1
- package/dist/utils/conversationManager.d.ts +20 -2
- package/dist/utils/dataChannel.d.ts +56 -6
- package/dist/utils/dataChannelHelpers.d.ts +28 -0
- package/dist/utils/dataTransferHasFiles.d.ts +2 -0
- package/dist/utils/date.d.ts +11 -0
- package/dist/utils/embedConversationNamespace.d.ts +10 -0
- package/dist/utils/isMobileBrowser.d.ts +5 -0
- package/dist/utils/lastSystemToolCall.d.ts +6 -0
- package/dist/utils/localStorageHelper.d.ts +84 -0
- package/dist/utils/logger.d.ts +17 -20
- package/dist/utils/messageStorage.d.ts +16 -11
- package/dist/utils/micPromptThrottle.d.ts +13 -0
- package/dist/utils/positionUtils.d.ts +8 -7
- package/dist/utils/reactHooks.d.ts +14 -0
- package/dist/utils/reducedMotion.d.ts +17 -0
- package/dist/utils/tools/back.d.ts +19 -0
- package/dist/utils/tools/clickElement.d.ts +32 -0
- package/dist/utils/tools/cssPathForElement.d.ts +2 -0
- package/dist/utils/tools/descriptionToHighlightSelector.d.ts +2 -0
- package/dist/utils/tools/docToForm.d.ts +54 -0
- package/dist/utils/tools/docUploadPrompt.d.ts +11 -0
- package/dist/utils/tools/elementInteractions.d.ts +40 -0
- package/dist/utils/tools/fillField.d.ts +41 -0
- package/dist/utils/tools/fillForm.d.ts +49 -0
- package/dist/utils/tools/goToAElmLink.d.ts +27 -0
- package/dist/utils/tools/highlight.d.ts +23 -0
- package/dist/utils/tools/highlightThenClick.d.ts +31 -0
- package/dist/utils/tools/hover.d.ts +23 -0
- package/dist/utils/tools/hoverThenClick.d.ts +37 -0
- package/dist/utils/tools/markWorkflowComplete.d.ts +18 -0
- package/dist/utils/tools/navigateTo.d.ts +23 -0
- package/dist/utils/tools/refresh.d.ts +19 -0
- package/dist/utils/tools/sampleToolArgsJson.d.ts +1 -0
- package/dist/utils/tools/scroll.d.ts +32 -0
- package/dist/utils/tools/toolRegistry.d.ts +55 -0
- package/dist/utils/tools/workflowToolBridge.d.ts +15 -0
- package/dist/utils/webrtcConnection.d.ts +9 -2
- package/dist/utils/widgetAuthStore.d.ts +9 -0
- package/dist/utils/widgetBearerStorage.d.ts +26 -0
- package/dist/utils/widgetSession.d.ts +20 -0
- package/dist/utils/widgetWorkspaces.d.ts +10 -0
- package/dist/utils/workflowSteer.d.ts +6 -0
- package/dist/utils/workspaceCatalog.d.ts +24 -0
- package/dist/visualContext/VisualContextScheduler.d.ts +48 -2
- package/dist/visualContext/domChangeTracker.d.ts +29 -0
- package/dist/visualContext/imageHash.d.ts +19 -0
- package/dist/visualContext/index.d.ts +3 -3
- package/dist/visualContext/types.d.ts +48 -2
- package/dist/visualContext/useVisualContext.d.ts +23 -8
- package/package.json +3 -1
- package/dist/components/AnimatedSettingsItem.d.ts +0 -9
- package/dist/components/MuteButton.d.ts +0 -11
- package/dist/components/ResetButton.d.ts +0 -9
- package/dist/components/SettingsMenu.d.ts +0 -16
- package/dist/components/SettingsToggle.d.ts +0 -7
- package/dist/components/TranscriptToggle.d.ts +0 -7
- package/dist/utils/elementInteractions.d.ts +0 -127
- package/dist/utils/goToAElmLink.d.ts +0 -1
- package/dist/utils/highlightThenClick.d.ts +0 -2
- package/dist/utils/hover.d.ts +0 -2
- package/dist/utils/hoverThenClick.d.ts +0 -2
- package/dist/utils/toolRegistry.d.ts +0 -33
- package/dist/utils/workflow.d.ts +0 -62
- package/dist/visualContext/debug-overlay.d.ts +0 -10
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AudioConfig, StoredAudioConfig, type MicPresetId } from '../types/audioConfig.types';
|
|
2
|
+
interface AudioConfigDialogProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
initialConfig: StoredAudioConfig | null;
|
|
6
|
+
onApply: (config: AudioConfig, stored: StoredAudioConfig) => void;
|
|
7
|
+
/** Fire-and-forget server log when mic preset dropdown changes (same style as mute debug logs). */
|
|
8
|
+
onMicPresetApplied?: (preset: MicPresetId) => void;
|
|
9
|
+
hasRespondedWithAudio: boolean;
|
|
10
|
+
defaultMicLabel: string | null;
|
|
11
|
+
React: typeof import('react');
|
|
12
|
+
ReactDOM?: {
|
|
13
|
+
createPortal: (children: React.ReactNode, container: Element) => React.ReactNode;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare const AudioConfigDialog: {
|
|
17
|
+
({ isOpen, onClose, initialConfig, onApply, onMicPresetApplied, hasRespondedWithAudio, defaultMicLabel, React, ReactDOM, }: AudioConfigDialogProps): import("react").FunctionComponentElement<{
|
|
18
|
+
children?: import("react").ReactNode | undefined;
|
|
19
|
+
}> | null;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export default AudioConfigDialog;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DataChannelManager } from '../utils/dataChannel';
|
|
3
|
+
import { type VisualContextInspectorProps } from '../devtools/visualContextInspector';
|
|
4
|
+
import { type PlaybackLockDebugOverlayRootProps } from './PlaybackLockDebugOverlayRoot';
|
|
5
|
+
import AudioConfigDialog from './AudioConfigDialog';
|
|
6
|
+
type AudioConfigForDeveloperTools = Omit<React.ComponentProps<typeof AudioConfigDialog>, 'React' | 'ReactDOM'>;
|
|
7
|
+
type VisualContextForDeveloperTools = {
|
|
8
|
+
show: boolean;
|
|
9
|
+
} & Omit<VisualContextInspectorProps, 'React' | 'ReactDOM' | 'bufferThresholdBytes'>;
|
|
10
|
+
type ToolDiagnosticsForDeveloperTools = {
|
|
11
|
+
/** @see DataChannelManager — not the WebRTC `RTCDataChannel` from `DataChannelManager#getDataChannel()`. */
|
|
12
|
+
getDataChannelManager: () => DataChannelManager | null;
|
|
13
|
+
propToolNames: string[];
|
|
14
|
+
debugMoreMenu: boolean;
|
|
15
|
+
toolPanelOpen: boolean;
|
|
16
|
+
onCloseToolPanel: () => void;
|
|
17
|
+
};
|
|
18
|
+
type DeveloperToolsProps = {
|
|
19
|
+
React: typeof import('react');
|
|
20
|
+
ReactDOM?: {
|
|
21
|
+
createPortal: (children: React.ReactNode, container: Element) => React.ReactNode;
|
|
22
|
+
};
|
|
23
|
+
toolDiagnostics: ToolDiagnosticsForDeveloperTools;
|
|
24
|
+
playbackLock: PlaybackLockDebugOverlayRootProps;
|
|
25
|
+
audioConfig: AudioConfigForDeveloperTools;
|
|
26
|
+
visualContext: VisualContextForDeveloperTools;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Debug / developer-only **floating** UI: playback-lock overlay, audio config, visual
|
|
30
|
+
* context inspector, and tool diagnostics. Opened from the transcript ⋯ “more” menu
|
|
31
|
+
* and related entry points. Does **not** wrap the main Guide shell — mount as a
|
|
32
|
+
* sibling to mic + transcript; pair with `AdminToolDiagnosticsContext.Provider` in
|
|
33
|
+
* `GuideAI` so the transcript menu can toggle the tool panel.
|
|
34
|
+
*/
|
|
35
|
+
export declare function DeveloperTools({ React: R, ReactDOM, toolDiagnostics: { getDataChannelManager, propToolNames, debugMoreMenu, toolPanelOpen, onCloseToolPanel, }, playbackLock, audioConfig, visualContext, }: DeveloperToolsProps): React.JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** Shared mic SVGs for mute UI in the transcript footer and more menu. */
|
|
3
|
+
export declare function MicGlyphMuted({ className }: {
|
|
4
|
+
className?: string;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
/** Same body shape as muted glyph, without slash (352×512 space). */
|
|
7
|
+
export declare function MicGlyphUnmuted({ className }: {
|
|
8
|
+
className?: string;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -2,18 +2,20 @@ import { PopupPosition, RecordingStatus } from '../types/GuideAI.types';
|
|
|
2
2
|
interface MicrophoneProps {
|
|
3
3
|
componentRef: React.RefObject<HTMLDivElement>;
|
|
4
4
|
baseStyles: React.CSSProperties;
|
|
5
|
-
hasInteracted: boolean;
|
|
6
5
|
popupPosition: PopupPosition;
|
|
7
6
|
showOnboarding: boolean;
|
|
8
7
|
handleOnboardingComplete: () => void;
|
|
9
8
|
handleOnboardingClose: () => void;
|
|
10
9
|
isConnecting: boolean;
|
|
10
|
+
connectionMessage?: string | null;
|
|
11
11
|
status: RecordingStatus;
|
|
12
12
|
handleToggleConversation: () => void;
|
|
13
13
|
showTranscript: boolean;
|
|
14
14
|
hasMic: boolean;
|
|
15
15
|
isMuted: boolean;
|
|
16
|
+
/** Persisted flag: drives pre (`false`) vs post (`true`) interaction prompt pool and presentation. */
|
|
17
|
+
hasInteracted: boolean;
|
|
16
18
|
React: typeof import('react');
|
|
17
19
|
}
|
|
18
|
-
declare const Microphone: ({ componentRef, baseStyles,
|
|
20
|
+
declare const Microphone: ({ componentRef, baseStyles, popupPosition, showOnboarding, handleOnboardingComplete, handleOnboardingClose, isConnecting, connectionMessage, status, handleToggleConversation, showTranscript, hasMic, isMuted, hasInteracted, React, }: MicrophoneProps) => import("react").JSX.Element;
|
|
19
21
|
export default Microphone;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One-shot prompt: Precise preset users who barge in during assistant playback may want Noisy preset.
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface NoisyPresetSuggestBannerProps {
|
|
6
|
+
visible: boolean;
|
|
7
|
+
onYes: () => void;
|
|
8
|
+
onNo: () => void;
|
|
9
|
+
onAutoDismiss?: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare const NoisyPresetSuggestBanner: ({ visible, onYes, onNo, onAutoDismiss, }: NoisyPresetSuggestBannerProps) => React.JSX.Element | null;
|
|
12
|
+
export default NoisyPresetSuggestBanner;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debug UI: microphone preset and system "interrupt lock" / effective VAD state.
|
|
3
|
+
* Shown from transcript ⋯ → Debug → Show playback lock debug (default off); close button or menu hides it.
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface PlaybackInterruptLockDebugOverlayProps {
|
|
7
|
+
preset: 'precise' | 'noisy';
|
|
8
|
+
lockActive: boolean;
|
|
9
|
+
lockMode: 'none' | 'system_interrupt_lock';
|
|
10
|
+
vadType: 'server_vad' | 'semantic_vad' | 'off';
|
|
11
|
+
threshold?: number;
|
|
12
|
+
interruptResponse?: boolean;
|
|
13
|
+
/** User started speaking while assistant output buffer was active (debug signal). */
|
|
14
|
+
interruptDetected?: boolean;
|
|
15
|
+
zIndex: number;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
}
|
|
18
|
+
declare const PlaybackInterruptLockDebugOverlay: ({ preset, lockActive, lockMode, vadType, threshold, interruptResponse, interruptDetected, zIndex, onClose, }: PlaybackInterruptLockDebugOverlayProps) => React.JSX.Element;
|
|
19
|
+
export default PlaybackInterruptLockDebugOverlay;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MicPresetId } from '../types/audioConfig.types';
|
|
3
|
+
import type { InterruptLockOverlayConfig } from '../hooks/useProtectedPlayback';
|
|
4
|
+
export interface PlaybackLockDebugOverlayRootProps {
|
|
5
|
+
zIndex: number;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
micPreset: MicPresetId;
|
|
9
|
+
protectedPlaybackActive: boolean;
|
|
10
|
+
overlayConfig: InterruptLockOverlayConfig;
|
|
11
|
+
playbackInterruptDebug: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** Wires `useProtectedPlayback` + `usePlaybackLockDebugOverlay` into `PlaybackInterruptLockDebugOverlay`. */
|
|
14
|
+
export declare function PlaybackLockDebugOverlayRoot({ zIndex, visible, onClose, micPreset, protectedPlaybackActive, overlayConfig, playbackInterruptDebug, }: PlaybackLockDebugOverlayRootProps): React.JSX.Element | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** Speaker + sound waves — assistant audio on (mono styling applied via CSS on parent). */
|
|
3
|
+
export declare function SpeakerGlyphUnmuted({ className }: {
|
|
4
|
+
className?: string;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
/** Speaker with X — assistant audio muted (accent lines match muted mic). */
|
|
7
|
+
export declare function SpeakerGlyphMuted({ className }: {
|
|
8
|
+
className?: string;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -1,32 +1,89 @@
|
|
|
1
1
|
import { StoredMessage } from '../utils/messageStorage';
|
|
2
|
-
import { TranscriptPosition, MicButtonPosition } from '../types/GuideAI.types';
|
|
2
|
+
import { TranscriptPanelMode, TranscriptPosition, MicButtonPosition, TranscriptSessionMode, RecordingStatus } from '../types/GuideAI.types';
|
|
3
|
+
import { type StubWorkflowItem, type StubWorkspaceOption } from '../stubs/workspaces';
|
|
4
|
+
import type { WorkspaceDataSource } from '../utils/localStorageHelper';
|
|
5
|
+
import type { MarkWorkflowCompleteFn } from '../utils/tools/workflowToolBridge';
|
|
6
|
+
import type { MicPresetId } from '../types/audioConfig.types';
|
|
3
7
|
interface TranscriptBoxProps {
|
|
4
8
|
allMessages: StoredMessage[];
|
|
5
9
|
showTranscript: boolean;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
fileDropTargetActive?: boolean;
|
|
11
|
+
transcriptFileDropAllowed?: boolean;
|
|
12
|
+
docFormProgress?: 'off' | 'extracting' | 'filling';
|
|
13
|
+
/** Drop a file on the transcript card to run docToForm extraction (wired in GuideAI). */
|
|
14
|
+
onTranscriptFileDrop?: (file: File) => void;
|
|
15
|
+
/** Tear down WebRTC, clear session, return to mic — toolbar X only (footer status control toggles mute). */
|
|
16
|
+
onEndSession?: () => void;
|
|
17
|
+
recordingStatus?: RecordingStatus;
|
|
18
|
+
isConnecting?: boolean;
|
|
9
19
|
showTextInput?: boolean;
|
|
10
20
|
textInput?: string;
|
|
11
21
|
setTextInput?: (value: string) => void;
|
|
12
22
|
handleTextSubmit?: () => void;
|
|
13
23
|
handleTextKeyPress?: (event: React.KeyboardEvent) => void;
|
|
14
24
|
textPlaceholder?: string;
|
|
25
|
+
/** Connection status message (e.g. "Initializing...", "Retrying...") */
|
|
26
|
+
connectionMessage?: string | null;
|
|
15
27
|
micPosition?: MicButtonPosition;
|
|
16
28
|
transcriptPosition: TranscriptPosition;
|
|
17
29
|
hasMic: boolean;
|
|
18
30
|
isMuted?: boolean;
|
|
19
31
|
handleToggleMute?: () => void;
|
|
20
|
-
|
|
32
|
+
/** Mute assistant (TTS) playback — separate from microphone mute. */
|
|
33
|
+
isAssistantPlaybackMuted?: boolean;
|
|
34
|
+
onToggleAssistantPlaybackMute?: () => void;
|
|
21
35
|
handleResetChat?: () => void;
|
|
22
|
-
showSettings?: boolean;
|
|
23
|
-
setShowSettings?: (value: boolean) => void;
|
|
24
36
|
isDataChannelOpen?: boolean;
|
|
25
37
|
isResponseActive?: boolean;
|
|
38
|
+
onOpenConfig?: () => void;
|
|
39
|
+
/** Console: GuideAI.debug.showMoreMenu() — extra ⋯ menu rows for developers. */
|
|
40
|
+
debugMoreMenuEnabled?: boolean;
|
|
41
|
+
/** Transcript ⋯ → Debug: fixed playback interrupt lock panel visibility. */
|
|
42
|
+
playbackLockDebugOverlayVisible?: boolean;
|
|
43
|
+
onTogglePlaybackLockDebugOverlay?: () => void;
|
|
44
|
+
/** Current mic preset (Precise / Noisy); shown in ⋯ flyout when debug menu is on. */
|
|
45
|
+
micPreset?: MicPresetId;
|
|
46
|
+
/** Apply preset from transcript menu: persist, reset stored audio to preset base, live session.update. */
|
|
47
|
+
onApplyMicPreset?: (preset: MicPresetId) => void;
|
|
48
|
+
noisyPresetSuggestVisible?: boolean;
|
|
49
|
+
onNoisyPresetSuggestYes?: () => void;
|
|
50
|
+
onNoisyPresetSuggestNo?: () => void;
|
|
51
|
+
onNoisyPresetSuggestAutoDismiss?: () => void;
|
|
52
|
+
/** False when visual context is disabled via props (hides related debug actions). */
|
|
53
|
+
visualContextFeatureEnabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* **DockedPanel** (`docked`) vs **FloatPanel** (`float`). Not the workflow steps drawer
|
|
56
|
+
* (`workflowDrawerOpen`).
|
|
57
|
+
*/
|
|
58
|
+
transcriptPanelMode?: TranscriptPanelMode;
|
|
59
|
+
onToggleTranscriptPanelMode?: () => void;
|
|
60
|
+
transcriptSessionMode?: TranscriptSessionMode;
|
|
61
|
+
onTranscriptSessionModeChange?: (mode: TranscriptSessionMode) => void;
|
|
62
|
+
/** Stub list until API-driven; computed once in GuideAI. */
|
|
63
|
+
workspaceOptions: StubWorkspaceOption[];
|
|
64
|
+
/** Debug: stub vs API workspace data (API has no fetch yet — empty workflows). */
|
|
65
|
+
workspaceDataSource: WorkspaceDataSource;
|
|
66
|
+
/** Workflow steps for the current workspace; from stubs or future API. */
|
|
67
|
+
workspaceWorkflows: StubWorkflowItem[];
|
|
68
|
+
workflowDrawerOpen?: boolean;
|
|
69
|
+
onWorkflowDrawerOpenChange: (open: boolean) => void;
|
|
70
|
+
/** Access-key realtime: notify parent of DB workflow id for next initialize (workspace prompt + this step). Label used for rollup silent steer. */
|
|
71
|
+
onSessionWorkflowForRealtimeInit?: (workflowId: string | null, workflowLabel?: string) => void;
|
|
72
|
+
/** Parent-owned ref; `markWorkflowComplete` tool delegates here (wired in GuideAI). */
|
|
73
|
+
markWorkflowCompleteHandlerRef: {
|
|
74
|
+
current: MarkWorkflowCompleteFn | null;
|
|
75
|
+
};
|
|
76
|
+
/** Docked drawer width (px); persisted by parent when `onDrawerWidthChange` is used. */
|
|
77
|
+
drawerWidthPx?: number;
|
|
78
|
+
onDrawerWidthChange?: (widthPx: number) => void;
|
|
26
79
|
React: typeof import('react');
|
|
80
|
+
/** Host ReactDOM.createPortal — required for workspace menu above clipped transcript card */
|
|
81
|
+
ReactDOM?: {
|
|
82
|
+
createPortal: (children: import('react').ReactNode, container: Element) => import('react').ReactNode;
|
|
83
|
+
};
|
|
27
84
|
}
|
|
28
85
|
declare const TranscriptBox: {
|
|
29
|
-
(
|
|
86
|
+
(props: TranscriptBoxProps): import("react").JSX.Element | null;
|
|
30
87
|
displayName: string;
|
|
31
88
|
};
|
|
32
89
|
export default TranscriptBox;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { StoredMessage } from '../utils/messageStorage';
|
|
2
|
+
import type { StubWorkspaceOption } from '../stubs/workspaces';
|
|
3
|
+
import type { TranscriptSessionMode } from '../types/GuideAI.types';
|
|
2
4
|
interface TranscriptMessagesProps {
|
|
3
5
|
allMessages: StoredMessage[];
|
|
4
6
|
messagesEndRef: React.RefObject<HTMLDivElement>;
|
|
7
|
+
docFormProgress?: 'off' | 'extracting' | 'filling';
|
|
8
|
+
workspaceSelectorPosted?: boolean;
|
|
9
|
+
workspaceOptions?: StubWorkspaceOption[];
|
|
10
|
+
selectedWorkspaceId?: TranscriptSessionMode;
|
|
11
|
+
onSelectWorkspace?: (mode: TranscriptSessionMode) => void;
|
|
5
12
|
React: typeof import('react');
|
|
6
13
|
}
|
|
7
|
-
declare const TranscriptMessages: ({ allMessages, messagesEndRef, React }: TranscriptMessagesProps) => import("react").JSX.Element;
|
|
14
|
+
declare const TranscriptMessages: ({ allMessages, messagesEndRef, docFormProgress, workspaceSelectorPosted, workspaceOptions, selectedWorkspaceId, onSelectWorkspace, React, }: TranscriptMessagesProps) => import("react").JSX.Element;
|
|
8
15
|
export default TranscriptMessages;
|
|
@@ -1,12 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { RecordingStatus, TranscriptPanelMode, TranscriptSessionMode } from '../types/GuideAI.types';
|
|
3
|
+
import type { StubWorkspaceOption } from '../stubs/workspaces';
|
|
4
|
+
import { type WorkspaceDataSource } from '../utils/localStorageHelper';
|
|
5
|
+
import type { MicPresetId } from '../types/audioConfig.types';
|
|
1
6
|
interface TranscriptTextInputProps {
|
|
2
7
|
textInput?: string;
|
|
3
8
|
setTextInput?: (value: string) => void;
|
|
4
9
|
handleTextSubmit?: () => void;
|
|
5
|
-
handleTextKeyPress?: (event:
|
|
10
|
+
handleTextKeyPress?: (event: import('react').KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
6
11
|
textPlaceholder?: string;
|
|
12
|
+
/** Connection status message (e.g. "Initializing...", "Retrying...") - shown when channel not open */
|
|
13
|
+
connectionMessage?: string | null;
|
|
7
14
|
isDataChannelOpen?: boolean;
|
|
8
15
|
isResponseActive?: boolean;
|
|
16
|
+
sessionMode: TranscriptSessionMode;
|
|
17
|
+
onSessionModeChange: (mode: TranscriptSessionMode) => void;
|
|
18
|
+
recordingStatus?: RecordingStatus;
|
|
19
|
+
isConnecting?: boolean;
|
|
20
|
+
hasMic?: boolean;
|
|
21
|
+
isMuted?: boolean;
|
|
22
|
+
handleToggleMute?: () => void;
|
|
23
|
+
isAssistantPlaybackMuted?: boolean;
|
|
24
|
+
onToggleAssistantPlaybackMute?: () => void;
|
|
25
|
+
handleResetChat?: () => void;
|
|
26
|
+
onOpenConfig?: () => void;
|
|
27
|
+
/** GuideAI.debug.showMoreMenu() in console */
|
|
28
|
+
debugMoreMenuEnabled?: boolean;
|
|
29
|
+
/** Transcript ⋯ → Debug: playback interrupt lock overlay (top-left panel). */
|
|
30
|
+
playbackLockDebugOverlayVisible?: boolean;
|
|
31
|
+
onTogglePlaybackLockDebugOverlay?: () => void;
|
|
32
|
+
/** User mic preset shown in ⋯ menu. */
|
|
33
|
+
micPreset?: MicPresetId;
|
|
34
|
+
/** Apply mic preset (persists + updates session config). */
|
|
35
|
+
onApplyMicPreset?: (preset: MicPresetId) => void;
|
|
36
|
+
visualContextFeatureEnabled?: boolean;
|
|
37
|
+
workspaceOptions: StubWorkspaceOption[];
|
|
38
|
+
/** Debug ⋯: reflects stub vs API workspace source (toggle writes localStorage). */
|
|
39
|
+
workspaceDataSource: WorkspaceDataSource;
|
|
40
|
+
/**
|
|
41
|
+
* `docked` (DockedPanel): textarea auto-grows. `float` (FloatPanel): input chrome height is fixed so
|
|
42
|
+
* the workflow sheet does not change footer layout.
|
|
43
|
+
*/
|
|
44
|
+
transcriptPanelMode?: TranscriptPanelMode;
|
|
45
|
+
ReactDOM?: {
|
|
46
|
+
createPortal: (children: import('react').ReactNode, container: Element) => import('react').ReactNode;
|
|
47
|
+
};
|
|
9
48
|
React: typeof import('react');
|
|
10
49
|
}
|
|
11
|
-
declare const TranscriptTextInput: ({ textInput, setTextInput, handleTextSubmit, handleTextKeyPress, textPlaceholder, isDataChannelOpen, isResponseActive, React, }: TranscriptTextInputProps) =>
|
|
50
|
+
declare const TranscriptTextInput: ({ textInput, setTextInput, handleTextSubmit, handleTextKeyPress, textPlaceholder: _textPlaceholder, connectionMessage, isDataChannelOpen, isResponseActive, sessionMode, onSessionModeChange, recordingStatus, isConnecting, hasMic, isMuted, handleToggleMute, isAssistantPlaybackMuted, onToggleAssistantPlaybackMute, handleResetChat, onOpenConfig, debugMoreMenuEnabled, playbackLockDebugOverlayVisible, onTogglePlaybackLockDebugOverlay, micPreset, onApplyMicPreset, visualContextFeatureEnabled, workspaceOptions, workspaceDataSource, transcriptPanelMode, ReactDOM, React, }: TranscriptTextInputProps) => React.JSX.Element;
|
|
12
51
|
export default TranscriptTextInput;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TranscriptPanelMode } from '../types/GuideAI.types';
|
|
2
|
+
interface TranscriptToolbarProps {
|
|
3
|
+
/** When true, show n/N progress beside the workflow title (onboarding / checklist workspaces). */
|
|
4
|
+
workflowChecklistEnabled: boolean;
|
|
5
|
+
/** Checked workflow steps vs total (e.g. 2 / 16). */
|
|
6
|
+
workflowCheckedCount: number;
|
|
7
|
+
workflowTotalCount: number;
|
|
8
|
+
/** Workflow title (active row, next step, or session label fallback). */
|
|
9
|
+
displayWorkflowTitle: string;
|
|
10
|
+
workflowDrawerOpen: boolean;
|
|
11
|
+
/** Opens the checklist when closed; closes it when open. */
|
|
12
|
+
onToggleWorkflowDrawer: () => void;
|
|
13
|
+
/** Ends the voice session and closes the connection (same as status control in the input row). */
|
|
14
|
+
onEndSession: () => void;
|
|
15
|
+
transcriptPanelMode: TranscriptPanelMode;
|
|
16
|
+
onToggleTranscriptPanelMode: () => void;
|
|
17
|
+
React: typeof import('react');
|
|
18
|
+
}
|
|
19
|
+
declare const TranscriptToolbar: {
|
|
20
|
+
({ workflowChecklistEnabled, workflowCheckedCount, workflowTotalCount, displayWorkflowTitle, workflowDrawerOpen, onToggleWorkflowDrawer, onEndSession, transcriptPanelMode, onToggleTranscriptPanelMode, React, }: TranscriptToolbarProps): import("react").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export default TranscriptToolbar;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { TranscriptPanelMode } from '../types/GuideAI.types';
|
|
2
|
+
import type { StubWorkflowItem } from '../stubs/workspaces';
|
|
3
|
+
interface TranscriptWorkflowDrawerProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
/** `docked` = DockedPanel (full-height side); `float` = FloatPanel (card). */
|
|
7
|
+
transcriptPanelMode: TranscriptPanelMode;
|
|
8
|
+
/** Mode + layout controls; in float mode it sits inside the expanding clip under the slim handle. */
|
|
9
|
+
toolbar: import('react').ReactNode;
|
|
10
|
+
workflowChecked: Record<string, boolean>;
|
|
11
|
+
onToggleWorkflowCheck: (id: string) => void;
|
|
12
|
+
/** When false, steps are navigation-only (no checkboxes); onboarding keeps checklist + toolbar n/N. */
|
|
13
|
+
workflowChecklistEnabled: boolean;
|
|
14
|
+
/** When false, checking a step does not play confetti (stub workspace option). */
|
|
15
|
+
workflowConfettiEnabled?: boolean;
|
|
16
|
+
/** Choosing a workflow row closes the drawer; parent sets toolbar title. */
|
|
17
|
+
onWorkflowActivate: (id: string, label: string) => void;
|
|
18
|
+
/** Selected workflow id, else first unchecked step — row highlight. */
|
|
19
|
+
highlightedWorkflowId: string | null;
|
|
20
|
+
workflows: StubWorkflowItem[];
|
|
21
|
+
/** Current workspace name (replaces static “Workflows” in the drawer header). */
|
|
22
|
+
workspaceTitle: string;
|
|
23
|
+
/** Same blurb as under each selector option; shown under the title in the drawer. */
|
|
24
|
+
workspaceDescription: string;
|
|
25
|
+
workspaceIcon: string;
|
|
26
|
+
/** Float card only: tap toggles workflow; drag starts parent float-pan (replaces vertical strip drag). */
|
|
27
|
+
floatStripGestureHandlers?: {
|
|
28
|
+
onPointerDown: (e: import('react').PointerEvent<HTMLButtonElement>) => void;
|
|
29
|
+
onPointerMove: (e: import('react').PointerEvent<HTMLButtonElement>) => void;
|
|
30
|
+
onPointerUp: (e: import('react').PointerEvent<HTMLButtonElement>) => void;
|
|
31
|
+
onPointerCancel: (e: import('react').PointerEvent<HTMLButtonElement>) => void;
|
|
32
|
+
};
|
|
33
|
+
React: typeof import('react');
|
|
34
|
+
}
|
|
35
|
+
declare const TranscriptWorkflowDrawer: {
|
|
36
|
+
({ open, onOpenChange, transcriptPanelMode, toolbar, workflowChecked, onToggleWorkflowCheck, workflowChecklistEnabled, workflowConfettiEnabled, onWorkflowActivate, highlightedWorkflowId, workflows, workspaceTitle, workspaceDescription, workspaceIcon, floatStripGestureHandlers, React, }: TranscriptWorkflowDrawerProps): import("react").JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
export default TranscriptWorkflowDrawer;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { PopupPosition } from '../types/GuideAI.types';
|
|
2
2
|
interface WelcomeBubbleProps {
|
|
3
3
|
position: PopupPosition;
|
|
4
|
+
message: string;
|
|
5
|
+
/** Play hide animation before unmount (position-aware CSS). */
|
|
6
|
+
exiting?: boolean;
|
|
7
|
+
/** Apply `guideai-welcome-bubble-enter-mount` (default enter + bubble-pulse). */
|
|
8
|
+
enterMount?: boolean;
|
|
4
9
|
React: typeof import('react');
|
|
5
10
|
}
|
|
6
|
-
declare const WelcomeBubble: ({ position, React }: WelcomeBubbleProps) => import("react").JSX.Element;
|
|
11
|
+
declare const WelcomeBubble: ({ position, message, exiting, enterMount, React, }: WelcomeBubbleProps) => import("react").JSX.Element;
|
|
7
12
|
export default WelcomeBubble;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type AdminToolDiagnosticsContextValue = {
|
|
2
|
+
open: boolean;
|
|
3
|
+
toggle: () => void;
|
|
4
|
+
};
|
|
5
|
+
/** `null` when the debug "more" menu is off. Used by the transcript ⋯ → Tool diagnostics row. */
|
|
6
|
+
export declare const AdminToolDiagnosticsContext: import("react").Context<AdminToolDiagnosticsContextValue | null>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Admin Tool Diagnostics — transcript ⋯ → Debug.
|
|
3
|
+
* Self-contained under `src/devtools/adminToolDiagnostics/`.
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface AdminToolDiagnosticsPanelProps {
|
|
7
|
+
React: typeof import('react');
|
|
8
|
+
ReactDOM?: {
|
|
9
|
+
createPortal?: (children: import('react').ReactNode, c: Element) => import('react').ReactNode;
|
|
10
|
+
};
|
|
11
|
+
runTool: (name: string, argsJson: string) => Promise<unknown>;
|
|
12
|
+
getToolNames: () => string[];
|
|
13
|
+
getSampleArgsJsonForToolName: (name: string) => string;
|
|
14
|
+
onClose: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const AdminToolDiagnosticsPanel: ({ React: R, ReactDOM, runTool, getToolNames, getSampleArgsJsonForToolName, onClose, }: AdminToolDiagnosticsPanelProps) => React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const REFRESH_MIN_MS = 200;
|
|
2
|
+
export declare const COPY_FLASH_MS = 1200;
|
|
3
|
+
export declare function getInitialATDPosition(): {
|
|
4
|
+
left: number;
|
|
5
|
+
top: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function formatToolResult(r: unknown): string;
|
|
8
|
+
export declare function copyTextToClipboard(text: string): Promise<boolean>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ToolWithConfig } from '../../utils/tools/toolRegistry';
|
|
2
|
+
/**
|
|
3
|
+
* Merged list of tool names for the admin diagnostics panel when no live session
|
|
4
|
+
* is available, or to supplement session state.
|
|
5
|
+
*/
|
|
6
|
+
export declare function buildDiagnosticsToolNameList(toolsConfig: ToolWithConfig[], propToolNames: string[] | undefined): string[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { PointerEvent as ReactPointerEvent } from 'react';
|
|
2
|
+
export interface DraggableDialogPosition {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
}
|
|
6
|
+
interface UseDraggableDialogParams {
|
|
7
|
+
initialPosition: () => DraggableDialogPosition;
|
|
8
|
+
minVisibleWidth: number;
|
|
9
|
+
minVisibleHeight: number;
|
|
10
|
+
ignoreSelector?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function useDraggableDialog(React: typeof import('react'), { initialPosition, minVisibleWidth, minVisibleHeight, ignoreSelector, }: UseDraggableDialogParams): {
|
|
13
|
+
position: DraggableDialogPosition;
|
|
14
|
+
setPosition: import("react").Dispatch<import("react").SetStateAction<DraggableDialogPosition>>;
|
|
15
|
+
dialogRef: import("react").MutableRefObject<HTMLDivElement | null>;
|
|
16
|
+
dragHandlers: {
|
|
17
|
+
onPointerDown: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
18
|
+
onPointerMove: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
19
|
+
onPointerUp: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
20
|
+
onPointerCancel: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visual buffer-full indicator. Polls the host's `getBufferedAmount` callback ~5×/s
|
|
3
|
+
* and draws a horizontal bar: green → yellow → red as fill approaches the threshold.
|
|
4
|
+
* Ships as a fully-contained component so the Inspector folder stays self-sufficient.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
export interface BufferIndicatorProps {
|
|
8
|
+
React: typeof import('react');
|
|
9
|
+
getBufferedAmount: () => number;
|
|
10
|
+
/** WebRTC bufferedAmount threshold at which `isBufferFull()` returns true. */
|
|
11
|
+
threshold: number;
|
|
12
|
+
/** How often to sample the buffered amount (ms). Defaults to 200. */
|
|
13
|
+
pollMs?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const BufferIndicator: React.FC<BufferIndicatorProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config editor section inside the Visual Context Inspector.
|
|
3
|
+
*
|
|
4
|
+
* Uses only `guideai-vci-*` classes. Each label carries an info icon that reveals a
|
|
5
|
+
* short description (from `VC_FIELD_INFO`) on hover.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { VisualContextLiveHandle } from '../../visualContext/useVisualContext';
|
|
9
|
+
export interface ConfigSectionProps {
|
|
10
|
+
React: typeof import('react');
|
|
11
|
+
open: boolean;
|
|
12
|
+
onToggle: () => void;
|
|
13
|
+
handle: VisualContextLiveHandle;
|
|
14
|
+
/** Called when the user hovers an info icon. Inspector owns the tooltip placement. */
|
|
15
|
+
onShowTooltip: (field: string, rect: DOMRect) => void;
|
|
16
|
+
onHideTooltip: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const ConfigSection: React.FC<ConfigSectionProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reverse-chronological list of capture events, each annotated with its trigger reason
|
|
3
|
+
* and send outcome. Items show a thumbnail + timestamps + (if skipped) the skip gate
|
|
4
|
+
* so the whole capture → decision → send loop is diagnosable at a glance.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { CaptureLogEntry } from './types';
|
|
8
|
+
export interface ScreenshotListProps {
|
|
9
|
+
React: typeof import('react');
|
|
10
|
+
entries: CaptureLogEntry[];
|
|
11
|
+
onThumbClick?: (entry: CaptureLogEntry) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const ScreenshotList: React.FC<ScreenshotListProps>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visual Context Inspector — dev-tool dialog that ties together the buffer indicator,
|
|
3
|
+
* runtime config editor, and capture/send log.
|
|
4
|
+
*
|
|
5
|
+
* All classes are `guideai-vci-*` so this panel has its own dedicated stylesheet
|
|
6
|
+
* namespace and doesn't share rules with any other dialog in the package. Visuals
|
|
7
|
+
* resemble the Audio Configuration dialog but the two are independent.
|
|
8
|
+
*
|
|
9
|
+
* Mount is gated by `visualContext.inspectorOpen` from `useVisualContext`, passed through
|
|
10
|
+
* `GuideAI.tsx` into `DeveloperTools` as `visualContext.show`. Toggled from the transcript
|
|
11
|
+
* ⋯ → Debug → "Show/Hide Inspector" menu (or `GuideAI.visualContext.toggleInspector()`).
|
|
12
|
+
*
|
|
13
|
+
* Deleting this folder + removing the import + conditional render in `DeveloperTools.tsx` +
|
|
14
|
+
* the `visualContext` prop from `GuideAI.tsx` + `visualContextInspectorStyles` in
|
|
15
|
+
* `GuideAI.styles.ts` removes the dev-tool.
|
|
16
|
+
*/
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import type { VisualContextLiveHandle } from '../../visualContext/useVisualContext';
|
|
19
|
+
export interface VisualContextInspectorProps {
|
|
20
|
+
React: typeof import('react');
|
|
21
|
+
/** Optional ReactDOM with `createPortal` — enables portaled hover tooltips for info icons. */
|
|
22
|
+
ReactDOM?: {
|
|
23
|
+
createPortal?: (children: React.ReactNode, container: Element) => React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
handle: VisualContextLiveHandle;
|
|
26
|
+
/** WebRTC buffered byte count getter. */
|
|
27
|
+
getBufferedAmount: () => number;
|
|
28
|
+
/** WebRTC bufferedAmount threshold at which sends are gated. */
|
|
29
|
+
bufferThresholdBytes: number;
|
|
30
|
+
/** Close the panel. */
|
|
31
|
+
onClose: () => void;
|
|
32
|
+
onTestScreenshot: () => void;
|
|
33
|
+
/** Clears the in-memory frame store (`VisualContextStore`). */
|
|
34
|
+
onClearBuffer: () => void;
|
|
35
|
+
}
|
|
36
|
+
export declare const VisualContextInspector: React.FC<VisualContextInspectorProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hover-help descriptions for every Visual Context config field shown in the Inspector.
|
|
3
|
+
*
|
|
4
|
+
* Keep concise (~2–3 lines each) so the tooltip fits its 240px max-width without scroll.
|
|
5
|
+
* These map 1:1 to the fields in `ConfigSection.tsx`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const VC_FIELD_INFO: Record<string, string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public barrel for the Visual Context Inspector dev-tool.
|
|
3
|
+
*
|
|
4
|
+
* The entire dev-tool lives under this folder. To remove it in a production-only build,
|
|
5
|
+
* delete this folder, remove the `VisualContextInspector` import + conditional render from
|
|
6
|
+
* `src/components/DeveloperTools.tsx`, drop the `visualContext` prop passed from `GuideAI.tsx`,
|
|
7
|
+
* and remove `visualContextInspectorStyles` from `GuideAI.styles.ts`. Visibility is driven by
|
|
8
|
+
* `useVisualContext`'s `inspectorOpen` state / `GuideAI.visualContext.toggleInspector()`.
|
|
9
|
+
*/
|
|
10
|
+
export { VisualContextInspector } from './VisualContextInspector';
|
|
11
|
+
export type { VisualContextInspectorProps } from './VisualContextInspector';
|
|
12
|
+
export { inspectorStore } from './inspectorStore';
|
|
13
|
+
export type { CaptureLogEntry, InspectorSnapshot } from './types';
|