@pstdio/ui 0.4.0 → 0.5.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.
Files changed (134) hide show
  1. package/dist/MermaidComponent-x3aKzNXm.js +124 -0
  2. package/dist/MermaidComponent-x3aKzNXm.js.map +1 -0
  3. package/dist/chat-ui.js +1364 -795
  4. package/dist/chat-ui.js.map +1 -1
  5. package/dist/components/chat-ui/agent-types.d.ts +4 -0
  6. package/dist/components/chat-ui/components/chat-input-actions.d.ts +10 -0
  7. package/dist/components/chat-ui/components/chat-input-question-prompt.d.ts +33 -0
  8. package/dist/components/chat-ui/components/chat-input.d.ts +3 -1
  9. package/dist/components/chat-ui/components/chat-panel-sticky-user-message.d.ts +9 -0
  10. package/dist/components/chat-ui/components/chat-panel.d.ts +4 -1
  11. package/dist/components/chat-ui/components/message-parts-renderer.d.ts +1 -0
  12. package/dist/components/chat-ui/components/timeline-tool-blocks.d.ts +14 -0
  13. package/dist/components/chat-ui/components/timeline.d.ts +22 -0
  14. package/dist/components/chat-ui/components/tool-invocation-timeline.d.ts +2 -1
  15. package/dist/components/chat-ui/index.d.ts +1 -0
  16. package/dist/components/chat-ui/tool-rendering/apply-patch-renderer.d.ts +2 -0
  17. package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -2
  18. package/dist/components/chat-ui/tool-rendering/default-renderers.d.ts +10 -7
  19. package/dist/components/chat-ui/tool-rendering/edit-renderer.d.ts +2 -0
  20. package/dist/components/chat-ui/tool-rendering/question-renderer.d.ts +10 -0
  21. package/dist/components/chat-ui/tool-rendering/shared.d.ts +52 -0
  22. package/dist/components/chat-ui/tool-rendering/standard-renderers.d.ts +6 -0
  23. package/dist/components/chat-ui/tool-rendering/todowrite-renderer.d.ts +10 -0
  24. package/dist/components/chat-ui/utils/get-icon.d.ts +2 -0
  25. package/dist/components/chat-ui/utils/tool-name.d.ts +2 -0
  26. package/dist/components/menu-item.d.ts +2 -1
  27. package/dist/components/radio.d.ts +8 -0
  28. package/dist/components/resource-context-menu.d.ts +20 -0
  29. package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +2 -1
  30. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockActionsPlugin.d.ts +4 -0
  31. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +2 -0
  32. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeHighlightingPlugin.d.ts +1 -0
  33. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/should-show-floating-toolbar.d.ts +11 -0
  34. package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidComponent.d.ts +6 -0
  35. package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +23 -0
  36. package/dist/components/rich-text/shared/plugins/MermaidPlugin/index.d.ts +1 -0
  37. package/dist/components/rich-text/utils/markdown.d.ts +1 -0
  38. package/dist/components/session-indicator.d.ts +1 -1
  39. package/dist/components/sidebar-tree/sidebar-tree.types.d.ts +5 -1
  40. package/dist/components/tickets/tag-badge.d.ts +10 -0
  41. package/dist/components/tickets/tag-option-icon.d.ts +2 -0
  42. package/dist/components/tickets/ticket-board.d.ts +8 -2
  43. package/dist/components/tickets/ticket-card.d.ts +10 -0
  44. package/dist/components/tickets/ticket-grouping.d.ts +2 -2
  45. package/dist/components/tickets/ticket-list.d.ts +9 -1
  46. package/dist/components/tickets/tickets-workspace.d.ts +11 -3
  47. package/dist/components/tickets/types.d.ts +22 -5
  48. package/dist/components/tickets/workspace-helpers.d.ts +18 -0
  49. package/dist/get-file-type-icon-Bwqf1WXA.js +101 -0
  50. package/dist/get-file-type-icon-Bwqf1WXA.js.map +1 -0
  51. package/dist/index.d.ts +6 -2
  52. package/dist/index.js +1886 -1583
  53. package/dist/index.js.map +1 -1
  54. package/dist/radio-C42qncrD.js +236 -0
  55. package/dist/radio-C42qncrD.js.map +1 -0
  56. package/dist/rich-message-CoXTd5kw.js +1512 -0
  57. package/dist/rich-message-CoXTd5kw.js.map +1 -0
  58. package/dist/rich-text.js +414 -255
  59. package/dist/rich-text.js.map +1 -1
  60. package/dist/style.css +1 -1
  61. package/dist/theme/recipes/button.d.ts +6 -0
  62. package/dist/{theme-D0VvFB1Y.js → theme-BLGUwVOD.js} +7 -1
  63. package/dist/theme-BLGUwVOD.js.map +1 -0
  64. package/dist/theme.js +1 -1
  65. package/package.json +3 -1
  66. package/dist/components/attached-panel.utils.test.d.ts +0 -1
  67. package/dist/components/breadcrumb.stories.d.ts +0 -25
  68. package/dist/components/button.stories.d.ts +0 -18
  69. package/dist/components/chat-ui/components/ai-conversation.stories.d.ts +0 -6
  70. package/dist/components/chat-ui/components/ai-message.stories.d.ts +0 -6
  71. package/dist/components/chat-ui/components/ai-response.stories.d.ts +0 -7
  72. package/dist/components/chat-ui/components/attachment-list.stories.d.ts +0 -6
  73. package/dist/components/chat-ui/components/chat-input.stories.d.ts +0 -7
  74. package/dist/components/chat-ui/components/chat-panel-alerts.stories.d.ts +0 -9
  75. package/dist/components/chat-ui/components/chat-panel.stories.d.ts +0 -10
  76. package/dist/components/chat-ui/components/message-parts-renderer.stories.d.ts +0 -9
  77. package/dist/components/chat-ui/components/model-swap-separator.stories.d.ts +0 -6
  78. package/dist/components/chat-ui/components/tool-invocation-timeline.stories.d.ts +0 -6
  79. package/dist/components/chat-ui/components/workspace-hub.stories.d.ts +0 -6
  80. package/dist/components/checkbox.stories.d.ts +0 -15
  81. package/dist/components/column-file-browser.stories.d.ts +0 -15
  82. package/dist/components/data-table/data-table.stories.d.ts +0 -33
  83. package/dist/components/delete-confirmation-modal.stories.d.ts +0 -11
  84. package/dist/components/diff-bubble.stories.d.ts +0 -13
  85. package/dist/components/diff-drawer.stories.d.ts +0 -8
  86. package/dist/components/diff-view-adapter.test.d.ts +0 -1
  87. package/dist/components/drawer-inline.stories.d.ts +0 -8
  88. package/dist/components/empty-state.stories.d.ts +0 -34
  89. package/dist/components/file-selector.stories.d.ts +0 -17
  90. package/dist/components/folder-picker-dialog.stories.d.ts +0 -11
  91. package/dist/components/info-card.stories.d.ts +0 -41
  92. package/dist/components/item-section.stories.d.ts +0 -17
  93. package/dist/components/layout.stories.d.ts +0 -11
  94. package/dist/components/menu-item.stories.d.ts +0 -72
  95. package/dist/components/open-source-notices-screen.stories.d.ts +0 -12
  96. package/dist/components/param-editor-horizontal.stories.d.ts +0 -19
  97. package/dist/components/param-editor.stories.d.ts +0 -24
  98. package/dist/components/properties.stories.d.ts +0 -17
  99. package/dist/components/resource-badge.stories.d.ts +0 -7
  100. package/dist/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.d.ts +0 -9
  101. package/dist/components/rich-text/markdown-editor/markdown-editor.stories.d.ts +0 -7
  102. package/dist/components/rich-text/prompt-input/prompt-input.stories.d.ts +0 -8
  103. package/dist/components/rich-text/rich-message/rich-message.stories.d.ts +0 -6
  104. package/dist/components/rich-text/shared/nodes/DataTableNode.stories.d.ts +0 -7
  105. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeNode.d.ts +0 -21
  106. package/dist/components/rich-text/shared/plugins/CodePlugin/CodeNode.test.d.ts +0 -1
  107. package/dist/components/rich-text/shared/transformers/markdown-transformers.test.d.ts +0 -1
  108. package/dist/components/scroll-area.stories.d.ts +0 -7
  109. package/dist/components/searchable-menu.stories.d.ts +0 -8
  110. package/dist/components/session-indicator.stories.d.ts +0 -12
  111. package/dist/components/sidebar/sidebar.store.test.d.ts +0 -1
  112. package/dist/components/sidebar/sidebar.stories.d.ts +0 -11
  113. package/dist/components/sidebar-tree/sidebar-tree-searchable-action-menu.stories.d.ts +0 -6
  114. package/dist/components/sidebar-tree/sidebar-tree.stories.d.ts +0 -13
  115. package/dist/components/slider.stories.d.ts +0 -15
  116. package/dist/components/style-guide.stories.d.ts +0 -23
  117. package/dist/components/switch.stories.d.ts +0 -16
  118. package/dist/components/tickets/display-menu.stories.d.ts +0 -6
  119. package/dist/components/tickets/filter-menu.stories.d.ts +0 -6
  120. package/dist/components/tickets/ticket-board.stories.d.ts +0 -5
  121. package/dist/components/tickets/ticket-card.stories.d.ts +0 -18
  122. package/dist/components/tickets/ticket-grouping.test.d.ts +0 -1
  123. package/dist/components/tickets/ticket-list.stories.d.ts +0 -10
  124. package/dist/components/tickets/tickets-workspace.stories.d.ts +0 -10
  125. package/dist/components/tickets/use-workspace-store.test.d.ts +0 -1
  126. package/dist/components/toaster.stories.d.ts +0 -11
  127. package/dist/components/workspace-badge.stories.d.ts +0 -13
  128. package/dist/empty-state-yGspgiPl.js +0 -185
  129. package/dist/empty-state-yGspgiPl.js.map +0 -1
  130. package/dist/get-file-type-icon-CirIyuE8.js +0 -92
  131. package/dist/get-file-type-icon-CirIyuE8.js.map +0 -1
  132. package/dist/rich-message-Bad4GxH2.js +0 -1423
  133. package/dist/rich-message-Bad4GxH2.js.map +0 -1
  134. package/dist/theme-D0VvFB1Y.js.map +0 -1
@@ -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;
@@ -0,0 +1,10 @@
1
+ interface ChatInputActionState {
2
+ canInterrupt: boolean;
3
+ isDisabled: boolean;
4
+ streaming: boolean;
5
+ text: string;
6
+ }
7
+ export type ChatInputAction = "interrupt" | "none" | "submit";
8
+ export declare const resolveChatInputKeyboardAction: (state: ChatInputActionState) => ChatInputAction;
9
+ export declare const resolveChatInputButtonAction: (state: ChatInputActionState) => ChatInputAction;
10
+ export {};
@@ -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,7 @@ interface ChatInputProps {
12
13
  attachmentList?: ReactNode;
13
14
  actions?: ReactNode;
14
15
  attachedToTop?: boolean;
16
+ questionPrompt?: ChatInputQuestionPrompt;
15
17
  }
16
18
  export declare const ChatInput: (props: ChatInputProps) => import("react/jsx-runtime").JSX.Element;
17
19
  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,8 @@ 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;
14
+ onInterrupt?: () => void;
13
15
  onChatInputChange?: (text: string) => void;
14
16
  actions?: ReactNode;
15
17
  repoMenu?: ReactNode;
@@ -20,6 +22,7 @@ interface ChatPanelProps {
20
22
  workspaceHub?: ReactNode;
21
23
  workspaceInitializing?: boolean;
22
24
  inputDisabled?: boolean;
25
+ chatInputQuestionPrompt?: ChatInputQuestionPrompt;
23
26
  }
24
27
  export declare const ChatPanel: (props: ChatPanelProps) => import("react/jsx-runtime").JSX.Element;
25
28
  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,2 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const renderApplyPatch: ToolRenderer;
@@ -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" | "danger" | "browser" | "terminal";
8
+ readonly icon: "search" | "dot" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "danger" | "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" | "danger" | "browser" | "terminal";
18
+ readonly icon: "search" | "dot" | "file" | "shell" | "patch" | "ls" | "read_file" | "write_file" | "delete_file" | "upload_files" | "download_file" | "move_file" | "danger" | "browser" | "question" | "todo" | "terminal";
19
19
  };
20
20
  title: TitleSegment[];
21
21
  blocks: Block[];
@@ -1,9 +1,12 @@
1
- import { ToolRenderer } from './types';
2
1
  export declare const createDefaultToolRenderers: () => {
3
- apply_patch: ToolRenderer;
4
- read: ToolRenderer;
5
- bash: ToolRenderer;
6
- grep: ToolRenderer;
7
- glob: ToolRenderer;
8
- skill: ToolRenderer;
2
+ apply_patch: import('./types').ToolRenderer;
3
+ bash: import('./types').ToolRenderer;
4
+ edit: import('./types').ToolRenderer;
5
+ glob: import('./types').ToolRenderer;
6
+ grep: import('./types').ToolRenderer;
7
+ question: import('./types').ToolRenderer;
8
+ read: import('./types').ToolRenderer;
9
+ skill: import('./types').ToolRenderer;
10
+ todo_write: import('./types').ToolRenderer;
11
+ todowrite: import('./types').ToolRenderer;
9
12
  };
@@ -0,0 +1,2 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const renderEdit: ToolRenderer;
@@ -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 {};
@@ -0,0 +1,52 @@
1
+ import { ToolPart } from '../agent-types';
2
+ import { Block, TitleSegment } from '../components/timeline';
3
+ export type ApplyPatchMetadataFile = {
4
+ filePath: string;
5
+ additions: number;
6
+ deletions: number;
7
+ diff?: string;
8
+ before?: string;
9
+ after?: string;
10
+ };
11
+ export declare const normalizeToolType: (value: string) => string;
12
+ export declare const getToolType: (invocation: ToolPart) => string;
13
+ export declare const getToolLabel: (value: string) => string;
14
+ export declare const getStateLabel: (invocation: ToolPart) => string | null;
15
+ export declare const isErrorState: (invocation: ToolPart) => boolean;
16
+ export declare const buildIndicator: (invocation: ToolPart) => {
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" | "danger" | "browser" | "question" | "todo" | "terminal";
19
+ };
20
+ export declare const buildBaseTitle: (invocation: ToolPart, detail?: string, labelOverride?: string) => TitleSegment[];
21
+ export declare const getInputObject: (invocation: ToolPart) => Record<string, unknown> | null;
22
+ export declare const getOutputObject: (invocation: ToolPart) => Record<string, unknown> | null;
23
+ export declare const getStringValue: (value: unknown) => string | null;
24
+ export declare const getObjectValue: (value: unknown) => Record<string, unknown> | null;
25
+ export declare const getStateObject: (invocation: ToolPart, key: string) => Record<string, unknown> | null;
26
+ export declare const getApplyPatchMetadataFiles: (invocation: ToolPart) => ApplyPatchMetadataFile[];
27
+ export declare const getApplyPatchDiffText: (invocation: ToolPart) => string | null;
28
+ export declare const buildApplyPatchMetadataTitleSegments: (files: ApplyPatchMetadataFile[]) => TitleSegment[];
29
+ export declare const getApplyPatchMetadataReferences: (files: ApplyPatchMetadataFile[]) => string[];
30
+ export declare const getOutputText: (invocation: ToolPart) => string | null;
31
+ export declare const parseSkillContentBlock: (value: string) => {
32
+ skillName: string | undefined;
33
+ content: string;
34
+ } | null;
35
+ export declare const getSkillName: (invocation: ToolPart) => string | undefined;
36
+ export declare const buildFileLinkSegment: (filePath: string) => TitleSegment;
37
+ export declare const prependErrorBlock: (invocation: ToolPart, blocks: Block[]) => Block[];
38
+ export declare const getDiffBlocks: (diffText?: string | null) => {
39
+ type: "diff";
40
+ language: string;
41
+ original: string;
42
+ modified: string;
43
+ sideBySide: false;
44
+ }[];
45
+ export declare const getDiffTitleSegments: (diffText?: string | null) => {
46
+ kind: "diff";
47
+ fileName: string;
48
+ filePath: string;
49
+ additions: number;
50
+ deletions: number;
51
+ }[];
52
+ export declare const getDiffReferences: (diffText?: string | null) => string[];
@@ -0,0 +1,6 @@
1
+ import { ToolRenderer } from './types';
2
+ export declare const renderRead: ToolRenderer;
3
+ export declare const renderBash: ToolRenderer;
4
+ export declare const renderGrep: ToolRenderer;
5
+ export declare const renderGlob: ToolRenderer;
6
+ export declare const renderSkill: ToolRenderer;
@@ -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;
@@ -0,0 +1,2 @@
1
+ export declare const normalizeToolName: (value: string) => string;
2
+ export declare const getToolNameLookupKeys: (value: string) => string[];
@@ -1,7 +1,7 @@
1
1
  import { IconProps, Badge, MenuItem as ChakraMenuItem, Icon } from '@chakra-ui/react';
2
2
  import { ComponentProps, ReactNode } from 'react';
3
3
  type ChakraMenuItemProps = ComponentProps<typeof ChakraMenuItem>;
4
- type MenuItemIcon = ComponentProps<typeof Icon>["as"];
4
+ type MenuItemIcon = ComponentProps<typeof Icon>["as"] | ReactNode;
5
5
  type MenuItemIconColor = IconProps["color"];
6
6
  type MenuItemTagColor = ComponentProps<typeof Badge>["colorPalette"];
7
7
  type MenuItemTagVariant = ComponentProps<typeof Badge>["variant"];
@@ -15,6 +15,7 @@ export interface MenuItemProps {
15
15
  isSelected?: boolean;
16
16
  primaryLabel: string;
17
17
  secondaryLabel?: string;
18
+ shortcutLabel?: ReactNode;
18
19
  tooltipLabel?: ReactNode;
19
20
  leftIcon?: MenuItemIcon | null;
20
21
  rightIcon?: MenuItemIcon | null;
@@ -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>>;
@@ -0,0 +1,20 @@
1
+ import { Menu } from '@chakra-ui/react';
2
+ import { ComponentProps, ReactNode } from 'react';
3
+ import { MenuItem } from './menu-item';
4
+ type MenuRootProps = ComponentProps<typeof Menu.Root>;
5
+ export interface ResourceContextAction {
6
+ key: string;
7
+ label: string;
8
+ onClick: () => void;
9
+ isDisabled?: boolean;
10
+ icon?: ComponentProps<typeof MenuItem>["leftIcon"];
11
+ }
12
+ interface ResourceContextMenuProps {
13
+ actions: ResourceContextAction[];
14
+ children: ReactNode;
15
+ contentMinWidth?: string;
16
+ contentBackground?: string;
17
+ positioning?: MenuRootProps["positioning"];
18
+ }
19
+ export declare const ResourceContextMenu: (props: ResourceContextMenuProps) => import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -1,4 +1,4 @@
1
- import { DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedTextNode, Spread, TextNode } from 'lexical';
1
+ import { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, LexicalNode, NodeKey, SerializedTextNode, Spread, TextNode } from 'lexical';
2
2
  type SerializedReferenceNode = Spread<{
3
3
  referenceId: string;
4
4
  name: string;
@@ -16,6 +16,7 @@ export declare class ReferenceNode extends TextNode {
16
16
  createDOM(config: EditorConfig): HTMLElement;
17
17
  updateDOM(prevNode: ReferenceNode, dom: HTMLElement): boolean;
18
18
  exportDOM(_editor: LexicalEditor): DOMExportOutput;
19
+ static importDOM(): DOMConversionMap | null;
19
20
  static importJSON(serializedNode: SerializedReferenceNode): ReferenceNode;
20
21
  exportJSON(): SerializedReferenceNode;
21
22
  getTextContent(): string;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ export declare function CodeBlockActionsPlugin({ anchorElem }: {
3
+ anchorElem?: HTMLElement | null;
4
+ }): React.JSX.Element | null;
@@ -1 +1,3 @@
1
+ import { CodeNode } from '@lexical/code';
2
+ export declare function replaceCodeNodeWithMermaidNode(node: CodeNode): boolean;
1
3
  export declare function ImportCodeBlocksPlugin(): null;
@@ -0,0 +1 @@
1
+ export declare function CodeHighlightingPlugin(): null;
@@ -0,0 +1,11 @@
1
+ interface ShouldShowFloatingToolbarParams {
2
+ hasSelection: boolean;
3
+ isRangeSelection: boolean;
4
+ isCollapsed: boolean;
5
+ hasNativeSelection: boolean;
6
+ hasNativeRange: boolean;
7
+ isAnchorInsideEditor: boolean;
8
+ isEditorEditable: boolean;
9
+ }
10
+ export declare function shouldShowFloatingToolbar(params: ShouldShowFloatingToolbarParams): boolean;
11
+ export {};
@@ -0,0 +1,6 @@
1
+ interface MermaidComponentProps {
2
+ code: string;
3
+ nodeKey: string;
4
+ }
5
+ export default function MermaidComponent(props: MermaidComponentProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,23 @@
1
+ import { LexicalNode, NodeKey, SerializedLexicalNode, DecoratorNode } from 'lexical';
2
+ import { ReactNode } from 'react';
3
+ export interface SerializedMermaidNode extends SerializedLexicalNode {
4
+ type: "mermaid";
5
+ code: string;
6
+ version: 1;
7
+ }
8
+ export declare class MermaidNode extends DecoratorNode<ReactNode> {
9
+ __code: string;
10
+ static getType(): string;
11
+ static clone(node: MermaidNode): MermaidNode;
12
+ constructor(code: string, key?: NodeKey);
13
+ createDOM(): HTMLDivElement;
14
+ updateDOM(): boolean;
15
+ static importJSON(serializedNode: SerializedMermaidNode): MermaidNode;
16
+ exportJSON(): SerializedMermaidNode;
17
+ getTextContent(): string;
18
+ getCode(): string;
19
+ setCode(code: string): void;
20
+ decorate(): import("react/jsx-runtime").JSX.Element;
21
+ }
22
+ export declare function $createMermaidNode(code?: string): MermaidNode;
23
+ export declare function $isMermaidNode(node: LexicalNode | null | undefined): node is MermaidNode;
@@ -0,0 +1 @@
1
+ export { $createMermaidNode, $isMermaidNode, MermaidNode } from './MermaidNode';
@@ -1,3 +1,4 @@
1
+ export declare function normalizeMarkdownListIndentation(content: string): string;
1
2
  export declare function splitFrontmatter(content: string): {
2
3
  frontmatter: string;
3
4
  body: string;
@@ -1,6 +1,6 @@
1
1
  import { Icon } from '@chakra-ui/react';
2
2
  import { ComponentProps } from 'react';
3
- export type SessionCompletionStatus = "in_progress" | "awaiting_input" | "completed" | "failed" | "disconnected";
3
+ export type SessionCompletionStatus = "in_progress" | "awaiting_input" | "completed" | "failed" | "cancelled" | "disconnected";
4
4
  export declare const resolveSessionIndicatorIcon: (status: SessionCompletionStatus | undefined) => import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
5
5
  export declare const resolveSessionIndicatorColor: (status: SessionCompletionStatus | undefined) => "fg.muted" | "fg.error" | "fg.warning" | "fg.success";
6
6
  interface SessionIndicatorProps {
@@ -12,7 +12,10 @@ export interface SidebarActionMenuItem {
12
12
  id: string;
13
13
  label: string;
14
14
  description?: string;
15
- icon?: ReactNode;
15
+ icon?: ReactNode | ComponentType<{
16
+ size?: number | string;
17
+ }>;
18
+ disabled?: boolean;
16
19
  onAction?: () => void;
17
20
  }
18
21
  export interface SidebarAction {
@@ -40,6 +43,7 @@ export interface SidebarNode {
40
43
  /** URL for the node. When provided with a linkComponent, the row renders as an anchor for cmd+click support. */
41
44
  href?: string;
42
45
  navigationIntent?: SidebarNavigationIntent;
46
+ contextMenuItems?: SidebarActionMenuItem[];
43
47
  actions?: SidebarAction[];
44
48
  children?: SidebarNode[];
45
49
  }
@@ -0,0 +1,10 @@
1
+ import { WorkspaceTagOption } from './types';
2
+ interface TagBadgeProps {
3
+ value: string | null;
4
+ label?: string;
5
+ color?: string;
6
+ options: WorkspaceTagOption[];
7
+ onValueChange?: (newValue: string) => void;
8
+ }
9
+ export declare const TagBadge: (props: TagBadgeProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import { LucideIcon } from 'lucide-react';
2
+ export declare const getTagOptionIcon: (icon: string | null | undefined) => LucideIcon | null;
@@ -1,9 +1,11 @@
1
1
  import { ComponentProps, ComponentType } from 'react';
2
+ import { ResourceContextAction } from '../resource-context-menu';
2
3
  import { TicketCard } from './ticket-card';
3
4
  type TicketCardProps = ComponentProps<typeof TicketCard>;
4
5
  export interface TicketBoardItem {
5
6
  id: string;
6
7
  cardProps: Omit<TicketCardProps, "draggable" | "onDragStart" | "onDragEnd" | "isSelected">;
8
+ contextMenuActions?: ResourceContextAction[];
7
9
  }
8
10
  export interface TicketBoardColumnAction {
9
11
  id: string;
@@ -31,8 +33,12 @@ export interface TicketBoardColumn {
31
33
  interface TicketBoardProps {
32
34
  columns: TicketBoardColumn[];
33
35
  selectedItemId?: string | null;
34
- onMoveItem?: (itemId: string, targetColumnId: string) => void;
35
- onMoveToGroup?: (itemId: string, targetGroupKey: string) => void;
36
+ onMoveItem?: (itemId: string, targetColumnId: string, context?: {
37
+ beforeItemId?: string;
38
+ }) => void;
39
+ onMoveToGroup?: (itemId: string, targetGroupKey: string, context?: {
40
+ beforeItemId?: string;
41
+ }) => void;
36
42
  onCreateStart?: (columnId: string) => void;
37
43
  onColumnAction?: (columnId: string, actionId: string) => Promise<void> | void;
38
44
  }
@@ -1,20 +1,30 @@
1
1
  import { DragEventHandler } from 'react';
2
2
  import { WorkspaceBadgeProps } from '../workspace-badge';
3
+ import { WorkspaceTagOption } from './types';
3
4
  export interface TicketCardBadge {
4
5
  label: string;
5
6
  color?: string;
6
7
  }
8
+ export interface TicketCardTagBadge {
9
+ tagName: string;
10
+ label: string;
11
+ value: string | null;
12
+ color?: string;
13
+ options: WorkspaceTagOption[];
14
+ }
7
15
  interface TicketCardProps {
8
16
  ticketId: string;
9
17
  parentPath?: string[];
10
18
  title: string;
11
19
  badges?: TicketCardBadge[];
20
+ tagBadges?: TicketCardTagBadge[];
12
21
  workspaceBadge?: WorkspaceBadgeProps;
13
22
  isSelected?: boolean;
14
23
  draggable?: boolean;
15
24
  onDragStart?: DragEventHandler<HTMLDivElement>;
16
25
  onDragEnd?: DragEventHandler<HTMLDivElement>;
17
26
  onClick?: () => void;
27
+ onTagChange?: (tagName: string, newValue: string) => void;
18
28
  }
19
29
  export declare const TicketCard: (props: TicketCardProps) => import("react/jsx-runtime").JSX.Element;
20
30
  export {};
@@ -1,4 +1,4 @@
1
- import { FilterCategory, FilterState, GroupingField, WorkspaceOrdering, WorkspaceTicket } from './types';
1
+ import { FilterCategory, FilterState, GroupingField, WorkspaceOrdering, WorkspaceTagDefinition, WorkspaceTicket } from './types';
2
2
  interface GroupingOptions {
3
3
  columnGrouping: GroupingField;
4
4
  rowGrouping: GroupingField;
@@ -15,7 +15,7 @@ interface TicketColumnGroup {
15
15
  tickets: WorkspaceTicket[];
16
16
  rows: TicketRowGroup[];
17
17
  }
18
- export declare const orderTickets: (tickets: WorkspaceTicket[], ordering: WorkspaceOrdering) => WorkspaceTicket[];
18
+ export declare const orderTickets: (tickets: WorkspaceTicket[], ordering: WorkspaceOrdering, tagDefinitions?: WorkspaceTagDefinition[]) => WorkspaceTicket[];
19
19
  export declare const groupTickets: (tickets: WorkspaceTicket[], options: GroupingOptions) => TicketColumnGroup[];
20
20
  export declare const filterTickets: (tickets: WorkspaceTicket[], filters: FilterState) => WorkspaceTicket[];
21
21
  export declare const countFilterValues: (tickets: WorkspaceTicket[], category: FilterCategory) => Record<string, number>;
@@ -1,23 +1,31 @@
1
1
  import { ComponentType, ReactNode } from 'react';
2
- import { TicketCardBadge } from './ticket-card';
2
+ import { ResourceContextAction } from '../resource-context-menu';
3
+ import { TicketCardBadge, TicketCardTagBadge } from './ticket-card';
3
4
  export interface TicketListItem {
4
5
  id: string;
5
6
  ticketId: string;
6
7
  title: string;
8
+ countBadge?: number;
7
9
  statusIcon?: ComponentType<{
8
10
  size?: number | string;
9
11
  }>;
10
12
  statusColor?: string;
11
13
  badges?: TicketCardBadge[];
14
+ tagBadges?: TicketCardTagBadge[];
12
15
  date?: string;
13
16
  assigneeIcon?: ReactNode;
14
17
  children?: TicketListItem[];
15
18
  onClick?: () => void;
19
+ onTagChange?: (tagName: string, newValue: string) => void;
20
+ contextMenuActions?: ResourceContextAction[];
21
+ draggable?: boolean;
22
+ onDropTicket?: (ticketId: string) => void;
16
23
  }
17
24
  interface TicketListProps {
18
25
  items: TicketListItem[];
19
26
  selectedItemId?: string | null;
20
27
  onItemClick?: (item: TicketListItem) => void;
21
28
  }
29
+ export declare const getTicketListIndentation: (depth: number) => string | undefined;
22
30
  export declare const TicketList: (props: TicketListProps) => import("react/jsx-runtime").JSX.Element;
23
31
  export {};