@pstdio/ui 0.5.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MermaidComponent-DDCxR-Gs.js → MermaidComponent-D7Baqkwx.js} +2 -2
- package/dist/{MermaidComponent-DDCxR-Gs.js.map → MermaidComponent-D7Baqkwx.js.map} +1 -1
- package/dist/chat-ui.js +1272 -1080
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/activity/activity-avatar.d.ts +9 -0
- package/dist/components/activity/activity-comment.d.ts +19 -0
- package/dist/components/activity/activity-composer.d.ts +18 -0
- package/dist/components/activity/activity-event.d.ts +12 -0
- package/dist/components/activity/activity-root.d.ts +15 -0
- package/dist/components/activity/activity-timeline.d.ts +6 -0
- package/dist/components/activity/activity.types.d.ts +5 -0
- package/dist/components/activity/index.d.ts +25 -0
- package/dist/components/chat-ui/components/ai-conversation.d.ts +4 -4
- package/dist/components/chat-ui/components/ai-message.d.ts +2 -0
- package/dist/components/chat-ui/components/chat-message-list.d.ts +12 -0
- package/dist/components/chat-ui/components/chat-panel.d.ts +3 -1
- package/dist/components/chat-ui/components/message-action-panel.d.ts +10 -0
- package/dist/components/chat-ui/performance/chat-mount-metrics.d.ts +37 -0
- package/dist/components/chat-ui/performance/chat-panel.perf.d.ts +18 -0
- package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +29 -0
- package/dist/components/chat-ui/performance/chat-performance-panel.d.ts +23 -0
- package/dist/components/chat-ui/performance/chat-performance-story-utils.d.ts +30 -0
- package/dist/components/code-editor.d.ts +1 -1
- package/dist/components/diff-viewer/build-changed-files-tree.d.ts +4 -0
- package/dist/components/diff-viewer/diff-card-body.d.ts +34 -0
- package/dist/components/diff-viewer/diff-card-content.d.ts +22 -0
- package/dist/components/diff-viewer/diff-card-load-state.d.ts +9 -0
- package/dist/components/diff-viewer/diff-card.d.ts +43 -0
- package/dist/components/diff-viewer/diff-drawer.d.ts +33 -0
- package/dist/components/diff-viewer/diff-editor.d.ts +20 -0
- package/dist/components/diff-viewer/diff-size.d.ts +14 -0
- package/dist/components/diff-viewer/diff-view-adapter.d.ts +27 -0
- package/dist/components/diff-viewer/diff-viewer.d.ts +14 -0
- package/dist/components/diff-viewer/diff-viewer.store.d.ts +21 -0
- package/dist/components/diff-viewer/file-list-panel.d.ts +19 -0
- package/dist/components/diff-viewer/index.d.ts +5 -0
- package/dist/components/diff-viewer/types.d.ts +13 -0
- package/dist/components/integration-card.d.ts +12 -0
- package/dist/components/list-row/list-row-menu.d.ts +12 -0
- package/dist/components/list-row/list-row.types.d.ts +8 -0
- package/dist/components/palette-filter.d.ts +23 -0
- package/dist/components/palette-list.d.ts +11 -0
- package/dist/components/palette-shortcut.d.ts +4 -0
- package/dist/components/palette.d.ts +47 -0
- package/dist/components/panel-sidebar-registration-context.d.ts +12 -0
- package/dist/components/param-editor-label.d.ts +6 -0
- package/dist/components/param-editor.d.ts +2 -2
- package/dist/components/param-editor.types.d.ts +6 -1
- package/dist/components/performance-panel.d.ts +40 -0
- package/dist/components/{folder-picker-dialog.d.ts → repo-picker-dialog.d.ts} +6 -6
- package/dist/components/resizable-split-layout.d.ts +20 -0
- package/dist/components/resizable-split-layout.handle.d.ts +17 -0
- package/dist/components/resource-context-menu.d.ts +1 -0
- package/dist/components/rich-text/shared/editor-config.d.ts +1 -0
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/floating-toolbar-buttons.d.ts +16 -0
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/commands.d.ts +2 -0
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/index.d.ts +3 -0
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/link-editor-content.d.ts +18 -0
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/link-edit-state.d.ts +1 -0
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/selection-link-url.d.ts +2 -0
- package/dist/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +1 -1
- package/dist/components/rich-text/shared/transformers/markdown-transformers-test-utils.d.ts +3 -0
- package/dist/components/rich-text/shared/transformers/markdown-transformers.d.ts +1 -0
- package/dist/components/session-indicator.d.ts +2 -2
- package/dist/components/sidebar/sidebar-header.d.ts +0 -1
- package/dist/components/sidebar/sidebar.types.d.ts +7 -1
- package/dist/components/simple-card.d.ts +5 -0
- package/dist/components/tree-list/tree-list.d.ts +28 -1
- package/dist/index.d.ts +20 -8
- package/dist/index.js +4771 -2446
- package/dist/index.js.map +1 -1
- package/dist/radio-DJtQY9po.js +286 -0
- package/dist/radio-DJtQY9po.js.map +1 -0
- package/dist/{rich-message-DeJwzVeV.js → rich-message-33DPxuWJ.js} +502 -464
- package/dist/rich-message-33DPxuWJ.js.map +1 -0
- package/dist/rich-text.js +738 -414
- package/dist/rich-text.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/custom/index.d.ts +2 -0
- package/dist/theme/custom/vscode-theme.d.ts +32 -0
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/recipes/alert.d.ts +1 -1
- package/dist/theme/recipes/dialog.d.ts +1 -1
- package/dist/theme/recipes/drawer.d.ts +1 -1
- package/dist/theme/recipes/menu.d.ts +1 -1
- package/dist/theme/recipes/popover.d.ts +1 -1
- package/dist/theme/recipes/tabs.d.ts +18 -0
- package/dist/theme/tokens/borders.d.ts +6 -24
- package/dist/theme/tokens/colors.d.ts +168 -168
- package/dist/theme/tokens/shadows.d.ts +5 -5
- package/dist/{theme-Dq4r3aRE.js → theme-D-aCJqTf.js} +295 -236
- package/dist/theme-D-aCJqTf.js.map +1 -0
- package/dist/theme.js +6 -4
- package/dist/utils/apply-theme-preference.d.ts +2 -0
- package/package.json +4 -1
- package/dist/components/app-shell/app-shell.d.ts +0 -1
- package/dist/components/app-shell/command-palette.d.ts +0 -16
- package/dist/components/app-shell/file-tree.d.ts +0 -7
- package/dist/components/app-shell/mock-chat.d.ts +0 -2
- package/dist/components/app-shell/mock-data.d.ts +0 -37
- package/dist/components/app-shell/pages/project-list-page.d.ts +0 -7
- package/dist/components/app-shell/pages/sessions-page.d.ts +0 -6
- package/dist/components/app-shell/pages/settings-page.d.ts +0 -5
- package/dist/components/app-shell/pages/ticket-details-page.d.ts +0 -7
- package/dist/components/app-shell/pages/tickets-page.d.ts +0 -7
- package/dist/components/app-shell/pages/workspace-page.d.ts +0 -1
- package/dist/components/app-shell/resizable-panel.d.ts +0 -13
- package/dist/components/attached-panel.utils.d.ts +0 -6
- package/dist/components/diff-card.d.ts +0 -17
- package/dist/components/diff-drawer.d.ts +0 -7
- package/dist/components/diff-editor.d.ts +0 -11
- package/dist/components/diff-view-adapter.d.ts +0 -14
- package/dist/components/properties.d.ts +0 -18
- package/dist/radio-C42qncrD.js +0 -236
- package/dist/radio-C42qncrD.js.map +0 -1
- package/dist/rich-message-DeJwzVeV.js.map +0 -1
- package/dist/theme-Dq4r3aRE.js.map +0 -1
- /package/dist/components/{diff-bubble.d.ts → diff-viewer/diff-bubble.d.ts} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ActivityActor } from './activity.types';
|
|
3
|
+
export interface ActivityAvatarProps {
|
|
4
|
+
actor?: ActivityActor;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
color?: string;
|
|
7
|
+
background?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ActivityAvatar: (props: ActivityAvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLChakraProps } from '@chakra-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { ActivityActor } from './activity.types';
|
|
4
|
+
export interface ActivityCommentProps extends Omit<HTMLChakraProps<"article">, "title"> {
|
|
5
|
+
actor: ActivityActor;
|
|
6
|
+
timestamp?: ReactNode;
|
|
7
|
+
actions?: ReactNode;
|
|
8
|
+
replies?: ReactNode;
|
|
9
|
+
composer?: ReactNode;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface ActivityReplyProps extends Omit<HTMLChakraProps<"div">, "title"> {
|
|
13
|
+
actor: ActivityActor;
|
|
14
|
+
timestamp?: ReactNode;
|
|
15
|
+
actions?: ReactNode;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const ActivityReply: (props: ActivityReplyProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const ActivityComment: (props: ActivityCommentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HTMLChakraProps } from '@chakra-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { ActivityActor } from './activity.types';
|
|
4
|
+
export interface ActivityComposerProps extends Omit<HTMLChakraProps<"form">, "onChange" | "onSubmit"> {
|
|
5
|
+
actor?: ActivityActor;
|
|
6
|
+
value?: string;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
variant?: "standalone" | "inline";
|
|
10
|
+
minRows?: number;
|
|
11
|
+
attachLabel?: string;
|
|
12
|
+
submitLabel?: string;
|
|
13
|
+
actions?: ReactNode;
|
|
14
|
+
onAttach?: () => void;
|
|
15
|
+
onChange?: (value: string) => void;
|
|
16
|
+
onSubmit?: (value: string) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const ActivityComposer: (props: ActivityComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TimelineItemProps } from '@chakra-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { ActivityActor } from './activity.types';
|
|
4
|
+
export interface ActivityEventProps extends Omit<TimelineItemProps, "title"> {
|
|
5
|
+
actor?: ActivityActor;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
iconColor?: string;
|
|
8
|
+
iconBackground?: string;
|
|
9
|
+
timestamp?: ReactNode;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const ActivityEvent: (props: ActivityEventProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StackProps } from '@chakra-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface ActivityRootProps extends StackProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface ActivityHeaderProps extends Omit<StackProps, "title"> {
|
|
7
|
+
title?: ReactNode;
|
|
8
|
+
actions?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export interface ActivityFeedProps extends StackProps {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const ActivityRoot: (props: ActivityRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const ActivityHeader: (props: ActivityHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const ActivityFeed: (props: ActivityFeedProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TimelineRootProps } from '@chakra-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export interface ActivityTimelineProps extends TimelineRootProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const ActivityTimeline: (props: ActivityTimelineProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ActivityAvatar } from './activity-avatar';
|
|
2
|
+
import { ActivityComment, ActivityReply } from './activity-comment';
|
|
3
|
+
import { ActivityComposer } from './activity-composer';
|
|
4
|
+
import { ActivityEvent } from './activity-event';
|
|
5
|
+
import { ActivityFeed, ActivityHeader, ActivityRoot } from './activity-root';
|
|
6
|
+
import { ActivityTimeline } from './activity-timeline';
|
|
7
|
+
export type { ActivityActor } from './activity.types';
|
|
8
|
+
export type { ActivityAvatarProps } from './activity-avatar';
|
|
9
|
+
export type { ActivityCommentProps, ActivityReplyProps } from './activity-comment';
|
|
10
|
+
export type { ActivityComposerProps } from './activity-composer';
|
|
11
|
+
export type { ActivityEventProps } from './activity-event';
|
|
12
|
+
export type { ActivityFeedProps, ActivityHeaderProps, ActivityRootProps } from './activity-root';
|
|
13
|
+
export type { ActivityTimelineProps } from './activity-timeline';
|
|
14
|
+
export { ActivityAvatar, ActivityComment, ActivityComposer, ActivityEvent, ActivityFeed, ActivityHeader, ActivityReply, ActivityRoot, ActivityTimeline, };
|
|
15
|
+
export declare const Activity: {
|
|
16
|
+
Root: (props: import('./activity-root').ActivityRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
Header: (props: import('./activity-root').ActivityHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
Feed: (props: import('./activity-root').ActivityFeedProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
Timeline: (props: import('./activity-timeline').ActivityTimelineProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
Event: (props: import('./activity-event').ActivityEventProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
Comment: (props: import('./activity-comment').ActivityCommentProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
Reply: (props: import('./activity-comment').ActivityReplyProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
Composer: (props: import('./activity-composer').ActivityComposerProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
Avatar: (props: import('./activity-avatar').ActivityAvatarProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
};
|
|
@@ -9,13 +9,13 @@ export declare const conversationRootDefaultProps: {
|
|
|
9
9
|
readonly role: "log";
|
|
10
10
|
};
|
|
11
11
|
export declare const ConversationRoot: import('@chakra-ui/react').ChakraComponent<import('react').ElementType, {
|
|
12
|
-
title?: string | undefined | undefined;
|
|
13
12
|
color?: string | undefined | undefined;
|
|
14
13
|
translate?: "yes" | "no" | undefined | undefined;
|
|
15
14
|
content?: string | undefined | undefined;
|
|
16
15
|
resize?: import('use-stick-to-bottom').Animation | undefined;
|
|
17
16
|
slot?: string | undefined | undefined;
|
|
18
17
|
style?: import('react').CSSProperties | undefined;
|
|
18
|
+
title?: string | undefined | undefined;
|
|
19
19
|
defaultChecked?: boolean | undefined | undefined;
|
|
20
20
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
21
21
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -24,7 +24,7 @@ export declare const ConversationRoot: import('@chakra-ui/react').ChakraComponen
|
|
|
24
24
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
25
25
|
autoFocus?: boolean | undefined | undefined;
|
|
26
26
|
className?: string | undefined | undefined;
|
|
27
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
27
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
28
28
|
contextMenu?: string | undefined | undefined;
|
|
29
29
|
dir?: string | undefined | undefined;
|
|
30
30
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -309,13 +309,13 @@ export declare const conversationScrollButtonContainerDefaultProps: {
|
|
|
309
309
|
export declare const ConversationScrollButton: (props: ConversationScrollButtonProps) => false | import("react/jsx-runtime").JSX.Element;
|
|
310
310
|
export declare const ChatPrimitives: {
|
|
311
311
|
readonly Root: import('@chakra-ui/react').ChakraComponent<import('react').ElementType, {
|
|
312
|
-
title?: string | undefined | undefined;
|
|
313
312
|
color?: string | undefined | undefined;
|
|
314
313
|
translate?: "yes" | "no" | undefined | undefined;
|
|
315
314
|
content?: string | undefined | undefined;
|
|
316
315
|
resize?: import('use-stick-to-bottom').Animation | undefined;
|
|
317
316
|
slot?: string | undefined | undefined;
|
|
318
317
|
style?: import('react').CSSProperties | undefined;
|
|
318
|
+
title?: string | undefined | undefined;
|
|
319
319
|
defaultChecked?: boolean | undefined | undefined;
|
|
320
320
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
321
321
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -324,7 +324,7 @@ export declare const ChatPrimitives: {
|
|
|
324
324
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
325
325
|
autoFocus?: boolean | undefined | undefined;
|
|
326
326
|
className?: string | undefined | undefined;
|
|
327
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
327
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
328
328
|
contextMenu?: string | undefined | undefined;
|
|
329
329
|
dir?: string | undefined | undefined;
|
|
330
330
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -8,7 +8,9 @@ declare const recipe: import('@chakra-ui/react').SlotRecipeDefinition<"content"
|
|
|
8
8
|
};
|
|
9
9
|
content: {
|
|
10
10
|
borderTopWidth: "1px";
|
|
11
|
+
borderRightWidth: "1px";
|
|
11
12
|
borderBottomWidth: "1px";
|
|
13
|
+
borderLeftWidth: "1px";
|
|
12
14
|
borderColor: "border.muted";
|
|
13
15
|
bg: "bg.subtle";
|
|
14
16
|
px: "xs";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MessageGroup, SessionMessage } from './message-types';
|
|
2
|
+
interface ChatMessageListProps {
|
|
3
|
+
leadingResponses: SessionMessage[];
|
|
4
|
+
groups: MessageGroup[];
|
|
5
|
+
streaming: boolean;
|
|
6
|
+
hideActiveQuestionForms: boolean;
|
|
7
|
+
expandedStickyMessageIds: Set<string>;
|
|
8
|
+
onToggleStickyMessage: (messageId: string) => void;
|
|
9
|
+
onReady?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const ChatMessageList: (props: ChatMessageListProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -2,12 +2,14 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { ChatInputQuestionPrompt, ChatInputQuestionResponse } from './chat-input-question-prompt';
|
|
3
3
|
import { SessionMessage } from './message-types';
|
|
4
4
|
interface ChatPanelProps {
|
|
5
|
+
conversationKey?: string;
|
|
5
6
|
messages: SessionMessage[];
|
|
7
|
+
loading?: boolean;
|
|
6
8
|
streaming?: boolean;
|
|
7
9
|
emptyStateTitle: string;
|
|
8
10
|
emptyStateDescription: string;
|
|
9
11
|
emptyStateContent?: ReactNode;
|
|
10
|
-
|
|
12
|
+
loaderComponent?: ReactNode;
|
|
11
13
|
chatInputPlaceholder: string;
|
|
12
14
|
chatInputDefaultValue?: string;
|
|
13
15
|
onSubmitMessage?: (text: string, attachments: string[], questionResponse?: ChatInputQuestionResponse) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SessionMessage } from './message-types';
|
|
2
|
+
interface MessageActionPanelProps {
|
|
3
|
+
message: SessionMessage;
|
|
4
|
+
alwaysVisible?: boolean;
|
|
5
|
+
copyAlwaysVisible?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const getMessageCopyText: (message: SessionMessage) => string;
|
|
8
|
+
export declare const getMessageTimestampLabel: (message: SessionMessage, locale?: string, timeZone?: string) => string;
|
|
9
|
+
export declare const MessageActionPanel: (props: MessageActionPanelProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type ChatMountMetric = {
|
|
2
|
+
id: string;
|
|
3
|
+
scenario: string;
|
|
4
|
+
label: string;
|
|
5
|
+
totalMs: number;
|
|
6
|
+
messageCount: number;
|
|
7
|
+
perMessageMs: number | null;
|
|
8
|
+
startedAtMs: number;
|
|
9
|
+
completedAtMs: number;
|
|
10
|
+
};
|
|
11
|
+
type PendingChatMountMetric = {
|
|
12
|
+
scenario: string;
|
|
13
|
+
label: string;
|
|
14
|
+
messageCount: number;
|
|
15
|
+
startedAtMs: number;
|
|
16
|
+
};
|
|
17
|
+
type StartChatMountMetricInput = {
|
|
18
|
+
scenario: string;
|
|
19
|
+
label: string;
|
|
20
|
+
messageCount: number;
|
|
21
|
+
startMarkName?: string;
|
|
22
|
+
};
|
|
23
|
+
type FinishChatMountMetricInput = {
|
|
24
|
+
id: string;
|
|
25
|
+
messageCount: number;
|
|
26
|
+
readyMarkName?: string;
|
|
27
|
+
};
|
|
28
|
+
declare global {
|
|
29
|
+
interface Window {
|
|
30
|
+
__chatPanelMountMetrics?: ChatMountMetric[];
|
|
31
|
+
__chatPanelPendingMountMetrics?: Record<string, PendingChatMountMetric>;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export declare const startChatMountMetric: (input: StartChatMountMetricInput) => string;
|
|
35
|
+
export declare const finishChatMountMetricAfterPaint: (input: FinishChatMountMetricInput) => void;
|
|
36
|
+
export declare const readLatestChatMountMetric: (scenario: string) => ChatMountMetric | null;
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChatMountMetric } from './chat-mount-metrics';
|
|
2
|
+
type ProfilerSample = {
|
|
3
|
+
scenario: string;
|
|
4
|
+
phase: string;
|
|
5
|
+
actualDuration: number;
|
|
6
|
+
baseDuration: number;
|
|
7
|
+
commitTime: number;
|
|
8
|
+
};
|
|
9
|
+
declare global {
|
|
10
|
+
interface Window {
|
|
11
|
+
__chatPanelPerf?: ProfilerSample[];
|
|
12
|
+
__chatPanelMountMetrics?: ChatMountMetric[];
|
|
13
|
+
__longTasks?: Array<{
|
|
14
|
+
duration: number;
|
|
15
|
+
}>;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SessionMessage } from '../agent-types';
|
|
2
|
+
export interface LargeChatConversationOptions {
|
|
3
|
+
sessionId: string;
|
|
4
|
+
turns: number;
|
|
5
|
+
textRepeat?: number;
|
|
6
|
+
toolCallsPerTurn?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ChatPerformanceSession {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
messages: SessionMessage[];
|
|
12
|
+
}
|
|
13
|
+
export declare const CHAT_PERFORMANCE_STRESS_TURNS = 500;
|
|
14
|
+
export declare const CHAT_PERFORMANCE_STRESS_MESSAGE_COUNT: number;
|
|
15
|
+
export declare const buildLargeChatConversation: (options: LargeChatConversationOptions) => SessionMessage[];
|
|
16
|
+
export declare const buildChatSessionSwitchFixture: () => {
|
|
17
|
+
primarySession: {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
messages: SessionMessage[];
|
|
21
|
+
};
|
|
22
|
+
secondarySession: {
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
messages: SessionMessage[];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare const seedStreamingMessage: (message: SessionMessage) => SessionMessage;
|
|
29
|
+
export declare const updateStreamingTextPart: (messages: SessionMessage[], messageId: string, partIndex: number, text: string) => SessionMessage[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type ChatPerfSample = {
|
|
2
|
+
scenario: string;
|
|
3
|
+
phase: string;
|
|
4
|
+
actualDuration: number;
|
|
5
|
+
baseDuration: number;
|
|
6
|
+
commitTime: number;
|
|
7
|
+
};
|
|
8
|
+
declare global {
|
|
9
|
+
interface Window {
|
|
10
|
+
__chatPanelPerf?: ChatPerfSample[];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export declare const ensureChatPerfBuffer: () => {
|
|
14
|
+
scenario: string;
|
|
15
|
+
phase: string;
|
|
16
|
+
actualDuration: number;
|
|
17
|
+
baseDuration: number;
|
|
18
|
+
commitTime: number;
|
|
19
|
+
}[] | null;
|
|
20
|
+
export declare const ChatPerformancePanel: (props: {
|
|
21
|
+
scenario: string;
|
|
22
|
+
messageCount: number;
|
|
23
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SessionMessage } from '../agent-types';
|
|
3
|
+
export declare const defaultChatPanelProps: {
|
|
4
|
+
readonly emptyStateTitle: "No messages";
|
|
5
|
+
readonly emptyStateDescription: "";
|
|
6
|
+
readonly chatInputPlaceholder: "Benchmark prompt";
|
|
7
|
+
};
|
|
8
|
+
export type ActiveMountMeasurement = {
|
|
9
|
+
id: string;
|
|
10
|
+
readyMarkName?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const markAfterPaint: (markName: string) => void;
|
|
13
|
+
export declare const nextFrame: () => Promise<void>;
|
|
14
|
+
export declare const streamMessages: (input: {
|
|
15
|
+
messages: SessionMessage[];
|
|
16
|
+
isCancelled: () => boolean;
|
|
17
|
+
appendMessage: (message: SessionMessage) => void;
|
|
18
|
+
updateText: (messageId: string, partIndex: number, text: string) => void;
|
|
19
|
+
}) => Promise<void>;
|
|
20
|
+
export declare function ChatMountReadyMarker(props: {
|
|
21
|
+
measurement: ActiveMountMeasurement | null;
|
|
22
|
+
messageCount: number;
|
|
23
|
+
}): null;
|
|
24
|
+
export declare function ChatPerfShell(props: {
|
|
25
|
+
scenario: string;
|
|
26
|
+
activeLabel: string;
|
|
27
|
+
messageCount: number;
|
|
28
|
+
actions?: ReactNode;
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ChangedFilesViewMode, ChangedFileTreeNode } from './types';
|
|
2
|
+
export declare const buildChangedFilesTree: (paths: string[], mode: ChangedFilesViewMode) => ChangedFileTreeNode[];
|
|
3
|
+
export declare const collectExpandedFolderIds: (nodes: ChangedFileTreeNode[]) => string[];
|
|
4
|
+
export declare const sortPathsByViewMode: (paths: string[], mode: ChangedFilesViewMode) => string[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Diff } from './diff-card';
|
|
2
|
+
import { BuiltDiffViewData, buildDiffViewData } from './diff-view-adapter';
|
|
3
|
+
import { DiffViewMode } from './types';
|
|
4
|
+
interface DiffCardBodyProps {
|
|
5
|
+
diff: Diff;
|
|
6
|
+
filePath: string;
|
|
7
|
+
oldContent: string;
|
|
8
|
+
newContent: string;
|
|
9
|
+
isLargeDiff: boolean;
|
|
10
|
+
hasOptedIntoLargeDiff: boolean;
|
|
11
|
+
onShowFullDiff?: () => void;
|
|
12
|
+
diffViewMode?: DiffViewMode;
|
|
13
|
+
}
|
|
14
|
+
interface DiffCardBodyModelInput extends DiffCardBodyProps {
|
|
15
|
+
buildViewData?: typeof buildDiffViewData;
|
|
16
|
+
}
|
|
17
|
+
export declare const createDiffCardBodyModel: (input: DiffCardBodyModelInput) => {
|
|
18
|
+
kind: "placeholder";
|
|
19
|
+
filePath: string;
|
|
20
|
+
renderedLineCount: number;
|
|
21
|
+
onShowFullDiff: (() => void) | undefined;
|
|
22
|
+
diffViewData?: undefined;
|
|
23
|
+
sideBySide?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
kind: "editor";
|
|
26
|
+
diffViewData: BuiltDiffViewData;
|
|
27
|
+
sideBySide: boolean;
|
|
28
|
+
filePath?: undefined;
|
|
29
|
+
renderedLineCount?: undefined;
|
|
30
|
+
onShowFullDiff?: undefined;
|
|
31
|
+
};
|
|
32
|
+
export declare const DiffCardBody: (props: DiffCardBodyProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export type TestDiffViewData = BuiltDiffViewData;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Diff } from './diff-card';
|
|
2
|
+
import { DiffViewMode } from './types';
|
|
3
|
+
interface DiffCardContentProps {
|
|
4
|
+
diff: Diff;
|
|
5
|
+
filePath: string;
|
|
6
|
+
oldContent: string;
|
|
7
|
+
newContent: string;
|
|
8
|
+
isExpanded: boolean;
|
|
9
|
+
isLargeDiff: boolean;
|
|
10
|
+
isGeneratedDiff: boolean;
|
|
11
|
+
hasDiffContent: boolean;
|
|
12
|
+
canLoadDiff: boolean;
|
|
13
|
+
shouldAutoLoadDiff: boolean;
|
|
14
|
+
loadError: boolean;
|
|
15
|
+
isLoadingDiff: boolean;
|
|
16
|
+
onLoadDiff: () => Promise<void>;
|
|
17
|
+
hasOptedIntoLargeDiff: boolean;
|
|
18
|
+
onShowFullDiff?: () => void;
|
|
19
|
+
diffViewMode?: DiffViewMode;
|
|
20
|
+
}
|
|
21
|
+
export declare const DiffCardContent: (props: DiffCardContentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface DeferredDiffLoadProps {
|
|
2
|
+
title: string;
|
|
3
|
+
actionLabel?: string;
|
|
4
|
+
isLoadingDiff: boolean;
|
|
5
|
+
onAction?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const DeferredDiffLoad: (props: DeferredDiffLoadProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const LoadingDiffContent: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DiffViewMode } from './types';
|
|
2
|
+
export interface Diff {
|
|
3
|
+
change: "added" | "deleted" | "modified" | "renamed" | "copied" | "permissionChange";
|
|
4
|
+
oldPath?: string;
|
|
5
|
+
newPath?: string;
|
|
6
|
+
oldContent?: string;
|
|
7
|
+
newContent?: string;
|
|
8
|
+
additions?: number;
|
|
9
|
+
deletions?: number;
|
|
10
|
+
}
|
|
11
|
+
interface DiffCardProps {
|
|
12
|
+
diff: Diff;
|
|
13
|
+
isSelected?: boolean;
|
|
14
|
+
isExpanded?: boolean;
|
|
15
|
+
onToggleExpanded?: () => void;
|
|
16
|
+
onSelect?: () => void;
|
|
17
|
+
onLoadDiff?: (path: string) => Promise<void>;
|
|
18
|
+
hasOptedIntoLargeDiff?: boolean;
|
|
19
|
+
onShowFullDiff?: () => void;
|
|
20
|
+
diffViewMode?: DiffViewMode;
|
|
21
|
+
}
|
|
22
|
+
interface DiffCardHeaderProps {
|
|
23
|
+
diff: Diff;
|
|
24
|
+
isExpanded?: boolean;
|
|
25
|
+
onToggleExpanded?: () => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const shouldAutoLoadDiffContent: (input: {
|
|
28
|
+
isExpanded: boolean;
|
|
29
|
+
isSelected: boolean;
|
|
30
|
+
hasDiffContent: boolean;
|
|
31
|
+
isLargeDiff: boolean;
|
|
32
|
+
isGeneratedDiff: boolean;
|
|
33
|
+
requestedPath: string | null;
|
|
34
|
+
filePath: string;
|
|
35
|
+
}) => boolean;
|
|
36
|
+
export declare const resolveRequestedDiffPath: (input: {
|
|
37
|
+
requestedPath: string | null;
|
|
38
|
+
filePath: string;
|
|
39
|
+
hasDiffContent: boolean;
|
|
40
|
+
}) => string | null;
|
|
41
|
+
export declare const DiffCard: (props: DiffCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare const DiffCardHeader: (props: DiffCardHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Diff } from './diff-card';
|
|
2
|
+
import { DiffViewMode } from './types';
|
|
3
|
+
interface DiffDrawerProps {
|
|
4
|
+
diffs: Diff[];
|
|
5
|
+
selectedDiffPath?: string | null;
|
|
6
|
+
onLoadDiff?: (path: string) => Promise<void>;
|
|
7
|
+
onSelectDiffPath?: (path: string) => void;
|
|
8
|
+
onExpansionStateChange?: (state: DiffDrawerExpansionState) => void;
|
|
9
|
+
expansionCommand?: DiffExpansionCommand | null;
|
|
10
|
+
diffViewMode?: DiffViewMode;
|
|
11
|
+
}
|
|
12
|
+
export interface DiffExpansionCommand {
|
|
13
|
+
action: "expand" | "collapse" | "expand-selected";
|
|
14
|
+
id: number;
|
|
15
|
+
path?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface DiffDrawerExpansionState {
|
|
18
|
+
allExpanded: boolean;
|
|
19
|
+
allCollapsed: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type { Diff };
|
|
22
|
+
interface EstimateDiffCardHeightInput {
|
|
23
|
+
diff: Diff;
|
|
24
|
+
isCollapsed: boolean;
|
|
25
|
+
hasOptedIntoLargeDiff?: boolean;
|
|
26
|
+
diffViewMode?: DiffViewMode;
|
|
27
|
+
}
|
|
28
|
+
export declare const estimateDiffCardHeight: (input: EstimateDiffCardHeightInput) => number;
|
|
29
|
+
export declare const buildInitialCollapsedPaths: (diffs: Diff[]) => Set<string>;
|
|
30
|
+
export declare const buildAllCollapsedPaths: (diffs: Diff[]) => Set<string>;
|
|
31
|
+
export declare const toggleCollapsedPath: (collapsedPaths: Set<string>, path: string) => Set<string>;
|
|
32
|
+
export declare const resolveCollapsedPathsForSelectedDiff: (diffs: Diff[], collapsedPaths: Set<string>, selectedDiffPath: string | null) => Set<string>;
|
|
33
|
+
export declare function DiffDrawer(props: DiffDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DiffViewData } from './diff-view-adapter';
|
|
2
|
+
export interface DiffEditorInput {
|
|
3
|
+
original: string;
|
|
4
|
+
modified: string;
|
|
5
|
+
language?: string;
|
|
6
|
+
oldPath?: string;
|
|
7
|
+
newPath?: string;
|
|
8
|
+
}
|
|
9
|
+
interface DiffEditorProps extends DiffEditorInput {
|
|
10
|
+
sideBySide?: boolean;
|
|
11
|
+
disableScroll?: boolean;
|
|
12
|
+
data?: DiffViewData;
|
|
13
|
+
}
|
|
14
|
+
export interface DiffEditorDataState {
|
|
15
|
+
input: DiffEditorInput;
|
|
16
|
+
data: DiffViewData;
|
|
17
|
+
}
|
|
18
|
+
export declare const resolveDiffEditorDataState: (current: DiffEditorDataState | null, input: DiffEditorInput, createData: () => DiffViewData) => DiffEditorDataState;
|
|
19
|
+
export declare function DiffEditor(props: DiffEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const LARGE_DIFF_LINE_THRESHOLD = 1000;
|
|
2
|
+
export declare const getDiffLineCount: (input: {
|
|
3
|
+
additions?: number;
|
|
4
|
+
deletions?: number;
|
|
5
|
+
oldContent?: string;
|
|
6
|
+
newContent?: string;
|
|
7
|
+
}) => number;
|
|
8
|
+
export declare const isLargeDiffContent: (input: {
|
|
9
|
+
additions?: number;
|
|
10
|
+
deletions?: number;
|
|
11
|
+
oldContent?: string;
|
|
12
|
+
newContent?: string;
|
|
13
|
+
}) => boolean;
|
|
14
|
+
export declare const isGeneratedDiffPath: (path: string) => boolean;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DiffViewProps } from '@git-diff-view/react';
|
|
2
|
+
interface ResolveDiffLanguageInput {
|
|
3
|
+
language?: string;
|
|
4
|
+
oldPath?: string;
|
|
5
|
+
newPath?: string;
|
|
6
|
+
}
|
|
7
|
+
interface BuildDiffViewDataInput extends ResolveDiffLanguageInput {
|
|
8
|
+
original: string;
|
|
9
|
+
modified: string;
|
|
10
|
+
}
|
|
11
|
+
export type DiffViewData = NonNullable<DiffViewProps<unknown>["data"]>;
|
|
12
|
+
/**
|
|
13
|
+
* Diff view data enriched with the row counts the renderer will actually paint. The renderer
|
|
14
|
+
* collapses unchanged context, so only lines inside the hunks are rendered — these counts come
|
|
15
|
+
* from the hunk patch, not the full file length.
|
|
16
|
+
*/
|
|
17
|
+
export interface BuiltDiffViewData extends DiffViewData {
|
|
18
|
+
/** Content rows painted in unified layout (one per added/removed/context line). */
|
|
19
|
+
unifiedContentRows: number;
|
|
20
|
+
/** Content rows painted in split layout (paired add/remove lines share a row). */
|
|
21
|
+
splitContentRows: number;
|
|
22
|
+
/** Hunk header rows — one per `@@` section, taller than content rows. */
|
|
23
|
+
hunkRows: number;
|
|
24
|
+
}
|
|
25
|
+
export declare const resolveDiffLanguage: ({ language, oldPath, newPath }: ResolveDiffLanguageInput) => string;
|
|
26
|
+
export declare const buildDiffViewData: (input: BuildDiffViewDataInput) => BuiltDiffViewData;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Diff } from './diff-card';
|
|
2
|
+
import { FileIconInfo } from './types';
|
|
3
|
+
export interface DiffViewerProps {
|
|
4
|
+
diffs: Diff[];
|
|
5
|
+
changedFilePaths?: string[];
|
|
6
|
+
defaultSelectedPath?: string | null;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
onLoadDiff?: (path: string) => Promise<void>;
|
|
9
|
+
resolveFileIcon?: (path: string, options?: {
|
|
10
|
+
isFolder?: boolean;
|
|
11
|
+
isExpanded?: boolean;
|
|
12
|
+
}) => FileIconInfo | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare const DiffViewer: (props: DiffViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChangedFilesViewMode, DiffViewMode } from './types';
|
|
2
|
+
interface DiffViewerState {
|
|
3
|
+
isTreePanelOpen: boolean;
|
|
4
|
+
viewMode: ChangedFilesViewMode;
|
|
5
|
+
diffViewMode: DiffViewMode;
|
|
6
|
+
searchQuery: string;
|
|
7
|
+
selectedPath: string | null;
|
|
8
|
+
expandedFolderIds: Set<string>;
|
|
9
|
+
setTreePanelOpen: (open: boolean) => void;
|
|
10
|
+
toggleTreePanel: () => void;
|
|
11
|
+
setViewMode: (viewMode: ChangedFilesViewMode) => void;
|
|
12
|
+
setDiffViewMode: (diffViewMode: DiffViewMode) => void;
|
|
13
|
+
setSearchQuery: (searchQuery: string) => void;
|
|
14
|
+
setSelectedPath: (selectedPath: string | null) => void;
|
|
15
|
+
setExpandedFolderIds: (folderIds: string[]) => void;
|
|
16
|
+
toggleFolder: (folderId: string) => void;
|
|
17
|
+
expandAll: (folderIds: string[]) => void;
|
|
18
|
+
collapseAll: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const useDiffViewerStore: import('zustand').UseBoundStore<import('zustand').StoreApi<DiffViewerState>>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChangedFilesViewMode, FileIconInfo } from './types';
|
|
2
|
+
interface FileListPanelProps {
|
|
3
|
+
title: string;
|
|
4
|
+
paths: string[];
|
|
5
|
+
selectedPath: string | null;
|
|
6
|
+
viewMode: ChangedFilesViewMode;
|
|
7
|
+
searchQuery: string;
|
|
8
|
+
expandedFolderIds: Set<string>;
|
|
9
|
+
onSelectPath: (path: string) => void;
|
|
10
|
+
onSearchQueryChange: (value: string) => void;
|
|
11
|
+
onToggleFolder: (id: string) => void;
|
|
12
|
+
resolveFileIcon?: (path: string, options?: {
|
|
13
|
+
isFolder?: boolean;
|
|
14
|
+
isExpanded?: boolean;
|
|
15
|
+
}) => FileIconInfo | undefined;
|
|
16
|
+
changeByPath?: Map<string, string>;
|
|
17
|
+
}
|
|
18
|
+
export declare const FileListPanel: (props: FileListPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|