@pstdio/ui 0.5.0 → 0.5.2
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-DwEDwpo2.js → MermaidComponent-DDCxR-Gs.js} +2 -2
- package/dist/{MermaidComponent-DwEDwpo2.js.map → MermaidComponent-DDCxR-Gs.js.map} +1 -1
- package/dist/chat-ui.js +1358 -877
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/app-shell/app-shell.d.ts +1 -0
- package/dist/components/app-shell/command-palette.d.ts +16 -0
- package/dist/components/app-shell/file-tree.d.ts +7 -0
- package/dist/components/app-shell/mock-chat.d.ts +2 -0
- package/dist/components/app-shell/mock-data.d.ts +37 -0
- package/dist/components/app-shell/pages/project-list-page.d.ts +7 -0
- package/dist/components/app-shell/pages/sessions-page.d.ts +6 -0
- package/dist/components/app-shell/pages/settings-page.d.ts +5 -0
- package/dist/components/app-shell/pages/ticket-details-page.d.ts +7 -0
- package/dist/components/app-shell/pages/tickets-page.d.ts +7 -0
- package/dist/components/app-shell/pages/workspace-page.d.ts +1 -0
- package/dist/components/app-shell/resizable-panel.d.ts +13 -0
- package/dist/components/chat-ui/agent-types.d.ts +4 -0
- package/dist/components/chat-ui/components/ai-message.d.ts +7 -5
- package/dist/components/chat-ui/components/chat-input-question-prompt.d.ts +33 -0
- package/dist/components/chat-ui/components/chat-input.d.ts +4 -1
- package/dist/components/chat-ui/components/chat-panel-sticky-user-message.d.ts +9 -0
- package/dist/components/chat-ui/components/chat-panel.d.ts +4 -1
- package/dist/components/chat-ui/components/message-parts-renderer.d.ts +1 -0
- package/dist/components/chat-ui/components/timeline-tool-blocks.d.ts +14 -0
- package/dist/components/chat-ui/components/timeline.d.ts +22 -0
- package/dist/components/chat-ui/components/tool-invocation-timeline.d.ts +2 -1
- package/dist/components/chat-ui/index.d.ts +1 -0
- package/dist/components/chat-ui/mocks/library/index.d.ts +10 -0
- package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -2
- package/dist/components/chat-ui/tool-rendering/default-renderers.d.ts +2 -0
- package/dist/components/chat-ui/tool-rendering/question-renderer.d.ts +10 -0
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
- package/dist/components/chat-ui/tool-rendering/todowrite-renderer.d.ts +10 -0
- package/dist/components/chat-ui/utils/get-icon.d.ts +2 -0
- package/dist/components/chat-ui/utils/tool-name.d.ts +2 -0
- package/dist/components/content-placeholder.d.ts +1 -0
- package/dist/components/header.d.ts +7 -0
- package/dist/components/list-row/list-row-actions.d.ts +10 -0
- package/dist/components/list-row/list-row.d.ts +2 -0
- package/dist/components/list-row/list-row.types.d.ts +85 -0
- package/dist/components/{sidebar-tree → list-row}/searchable-action-menu.d.ts +2 -2
- package/dist/components/panel-header.constants.d.ts +1 -1
- package/dist/components/radio.d.ts +8 -0
- package/dist/components/resource-context-menu.d.ts +1 -2
- package/dist/components/sidebar/sidebar-project-menu.d.ts +0 -3
- package/dist/components/sidebar/sidebar.store.d.ts +2 -0
- package/dist/components/sidebar/sidebar.types.d.ts +10 -4
- package/dist/components/tickets/ticket-board.d.ts +6 -2
- package/dist/components/tickets/ticket-list.d.ts +3 -0
- package/dist/components/tickets/tickets-workspace.d.ts +3 -0
- package/dist/components/tickets/workspace-helpers.d.ts +6 -1
- package/dist/components/tree-list/tree-list.d.ts +18 -0
- package/dist/components/tree-list/tree-list.types.d.ts +29 -0
- package/dist/index.d.ts +10 -5
- package/dist/index.js +2621 -2459
- package/dist/index.js.map +1 -1
- package/dist/radio-C42qncrD.js +236 -0
- package/dist/radio-C42qncrD.js.map +1 -0
- package/dist/{rich-message-BVRk9BSD.js → rich-message-DeJwzVeV.js} +364 -355
- package/dist/rich-message-DeJwzVeV.js.map +1 -0
- package/dist/rich-text.js +2 -2
- package/dist/style.css +1 -1
- package/dist/theme/custom/index.d.ts +3 -0
- package/dist/theme/custom/monokai.json.d.ts +80 -0
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/primitives/colors.d.ts +6 -0
- package/dist/theme/recipes/button.d.ts +34 -0
- package/dist/theme/recipes/kbd.d.ts +41 -0
- package/dist/theme/tokens/colors.d.ts +18 -6
- package/dist/{theme-D0VvFB1Y.js → theme-Dq4r3aRE.js} +247 -135
- package/dist/theme-Dq4r3aRE.js.map +1 -0
- package/dist/theme.js +4 -2
- package/dist/utils/apply-theme-preference.d.ts +20 -2
- package/dist/utils/theme-preference.d.ts +4 -2
- package/package.json +1 -2
- package/dist/components/chat-ui/tool-rendering/todo-write-renderer.d.ts +0 -2
- package/dist/components/drawer-inline.d.ts +0 -24
- package/dist/components/file-selector.d.ts +0 -12
- package/dist/components/menu-item.d.ts +0 -42
- package/dist/components/pstdio-logo.d.ts +0 -2
- package/dist/components/sidebar-tree/sidebar-node-content.d.ts +0 -9
- package/dist/components/sidebar-tree/sidebar-tree.d.ts +0 -13
- package/dist/components/sidebar-tree/sidebar-tree.types.d.ts +0 -68
- package/dist/empty-state-yGspgiPl.js +0 -185
- package/dist/empty-state-yGspgiPl.js.map +0 -1
- package/dist/rich-message-BVRk9BSD.js.map +0 -1
- package/dist/theme-D0VvFB1Y.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AppShell: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WorkspaceTicket } from '../tickets/types';
|
|
2
|
+
export interface CommandPaletteHandlers {
|
|
3
|
+
onOpenTickets: () => void;
|
|
4
|
+
onOpenSessions: () => void;
|
|
5
|
+
onOpenProjectSettings: () => void;
|
|
6
|
+
onOpenGlobalSettings: () => void;
|
|
7
|
+
onOpenProjects: () => void;
|
|
8
|
+
onSelectTicket: (ticket: WorkspaceTicket) => void;
|
|
9
|
+
onSelectSession: (sessionId: string) => void;
|
|
10
|
+
}
|
|
11
|
+
interface CommandPaletteProps extends CommandPaletteHandlers {
|
|
12
|
+
open: boolean;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const CommandPalette: (props: CommandPaletteProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Diff } from '../diff-card';
|
|
2
|
+
import { WorkspaceTagDefinition, WorkspaceTicket } from '../tickets/types';
|
|
3
|
+
export interface MockProject {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
repoPath: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
export interface MockSession {
|
|
10
|
+
id: string;
|
|
11
|
+
title: string;
|
|
12
|
+
preview: string;
|
|
13
|
+
status: "in_progress" | "awaiting_input" | "completed" | "failed";
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const mockProjects: MockProject[];
|
|
17
|
+
export declare const mockTagDefinitions: WorkspaceTagDefinition[];
|
|
18
|
+
export declare const mockTickets: WorkspaceTicket[];
|
|
19
|
+
export declare const mockTicketDescription = "## Goal\n\nMirror the dashboard surface inside Storybook so design and engineering can review whole-page composition without booting the app.\n\n## Notes\n\n- Use mock data only \u2014 no async loading.\n- Sidebar navigation should switch between pages.\n- All pages share the same shell.";
|
|
20
|
+
export declare const mockSessions: MockSession[];
|
|
21
|
+
export interface MockWorkspace {
|
|
22
|
+
id: string;
|
|
23
|
+
shorthand: string;
|
|
24
|
+
ticketId: string;
|
|
25
|
+
branch: string;
|
|
26
|
+
status: "in_progress" | "completed" | "failed";
|
|
27
|
+
}
|
|
28
|
+
export declare const mockWorkspaces: MockWorkspace[];
|
|
29
|
+
export declare const mockDiffs: Diff[];
|
|
30
|
+
export interface MockCheck {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
status: "passed" | "failed" | "running";
|
|
34
|
+
duration: string;
|
|
35
|
+
details: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const mockChecks: MockCheck[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MockProject } from '../mock-data';
|
|
2
|
+
interface ProjectListPageProps {
|
|
3
|
+
onSelectProject: (project: MockProject) => void;
|
|
4
|
+
onOpenSettings: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const ProjectListPage: (props: ProjectListPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WorkspaceTicket } from '../../tickets/types';
|
|
2
|
+
interface TicketDetailsPageProps {
|
|
3
|
+
ticket: WorkspaceTicket;
|
|
4
|
+
onOpenWorkspace: (workspaceShorthand: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const TicketDetailsPage: (props: TicketDetailsPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WorkspaceTicket } from '../../tickets/types';
|
|
2
|
+
export declare const TICKETS_STORAGE_KEY = "app-shell-tickets";
|
|
3
|
+
interface TicketsPageProps {
|
|
4
|
+
onSelectTicket: (ticket: WorkspaceTicket) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const TicketsPage: (props: TicketsPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WorkspacePage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FlexProps } from '@chakra-ui/react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
interface ResizablePanelProps extends Omit<FlexProps, "children"> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
defaultWidth?: number;
|
|
6
|
+
minWidth?: number;
|
|
7
|
+
maxWidth?: number;
|
|
8
|
+
handleSide?: "left" | "right";
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
onWidthChange?: (width: number) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const ResizablePanel: (props: ResizablePanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -103,6 +103,10 @@ export type SessionMessageInput = {
|
|
|
103
103
|
model?: string | null;
|
|
104
104
|
cwd?: string;
|
|
105
105
|
messageOffset?: number;
|
|
106
|
+
questionResponse?: QuestionResponse;
|
|
107
|
+
};
|
|
108
|
+
export type QuestionResponse = {
|
|
109
|
+
answers: string[][];
|
|
106
110
|
};
|
|
107
111
|
export type SessionMessagesInput = {
|
|
108
112
|
cwd?: string | null;
|
|
@@ -7,13 +7,14 @@ declare const recipe: import('@chakra-ui/react').SlotRecipeDefinition<"content"
|
|
|
7
7
|
flexDirection: "row";
|
|
8
8
|
};
|
|
9
9
|
content: {
|
|
10
|
-
|
|
10
|
+
borderTopWidth: "1px";
|
|
11
|
+
borderBottomWidth: "1px";
|
|
11
12
|
borderColor: "border.muted";
|
|
12
13
|
bg: "bg.subtle";
|
|
13
14
|
px: "xs";
|
|
14
15
|
py: "xs";
|
|
15
16
|
width: "full";
|
|
16
|
-
|
|
17
|
+
borderRadius: "0";
|
|
17
18
|
};
|
|
18
19
|
};
|
|
19
20
|
assistant: {
|
|
@@ -24,6 +25,7 @@ declare const recipe: import('@chakra-ui/react').SlotRecipeDefinition<"content"
|
|
|
24
25
|
};
|
|
25
26
|
content: {
|
|
26
27
|
width: "full";
|
|
28
|
+
px: "xs";
|
|
27
29
|
};
|
|
28
30
|
};
|
|
29
31
|
developer: {
|
|
@@ -58,17 +60,17 @@ declare const recipe: import('@chakra-ui/react').SlotRecipeDefinition<"content"
|
|
|
58
60
|
shape: {
|
|
59
61
|
rounded: {
|
|
60
62
|
content: {
|
|
61
|
-
rounded: "
|
|
63
|
+
rounded: "0";
|
|
62
64
|
};
|
|
63
65
|
};
|
|
64
66
|
pill: {
|
|
65
67
|
content: {
|
|
66
|
-
rounded: "
|
|
68
|
+
rounded: "0";
|
|
67
69
|
};
|
|
68
70
|
};
|
|
69
71
|
square: {
|
|
70
72
|
content: {
|
|
71
|
-
rounded: "
|
|
73
|
+
rounded: "0";
|
|
72
74
|
};
|
|
73
75
|
};
|
|
74
76
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface ChatInputQuestionOption {
|
|
2
|
+
label: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ChatInputQuestion {
|
|
6
|
+
id?: string;
|
|
7
|
+
question: string;
|
|
8
|
+
options: ChatInputQuestionOption[];
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
allowCustomAnswer?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ChatInputQuestionPrompt {
|
|
14
|
+
questions: ChatInputQuestion[];
|
|
15
|
+
}
|
|
16
|
+
export interface ChatInputQuestionResponse {
|
|
17
|
+
answers: string[][];
|
|
18
|
+
}
|
|
19
|
+
export type ChatInputQuestionCustomAnswers = Record<string, string>;
|
|
20
|
+
interface QuestionPromptControlsProps {
|
|
21
|
+
questionPrompt: ChatInputQuestionPrompt;
|
|
22
|
+
selectedOptionsByQuestion: Record<string, string[]>;
|
|
23
|
+
customAnswersByQuestion: ChatInputQuestionCustomAnswers;
|
|
24
|
+
onToggleOption: (question: ChatInputQuestion, questionIndex: number, optionLabel: string) => void;
|
|
25
|
+
onCustomAnswerChange: (question: ChatInputQuestion, questionIndex: number, answer: string) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const getQuestionSelectionKey: (question: ChatInputQuestion, index: number) => string;
|
|
28
|
+
export declare const getQuestionPromptSignature: (questionPrompt: ChatInputQuestionPrompt | undefined) => string;
|
|
29
|
+
export declare const buildQuestionResponse: (questionPrompt: ChatInputQuestionPrompt | undefined, selectedOptionsByQuestion: Record<string, string[]>, answerInput: ChatInputQuestionCustomAnswers | string) => string;
|
|
30
|
+
export declare const buildQuestionAnswerValues: (questionPrompt: ChatInputQuestionPrompt, selectedOptionsByQuestion: Record<string, string[]>, answerInput: ChatInputQuestionCustomAnswers | string) => string[][];
|
|
31
|
+
export declare const hasMissingRequiredQuestionAnswer: (questionPrompt: ChatInputQuestionPrompt | undefined, selectedOptionsByQuestion: Record<string, string[]>, answerInput: ChatInputQuestionCustomAnswers | string) => boolean;
|
|
32
|
+
export declare const QuestionPromptControls: (props: QuestionPromptControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ChatInputQuestionPrompt, ChatInputQuestionResponse } from './chat-input-question-prompt';
|
|
2
3
|
interface ChatInputProps {
|
|
3
4
|
defaultState: string;
|
|
4
5
|
placeholder?: string;
|
|
5
|
-
onSubmit?: (text: string, attachments: string[]) => void;
|
|
6
|
+
onSubmit?: (text: string, attachments: string[], questionResponse?: ChatInputQuestionResponse) => void;
|
|
6
7
|
onInterrupt?: () => void;
|
|
7
8
|
streaming?: boolean;
|
|
8
9
|
attachedResources?: string[];
|
|
@@ -12,6 +13,8 @@ interface ChatInputProps {
|
|
|
12
13
|
attachmentList?: ReactNode;
|
|
13
14
|
actions?: ReactNode;
|
|
14
15
|
attachedToTop?: boolean;
|
|
16
|
+
questionPrompt?: ChatInputQuestionPrompt;
|
|
17
|
+
autoFocus?: boolean;
|
|
15
18
|
}
|
|
16
19
|
export declare const ChatInput: (props: ChatInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
20
|
export {};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { SessionMessage } from './message-types';
|
|
2
2
|
export declare const STICKY_USER_MESSAGE_COLLAPSE_TEXT_THRESHOLD = 360;
|
|
3
|
+
export declare const STICKY_USER_MESSAGE_COLLAPSE_LINE_THRESHOLD = 4;
|
|
3
4
|
export declare const STICKY_USER_MESSAGE_COLLAPSED_MAX_HEIGHT = "min(10vh, 4rem)";
|
|
5
|
+
export declare const STICKY_USER_MESSAGE_EXPANDED_MAX_HEIGHT = "min(70dvh, calc(100dvh - 12rem), 22rem)";
|
|
6
|
+
interface StickyUserMessageScrollElement {
|
|
7
|
+
clientHeight: number;
|
|
8
|
+
scrollHeight: number;
|
|
9
|
+
scrollTop: number;
|
|
10
|
+
}
|
|
4
11
|
export declare const isStickyUserMessageCollapsible: (message: SessionMessage) => boolean;
|
|
12
|
+
export declare const shouldStopStickyUserMessageWheel: (element: StickyUserMessageScrollElement, deltaY: number) => boolean;
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ChatInputQuestionPrompt, ChatInputQuestionResponse } from './chat-input-question-prompt';
|
|
2
3
|
import { SessionMessage } from './message-types';
|
|
3
4
|
interface ChatPanelProps {
|
|
4
5
|
messages: SessionMessage[];
|
|
@@ -9,7 +10,7 @@ interface ChatPanelProps {
|
|
|
9
10
|
loadingContent?: ReactNode;
|
|
10
11
|
chatInputPlaceholder: string;
|
|
11
12
|
chatInputDefaultValue?: string;
|
|
12
|
-
onSubmitMessage?: (text: string, attachments: string[]) => void;
|
|
13
|
+
onSubmitMessage?: (text: string, attachments: string[], questionResponse?: ChatInputQuestionResponse) => void;
|
|
13
14
|
onInterrupt?: () => void;
|
|
14
15
|
onChatInputChange?: (text: string) => void;
|
|
15
16
|
actions?: ReactNode;
|
|
@@ -21,6 +22,8 @@ interface ChatPanelProps {
|
|
|
21
22
|
workspaceHub?: ReactNode;
|
|
22
23
|
workspaceInitializing?: boolean;
|
|
23
24
|
inputDisabled?: boolean;
|
|
25
|
+
chatInputQuestionPrompt?: ChatInputQuestionPrompt;
|
|
26
|
+
chatInputAutoFocus?: boolean;
|
|
24
27
|
}
|
|
25
28
|
export declare const ChatPanel: (props: ChatPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
29
|
export {};
|
|
@@ -5,6 +5,7 @@ type ToolInvocationTimelineComponent = (props: ToolInvocationTimelineProps) => R
|
|
|
5
5
|
export interface MessagePartsProps {
|
|
6
6
|
message: SessionMessage;
|
|
7
7
|
streaming?: boolean;
|
|
8
|
+
hideQuestionForms?: boolean;
|
|
8
9
|
onOpenFile?: (filePath: string) => void;
|
|
9
10
|
toolInvocationTimeline?: ToolInvocationTimelineComponent;
|
|
10
11
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { QuestionFormBlockQuestion, TodoListBlockItem } from './timeline';
|
|
2
|
+
interface QuestionFormBlockViewProps {
|
|
3
|
+
questions: QuestionFormBlockQuestion[];
|
|
4
|
+
editable?: boolean;
|
|
5
|
+
selectedOptionsByQuestion?: Record<string, string[]>;
|
|
6
|
+
customAnswersByQuestion?: Record<string, string>;
|
|
7
|
+
onToggleOption?: (question: QuestionFormBlockQuestion, questionIndex: number, optionLabel: string) => void;
|
|
8
|
+
onCustomAnswerChange?: (question: QuestionFormBlockQuestion, questionIndex: number, answer: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const TodoListBlockView: (props: {
|
|
11
|
+
items: TodoListBlockItem[];
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const QuestionFormBlockView: (props: QuestionFormBlockViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -48,6 +48,22 @@ export type TitleSegment = {
|
|
|
48
48
|
muted?: boolean;
|
|
49
49
|
variant?: "default" | "bubble";
|
|
50
50
|
};
|
|
51
|
+
export type TodoListBlockItem = {
|
|
52
|
+
label: string;
|
|
53
|
+
checked: boolean;
|
|
54
|
+
};
|
|
55
|
+
export type QuestionFormBlockOption = {
|
|
56
|
+
label: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
};
|
|
59
|
+
export type QuestionFormBlockQuestion = {
|
|
60
|
+
id?: string;
|
|
61
|
+
question: string;
|
|
62
|
+
options: QuestionFormBlockOption[];
|
|
63
|
+
multiple: boolean;
|
|
64
|
+
required: boolean;
|
|
65
|
+
allowCustomAnswer: boolean;
|
|
66
|
+
};
|
|
51
67
|
export type Block = {
|
|
52
68
|
type: "comment";
|
|
53
69
|
text: string;
|
|
@@ -71,6 +87,12 @@ export type Block = {
|
|
|
71
87
|
} | {
|
|
72
88
|
type: "text";
|
|
73
89
|
text: string;
|
|
90
|
+
} | {
|
|
91
|
+
type: "todo-list";
|
|
92
|
+
items: TodoListBlockItem[];
|
|
93
|
+
} | {
|
|
94
|
+
type: "question-form";
|
|
95
|
+
questions: QuestionFormBlockQuestion[];
|
|
74
96
|
} | {
|
|
75
97
|
type: "references";
|
|
76
98
|
references: string[];
|
|
@@ -2,6 +2,7 @@ import { ToolPart } from './message-types';
|
|
|
2
2
|
export interface ToolInvocationTimelineProps {
|
|
3
3
|
invocations: ToolPart[];
|
|
4
4
|
labeledBlocks?: boolean;
|
|
5
|
+
hideQuestionForms?: boolean;
|
|
5
6
|
onOpenFile?: (filePath: string) => void;
|
|
6
7
|
}
|
|
7
|
-
export declare function ToolInvocationTimeline(props: ToolInvocationTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ToolInvocationTimeline(props: ToolInvocationTimelineProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -7,6 +7,7 @@ export { ApprovalPrompt } from './components/approval-prompt';
|
|
|
7
7
|
export type { AutoScrollProps } from './components/auto-scroll';
|
|
8
8
|
export { AutoScroll } from './components/auto-scroll';
|
|
9
9
|
export { ChatInput } from './components/chat-input';
|
|
10
|
+
export type { ChatInputQuestionPrompt, ChatInputQuestionResponse } from './components/chat-input-question-prompt';
|
|
10
11
|
export { ChatPanel } from './components/chat-panel';
|
|
11
12
|
export { ChatSkeleton } from './components/chat-skeleton';
|
|
12
13
|
export type { SessionMessage, SessionMessagePart } from './components/message-types';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AgentId, SessionMessage } from '../../agent-types';
|
|
2
|
+
export type ConversationFixture = {
|
|
3
|
+
id: string;
|
|
4
|
+
agent: AgentId;
|
|
5
|
+
label: string;
|
|
6
|
+
description: string;
|
|
7
|
+
messages: SessionMessage[];
|
|
8
|
+
};
|
|
9
|
+
export declare const fixtures: ConversationFixture[];
|
|
10
|
+
export declare const fixturesById: Map<string, ConversationFixture>;
|
|
@@ -5,7 +5,7 @@ export declare const buildTimelineDocFromInvocations: (invocations: ToolPart[],
|
|
|
5
5
|
items: (import('../components/timeline').Item | {
|
|
6
6
|
indicator: {
|
|
7
7
|
readonly type: "icon";
|
|
8
|
-
readonly icon: "search" | "dot" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "
|
|
8
|
+
readonly icon: "search" | "dot" | "file" | "shell" | "danger" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo" | "terminal";
|
|
9
9
|
};
|
|
10
10
|
title: TitleSegment[];
|
|
11
11
|
blocks: Block[];
|
|
@@ -15,7 +15,7 @@ export declare const createToolTimelineBuilder: (toolRenderers: ToolRenderersMap
|
|
|
15
15
|
items: (import('../components/timeline').Item | {
|
|
16
16
|
indicator: {
|
|
17
17
|
readonly type: "icon";
|
|
18
|
-
readonly icon: "search" | "dot" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "
|
|
18
|
+
readonly icon: "search" | "dot" | "file" | "shell" | "danger" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo" | "terminal";
|
|
19
19
|
};
|
|
20
20
|
title: TitleSegment[];
|
|
21
21
|
blocks: Block[];
|
|
@@ -4,7 +4,9 @@ export declare const createDefaultToolRenderers: () => {
|
|
|
4
4
|
edit: import('./types').ToolRenderer;
|
|
5
5
|
glob: import('./types').ToolRenderer;
|
|
6
6
|
grep: import('./types').ToolRenderer;
|
|
7
|
+
question: import('./types').ToolRenderer;
|
|
7
8
|
read: import('./types').ToolRenderer;
|
|
8
9
|
skill: import('./types').ToolRenderer;
|
|
10
|
+
todo_write: import('./types').ToolRenderer;
|
|
9
11
|
todowrite: import('./types').ToolRenderer;
|
|
10
12
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ToolPart } from '../agent-types';
|
|
2
|
+
import { Block, Item, TitleSegment } from '../components/timeline';
|
|
3
|
+
import { ToolRenderer } from './types';
|
|
4
|
+
type QuestionRendererDependencies = {
|
|
5
|
+
buildBaseTitle: (invocation: ToolPart, detail?: string, labelOverride?: string) => TitleSegment[];
|
|
6
|
+
buildIndicator: (invocation: ToolPart) => Item["indicator"];
|
|
7
|
+
prependErrorBlock: (invocation: ToolPart, blocks: Block[]) => Block[];
|
|
8
|
+
};
|
|
9
|
+
export declare const createQuestionRenderer: (deps: QuestionRendererDependencies) => ToolRenderer;
|
|
10
|
+
export {};
|
|
@@ -15,7 +15,7 @@ export declare const getStateLabel: (invocation: ToolPart) => string | null;
|
|
|
15
15
|
export declare const isErrorState: (invocation: ToolPart) => boolean;
|
|
16
16
|
export declare const buildIndicator: (invocation: ToolPart) => {
|
|
17
17
|
readonly type: "icon";
|
|
18
|
-
readonly icon: "search" | "dot" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "
|
|
18
|
+
readonly icon: "search" | "dot" | "file" | "shell" | "danger" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo" | "terminal";
|
|
19
19
|
};
|
|
20
20
|
export declare const buildBaseTitle: (invocation: ToolPart, detail?: string, labelOverride?: string) => TitleSegment[];
|
|
21
21
|
export declare const getInputObject: (invocation: ToolPart) => Record<string, unknown> | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ToolPart } from '../agent-types';
|
|
2
|
+
import { Block, Item, TitleSegment } from '../components/timeline';
|
|
3
|
+
import { ToolRenderer } from './types';
|
|
4
|
+
type TodowriteRendererDependencies = {
|
|
5
|
+
buildBaseTitle: (invocation: ToolPart, detail?: string, labelOverride?: string) => TitleSegment[];
|
|
6
|
+
buildIndicator: (invocation: ToolPart) => Item["indicator"];
|
|
7
|
+
prependErrorBlock: (invocation: ToolPart, blocks: Block[]) => Block[];
|
|
8
|
+
};
|
|
9
|
+
export declare const createTodowriteRenderer: (deps: TodowriteRendererDependencies) => ToolRenderer;
|
|
10
|
+
export {};
|
|
@@ -25,6 +25,8 @@ declare const iconMap: {
|
|
|
25
25
|
readonly search: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
26
26
|
readonly browser: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
27
27
|
readonly file: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
28
|
+
readonly question: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
29
|
+
readonly todo: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
28
30
|
readonly terminal: import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
29
31
|
};
|
|
30
32
|
export type IconName = keyof typeof iconMap;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BoxProps, TextProps } from '@chakra-ui/react';
|
|
2
2
|
export interface ContentPlaceholderProps extends BoxProps {
|
|
3
3
|
}
|
|
4
|
+
export declare const contentPlaceholderBackgroundImage = "url(\"data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.2' fillRule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E\")";
|
|
4
5
|
export declare const ContentPlaceholder: (props: ContentPlaceholderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export declare const Label: (props: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StackProps } from '@chakra-ui/react';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export type HeaderVariant = "main" | "narrow" | "input";
|
|
4
|
+
export interface HeaderProps extends Omit<StackProps, "variant"> {
|
|
5
|
+
variant?: HeaderVariant;
|
|
6
|
+
}
|
|
7
|
+
export declare const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListRowAction } from './list-row.types';
|
|
2
|
+
interface RowActionsProps {
|
|
3
|
+
actions: ListRowAction[];
|
|
4
|
+
context: {
|
|
5
|
+
sectionId?: string;
|
|
6
|
+
nodeId?: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export declare const RowActions: (props: RowActionsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { chakra, IconProps } from '@chakra-ui/react';
|
|
2
|
+
import { ComponentPropsWithoutRef, ComponentType, DragEvent as ReactDragEvent, MouseEvent as ReactMouseEvent, ReactNode, PointerEvent as ReactPointerEvent } from 'react';
|
|
3
|
+
export interface ListRowNavigationIntent {
|
|
4
|
+
id?: string;
|
|
5
|
+
payload?: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface ListRowActionContext {
|
|
8
|
+
sectionId?: string;
|
|
9
|
+
nodeId?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ListRowActionMenuItem {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
icon?: ReactNode | ComponentType<{
|
|
16
|
+
size?: number | string;
|
|
17
|
+
}>;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
onAction?: () => void;
|
|
20
|
+
}
|
|
21
|
+
export interface ListRowAction {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
icon?: ReactNode;
|
|
25
|
+
searchPlaceholder?: string;
|
|
26
|
+
emptyMenuLabel?: string;
|
|
27
|
+
menuItems?: ListRowActionMenuItem[];
|
|
28
|
+
onAction?: (context: ListRowActionContext) => void;
|
|
29
|
+
}
|
|
30
|
+
export type ListRowVariant = "default" | "compact" | "tree";
|
|
31
|
+
export type ListRowTone = "default" | "danger";
|
|
32
|
+
export interface ListRowItem {
|
|
33
|
+
id?: string;
|
|
34
|
+
label: ReactNode;
|
|
35
|
+
description?: ReactNode;
|
|
36
|
+
icon?: ReactNode;
|
|
37
|
+
iconColor?: IconProps["color"];
|
|
38
|
+
indicator?: {
|
|
39
|
+
icon: ReactNode;
|
|
40
|
+
color?: IconProps["color"];
|
|
41
|
+
tooltip?: string | null;
|
|
42
|
+
};
|
|
43
|
+
/** Custom content rendered on the right, before any hover actions. Use for Kbd shortcuts, counts, or badges. */
|
|
44
|
+
endContent?: ReactNode;
|
|
45
|
+
/** Tooltip shown on hover. Can be a string or ReactNode (e.g. Kbd shortcut hint). */
|
|
46
|
+
tooltip?: ReactNode;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
/** Force chevron rendering even when children is empty (e.g. lazy-loaded folders). */
|
|
49
|
+
isContainer?: boolean;
|
|
50
|
+
isNavigable?: boolean;
|
|
51
|
+
href?: string;
|
|
52
|
+
navigationIntent?: ListRowNavigationIntent;
|
|
53
|
+
onActivate?: () => void;
|
|
54
|
+
contextMenuItems?: ListRowActionMenuItem[];
|
|
55
|
+
actions?: ListRowAction[];
|
|
56
|
+
children?: ListRowItem[];
|
|
57
|
+
}
|
|
58
|
+
type ListRowRootProps = ComponentPropsWithoutRef<typeof chakra.div>;
|
|
59
|
+
export interface ListRowProps extends ListRowItem, Omit<ListRowRootProps, "as" | "asChild" | "children" | "draggable" | "onClick" | "onDragEnd" | "onDragOver" | "onDragStart" | "onDrop" | "onPointerMove" | keyof ListRowItem> {
|
|
60
|
+
depth?: number;
|
|
61
|
+
isSelected?: boolean;
|
|
62
|
+
isExpanded?: boolean;
|
|
63
|
+
showExpandToggle?: boolean;
|
|
64
|
+
variant?: ListRowVariant;
|
|
65
|
+
tone?: ListRowTone;
|
|
66
|
+
/** Wrap content into a single child element. Used for `<Menu.Item asChild><ListRow asChild>…</ListRow></Menu.Item>` and link components. */
|
|
67
|
+
asChild?: boolean;
|
|
68
|
+
onToggleExpand?: () => void;
|
|
69
|
+
onClick?: (event: ReactMouseEvent<HTMLElement>) => void;
|
|
70
|
+
onPointerMove?: (event: ReactPointerEvent<HTMLElement>) => void;
|
|
71
|
+
draggable?: boolean;
|
|
72
|
+
onDragStart?: (event: ReactDragEvent<HTMLElement>) => void;
|
|
73
|
+
onDragOver?: (event: ReactDragEvent<HTMLElement>) => void;
|
|
74
|
+
onDragEnd?: (event: ReactDragEvent<HTMLElement>) => void;
|
|
75
|
+
onDrop?: (event: ReactDragEvent<HTMLElement>) => void;
|
|
76
|
+
}
|
|
77
|
+
export interface RowContentProps {
|
|
78
|
+
item: ListRowItem;
|
|
79
|
+
isExpanded: boolean;
|
|
80
|
+
showChevron: boolean;
|
|
81
|
+
isDisabled: boolean;
|
|
82
|
+
variant: ListRowVariant;
|
|
83
|
+
tone: ListRowTone;
|
|
84
|
+
}
|
|
85
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ListRowAction } from './list-row.types';
|
|
2
2
|
interface SearchableActionMenuProps {
|
|
3
|
-
action:
|
|
3
|
+
action: ListRowAction;
|
|
4
4
|
}
|
|
5
5
|
export declare const SearchableActionMenu: (props: SearchableActionMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PANEL_HEADER_HEIGHT = "2.
|
|
1
|
+
export declare const PANEL_HEADER_HEIGHT = "2.5rem";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RadioGroup as ChakraRadioGroup } from '@chakra-ui/react';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface RadioProps extends ChakraRadioGroup.ItemProps {
|
|
4
|
+
rootRef?: React.RefObject<HTMLDivElement | null>;
|
|
5
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
6
|
+
}
|
|
7
|
+
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
8
|
+
export declare const RadioGroup: React.ForwardRefExoticComponent<ChakraRadioGroup.RootProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { Menu } from '@chakra-ui/react';
|
|
2
2
|
import { ComponentProps, ReactNode } from 'react';
|
|
3
|
-
import { MenuItem } from './menu-item';
|
|
4
3
|
type MenuRootProps = ComponentProps<typeof Menu.Root>;
|
|
5
4
|
export interface ResourceContextAction {
|
|
6
5
|
key: string;
|
|
7
6
|
label: string;
|
|
8
7
|
onClick: () => void;
|
|
9
8
|
isDisabled?: boolean;
|
|
10
|
-
icon?:
|
|
9
|
+
icon?: ReactNode;
|
|
11
10
|
}
|
|
12
11
|
interface ResourceContextMenuProps {
|
|
13
12
|
actions: ResourceContextAction[];
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
interface SidebarProjectMenuProps {
|
|
2
2
|
name: string;
|
|
3
3
|
projectsLabel: string;
|
|
4
|
-
themeModeLabel: string;
|
|
5
|
-
isDarkMode: boolean;
|
|
6
4
|
onSelectProjects: () => void;
|
|
7
|
-
onToggleThemePreference: () => void;
|
|
8
5
|
}
|
|
9
6
|
export declare const SidebarProjectMenu: (props: SidebarProjectMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
7
|
export {};
|