@parallelworks/ui 0.18.0 → 0.19.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/README.md +86 -6
- package/dist/ai/adapter/memoryStore.d.ts +8 -0
- package/dist/ai/adapter/mock/index.d.ts +2 -0
- package/dist/ai/adapter/mock/index.js +81 -0
- package/dist/ai/adapter/mock/mockAdapter.d.ts +4 -0
- package/dist/ai/adapter/openai/createOpenAIStream.d.ts +9 -0
- package/dist/ai/adapter/openai/errors.d.ts +3 -0
- package/dist/ai/adapter/openai/index.d.ts +6 -0
- package/dist/ai/adapter/openai/index.js +334 -0
- package/dist/ai/adapter/openai/openaiAdapter.d.ts +9 -0
- package/dist/ai/adapter/openai/responses.d.ts +4 -0
- package/dist/ai/adapter/openai/sse.d.ts +24 -0
- package/dist/ai/adapter/openai/wire.d.ts +40 -0
- package/dist/ai/adapter/types.d.ts +131 -0
- package/dist/ai/agent/classifier.d.ts +2 -0
- package/dist/ai/agent/diff.d.ts +35 -0
- package/dist/ai/agent/diffHighlight.d.ts +6 -0
- package/dist/ai/agent/index.d.ts +6 -0
- package/dist/ai/agent/permissions.d.ts +11 -0
- package/dist/ai/agent/toolfmt.d.ts +18 -0
- package/dist/ai/agent/transcript.d.ts +38 -0
- package/dist/ai/ai.css +325 -0
- package/dist/ai/components/AllocationSelector.d.ts +4 -0
- package/dist/ai/components/AttachmentManager.d.ts +1 -0
- package/dist/ai/components/AttachmentUpload.d.ts +24 -0
- package/dist/ai/components/BlockedGroupBanner.d.ts +1 -0
- package/dist/ai/components/BranchNavigator.d.ts +8 -0
- package/dist/ai/components/ChatEmptyState.d.ts +3 -0
- package/dist/ai/components/ChatInput.d.ts +45 -0
- package/dist/ai/components/ChatLayout.d.ts +5 -0
- package/dist/ai/components/ChatMessage.d.ts +24 -0
- package/dist/ai/components/ChatMessageList.d.ts +35 -0
- package/dist/ai/components/ChatSidebar.d.ts +5 -0
- package/dist/ai/components/ChatThread.d.ts +3 -0
- package/dist/ai/components/ComposerChrome.d.ts +18 -0
- package/dist/ai/components/ComposerFrame.d.ts +16 -0
- package/dist/ai/components/DragOverlay.d.ts +5 -0
- package/dist/ai/components/ModelSelector.d.ts +6 -0
- package/dist/ai/components/ShareDialog.d.ts +11 -0
- package/dist/ai/components/SlashMenu.d.ts +28 -0
- package/dist/ai/components/agent/ActivityLine.d.ts +21 -0
- package/dist/ai/components/agent/AgentMessageParts.d.ts +54 -0
- package/dist/ai/components/agent/PermissionPicker.d.ts +11 -0
- package/dist/ai/components/attachmentKeys.d.ts +4 -0
- package/dist/ai/core/ChatProvider.d.ts +66 -0
- package/dist/ai/core/KeyboardShortcutsProvider.d.ts +5 -0
- package/dist/ai/core/chatReducer.d.ts +114 -0
- package/dist/ai/core/config.d.ts +47 -0
- package/dist/ai/core/events.d.ts +1 -0
- package/dist/ai/core/exportConversation.d.ts +4 -0
- package/dist/ai/core/greeting.d.ts +3 -0
- package/dist/ai/core/parts.d.ts +11 -0
- package/dist/ai/core/useDragDrop.d.ts +14 -0
- package/dist/ai/core/useKeyboardShortcuts.d.ts +12 -0
- package/dist/ai/core/useSSEStream.d.ts +34 -0
- package/dist/ai/index.d.ts +40 -0
- package/dist/ai/index.js +6645 -0
- package/dist/ai/strings.d.ts +167 -0
- package/dist/ai/types.d.ts +236 -0
- package/dist/ai/ui/Avatar.d.ts +8 -0
- package/dist/ai/ui/Dropdown.d.ts +31 -0
- package/dist/ai/ui/Markdown.d.ts +8 -0
- package/dist/ai/ui/Notice.d.ts +21 -0
- package/dist/ai/ui/buttons.d.ts +1 -0
- package/dist/ai/ui/codeBreaks.d.ts +16 -0
- package/dist/ai/ui/prose.d.ts +1 -0
- package/dist/ai/ui/sidebar.d.ts +81 -0
- package/dist/ai/utils.d.ts +4 -0
- package/dist/assets/{editor.worker-CuBRIwi-.js → editor.worker-BmHUIVG4.js} +194 -163
- package/dist/assets/{json.worker-8ytS02vz.js → json.worker-D8bJ92nw.js} +384 -338
- package/dist/assets/{yaml.worker-DJC-VUcv.js → yaml.worker-C4gyGAko.js} +15657 -13823
- package/dist/chunks/{CodePreviewEditor-4lx3kE-w.js → CodePreviewEditor-YqQBz1YL.js} +1 -1
- package/dist/chunks/ConfirmModal-aOR4O1QE.js +79 -0
- package/dist/chunks/{FieldWrapper-Bef01EWO.js → FieldWrapper-Cszwg-4B.js} +3 -7
- package/dist/chunks/{CreateModal-BY6DLmur.js → Markdown-CM-FenNE.js} +19 -91
- package/dist/chunks/Monaco-DJ8MW-Dq.js +110 -0
- package/dist/chunks/{PageHeader-l49p1nM9.js → PageHeader-0kG_iypP.js} +67 -65
- package/dist/chunks/{Provider-Ghua9PkN.js → Provider-CDYurraE.js} +54 -20
- package/dist/chunks/{SwitchToggle-CHPP8uZQ.js → SwitchToggle-DShNdcao.js} +135 -132
- package/dist/chunks/{Table-4OHjdKdO.js → Table-DU2MW8xz.js} +5 -3
- package/dist/chunks/{Tooltip-Crxo_eU_.js → Tooltip-K5HJr4_p.js} +31 -4
- package/dist/chunks/duration-BOv8Phl8.js +17 -0
- package/dist/chunks/{editor-9_uVtUyy.js → editor-Dk1rbV75.js} +32 -18
- package/dist/chunks/focus-D_iZJTW1.js +7 -0
- package/dist/chunks/{list-qrojZZNv.js → list-CJm875m7.js} +377 -370
- package/dist/chunks/logviewer-BTKuQWzw.js +828 -0
- package/dist/chunks/memoryStore-CC91S5LP.js +152 -0
- package/dist/chunks/types-Yy0NrerF.js +11 -0
- package/dist/components/Avatar.d.ts +1 -1
- package/dist/components/Breadcrumbs.d.ts +1 -1
- package/dist/components/Dropdown.d.ts +1 -1
- package/dist/components/EmptyState.d.ts +1 -1
- package/dist/components/Indicator.d.ts +2 -2
- package/dist/components/Input.d.ts +1 -1
- package/dist/components/LetterBadge.d.ts +1 -1
- package/dist/components/MarkdownImpl.d.ts +1 -1
- package/dist/components/Provider.d.ts +16 -65
- package/dist/components/SettingRow.d.ts +1 -1
- package/dist/components/SettingsGroup.d.ts +1 -1
- package/dist/components/focus.d.ts +2 -0
- package/dist/components/keys.d.ts +12 -0
- package/dist/duration.d.ts +3 -0
- package/dist/editor/Monaco.d.ts +1 -20
- package/dist/editor/index.d.ts +2 -1
- package/dist/editor/index.js +2 -2
- package/dist/editor/yaml.d.ts +5 -0
- package/dist/engine.d.ts +98 -0
- package/dist/file-explorer/FileExplorer.d.ts +11 -2
- package/dist/file-explorer/FileExplorerContext.d.ts +1 -1
- package/dist/file-explorer/FilePreview/CodePreviewEditor.d.ts +1 -1
- package/dist/file-explorer/FilePreview/previewType.d.ts +1 -1
- package/dist/file-explorer/FileRow.d.ts +1 -1
- package/dist/file-explorer/helpers.d.ts +4 -4
- package/dist/file-explorer/index.d.ts +3 -3
- package/dist/file-explorer/index.js +613 -647
- package/dist/file-explorer/lib/types.d.ts +6 -1
- package/dist/file-explorer/lib/utils.d.ts +1 -3
- package/dist/file-explorer/useNearEnd.d.ts +1 -1
- package/dist/form/FieldWrapper.d.ts +2 -2
- package/dist/form/Fields/ResourceOptionIcon.d.ts +1 -1
- package/dist/form/Form.d.ts +4 -21
- package/dist/form/index.d.ts +11 -12
- package/dist/form/index.js +1488 -1611
- package/dist/form/lib.d.ts +6 -1
- package/dist/form/types/fieldComponentTypes.d.ts +3 -2
- package/dist/form/types/fieldTypes.d.ts +6 -20
- package/dist/form/useParsedOpts.d.ts +1 -1
- package/dist/form/utils/{slurmDuration.d.ts → duration.d.ts} +2 -2
- package/dist/{workflow → graph}/MatrixGroup.d.ts +2 -2
- package/dist/{workflow → graph}/index.d.ts +1 -1
- package/dist/{workflow → graph}/index.js +215 -180
- package/dist/{workflow → graph}/types.d.ts +3 -3
- package/dist/icons.d.ts +20 -21
- package/dist/index.d.ts +38 -40
- package/dist/index.js +347 -346
- package/dist/list/ListTable.d.ts +1 -1
- package/dist/list/ListViewControls.d.ts +2 -2
- package/dist/list/index.d.ts +9 -9
- package/dist/list/index.js +2 -2
- package/dist/logviewer/LogViewer.d.ts +1 -1
- package/dist/logviewer/index.d.ts +1 -0
- package/dist/logviewer/index.js +2 -742
- package/dist/logviewer/segments.d.ts +9 -0
- package/dist/styles/fonts.css +4 -4
- package/dist/styles/theme.css +6 -4
- package/dist/styles.css +1 -1
- package/dist/theme/index.js +2 -2
- package/package.json +38 -14
- package/LICENSE +0 -202
- package/dist/chunks/Monaco-C1POOdVv.js +0 -1046
- package/dist/editor/usesGitlab.d.ts +0 -97
- package/dist/form/Fields/BucketReadOnlyField.d.ts +0 -7
- package/dist/form/types/workflow-schema.d.ts +0 -1145
- package/dist/form/utils/pwResolver.d.ts +0 -18
- package/dist/chunks/{MarkdownImpl-Bq4QhrtA.js → MarkdownImpl-CyeTVvSt.js} +1 -1
- /package/dist/{workflow → graph}/AnnotationBanner.d.ts +0 -0
- /package/dist/{workflow → graph}/Collapse.d.ts +0 -0
- /package/dist/{workflow → graph}/DependencyGraph.d.ts +0 -0
- /package/dist/{workflow → graph}/JobSummary.d.ts +0 -0
- /package/dist/{workflow → graph}/Reveal.d.ts +0 -0
- /package/dist/{workflow → graph}/TreeView.d.ts +0 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface ChatStrings {
|
|
3
|
+
modal: {
|
|
4
|
+
cancel: string;
|
|
5
|
+
save: string;
|
|
6
|
+
loading: string;
|
|
7
|
+
};
|
|
8
|
+
shareConversation: {
|
|
9
|
+
title: string;
|
|
10
|
+
loadError: string;
|
|
11
|
+
saveSuccess: string;
|
|
12
|
+
orgAccess: string;
|
|
13
|
+
orgCanView: string;
|
|
14
|
+
allowCollaboration: string;
|
|
15
|
+
groupAccess: string;
|
|
16
|
+
noGroups: string;
|
|
17
|
+
viewOnly: string;
|
|
18
|
+
canCollaborate: string;
|
|
19
|
+
remove: string;
|
|
20
|
+
addGroups: string;
|
|
21
|
+
info: ReactNode;
|
|
22
|
+
shareButton: string;
|
|
23
|
+
};
|
|
24
|
+
blockedGroup: {
|
|
25
|
+
title: string;
|
|
26
|
+
message: string;
|
|
27
|
+
};
|
|
28
|
+
queue: {
|
|
29
|
+
remove: string;
|
|
30
|
+
};
|
|
31
|
+
activity: {
|
|
32
|
+
tokens: (input: string, output: string) => string;
|
|
33
|
+
stop: string;
|
|
34
|
+
};
|
|
35
|
+
emptyState: {
|
|
36
|
+
greeting: string | null;
|
|
37
|
+
modernSubtitle: string;
|
|
38
|
+
noProvidersTitle: string;
|
|
39
|
+
noProvidersBody: string;
|
|
40
|
+
addProvider: string;
|
|
41
|
+
sessionUnreachableTitle: (session: string) => ReactNode;
|
|
42
|
+
sessionUnreachableBody: string;
|
|
43
|
+
retry: string;
|
|
44
|
+
};
|
|
45
|
+
input: {
|
|
46
|
+
placeholder: string;
|
|
47
|
+
placeholderLoading: string;
|
|
48
|
+
placeholderNoProviders: string;
|
|
49
|
+
attachFiles: string;
|
|
50
|
+
stopGenerating: string;
|
|
51
|
+
sendMessage: string;
|
|
52
|
+
filesAttached: (count: number) => string;
|
|
53
|
+
};
|
|
54
|
+
thinking: {
|
|
55
|
+
label: string;
|
|
56
|
+
ellipsis: string;
|
|
57
|
+
thoughtFor: (duration: string) => string;
|
|
58
|
+
activity: string;
|
|
59
|
+
};
|
|
60
|
+
thread: {
|
|
61
|
+
viewOnly: string;
|
|
62
|
+
};
|
|
63
|
+
sidebar: {
|
|
64
|
+
groupToday: string;
|
|
65
|
+
groupYesterday: string;
|
|
66
|
+
groupThisWeek: string;
|
|
67
|
+
groupThisMonth: string;
|
|
68
|
+
groupOlder: string;
|
|
69
|
+
untitled: string;
|
|
70
|
+
rename: string;
|
|
71
|
+
share: string;
|
|
72
|
+
delete: string;
|
|
73
|
+
sharedWithYou: string;
|
|
74
|
+
moreOptions: string;
|
|
75
|
+
openSidebar: string;
|
|
76
|
+
closeSidebar: string;
|
|
77
|
+
newChat: string;
|
|
78
|
+
attachments: string;
|
|
79
|
+
connectTools: string;
|
|
80
|
+
manageProviders: string;
|
|
81
|
+
noConversations: string;
|
|
82
|
+
deleteTitle: string;
|
|
83
|
+
deleteBody: string;
|
|
84
|
+
deleteAction: string;
|
|
85
|
+
renameTitle: string;
|
|
86
|
+
renameAction: string;
|
|
87
|
+
renameLabel: string;
|
|
88
|
+
renamePlaceholder: string;
|
|
89
|
+
};
|
|
90
|
+
attachmentUpload: {
|
|
91
|
+
fileTooLarge: (maxSize: string) => string;
|
|
92
|
+
maxFilesAllowed: (max: number) => string;
|
|
93
|
+
remove: string;
|
|
94
|
+
dropFilesHere: string;
|
|
95
|
+
addFiles: string;
|
|
96
|
+
};
|
|
97
|
+
attachmentManager: {
|
|
98
|
+
title: string;
|
|
99
|
+
empty: string;
|
|
100
|
+
download: string;
|
|
101
|
+
delete: string;
|
|
102
|
+
loadMore: string;
|
|
103
|
+
loading: string;
|
|
104
|
+
};
|
|
105
|
+
branch: {
|
|
106
|
+
previous: string;
|
|
107
|
+
next: string;
|
|
108
|
+
};
|
|
109
|
+
chrome: {
|
|
110
|
+
searchPlaceholder: string;
|
|
111
|
+
searchLabel: string;
|
|
112
|
+
noMatches: string;
|
|
113
|
+
download: string;
|
|
114
|
+
exportError: string;
|
|
115
|
+
jumpToLatest: string;
|
|
116
|
+
};
|
|
117
|
+
messageMeta: {
|
|
118
|
+
stopped: string;
|
|
119
|
+
showMore: string;
|
|
120
|
+
showLess: string;
|
|
121
|
+
tokens: (total: number) => string;
|
|
122
|
+
tokensBreakdown: (prompt: number, completion: number) => string;
|
|
123
|
+
copy: string;
|
|
124
|
+
edit: string;
|
|
125
|
+
regenerate: string;
|
|
126
|
+
retry: string;
|
|
127
|
+
editPlaceholder: string;
|
|
128
|
+
cancel: string;
|
|
129
|
+
send: string;
|
|
130
|
+
};
|
|
131
|
+
permissions: {
|
|
132
|
+
choose: string;
|
|
133
|
+
readOnly: string;
|
|
134
|
+
acceptEdits: string;
|
|
135
|
+
bypassPermissions: string;
|
|
136
|
+
plan: string;
|
|
137
|
+
readOnlyHint: string;
|
|
138
|
+
acceptEditsHint: string;
|
|
139
|
+
bypassPermissionsHint: string;
|
|
140
|
+
planHint: string;
|
|
141
|
+
};
|
|
142
|
+
agentTranscript: {
|
|
143
|
+
showMore: string;
|
|
144
|
+
showLess: string;
|
|
145
|
+
running: string;
|
|
146
|
+
done: string;
|
|
147
|
+
failed: string;
|
|
148
|
+
interrupted: string;
|
|
149
|
+
noOutput: string;
|
|
150
|
+
diffTruncated: string;
|
|
151
|
+
moreLines: string;
|
|
152
|
+
allowOnce: string;
|
|
153
|
+
allowDirectory: string;
|
|
154
|
+
deny: string;
|
|
155
|
+
denyWithFeedback: string;
|
|
156
|
+
feedbackPlaceholder: string;
|
|
157
|
+
send: string;
|
|
158
|
+
answered: string;
|
|
159
|
+
writeOwnAnswer: string;
|
|
160
|
+
subagent: string;
|
|
161
|
+
tasks: string;
|
|
162
|
+
planPending: string;
|
|
163
|
+
approvalPending: string;
|
|
164
|
+
approvalOptions: string;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
export declare const defaultChatStrings: ChatStrings;
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
export interface ChatUser {
|
|
2
|
+
id: string;
|
|
3
|
+
username: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
avatarUrl?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AttachmentRef {
|
|
8
|
+
id: string;
|
|
9
|
+
filename: string;
|
|
10
|
+
contentType: string;
|
|
11
|
+
size: number;
|
|
12
|
+
uploadedAt: string;
|
|
13
|
+
conversationId?: string;
|
|
14
|
+
messageId?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface FunctionCall {
|
|
17
|
+
name: string;
|
|
18
|
+
arguments: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ToolCall {
|
|
21
|
+
function: FunctionCall;
|
|
22
|
+
id?: string;
|
|
23
|
+
index?: number;
|
|
24
|
+
type?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ToolCallDelta {
|
|
27
|
+
index?: number;
|
|
28
|
+
id?: string;
|
|
29
|
+
type?: string;
|
|
30
|
+
function?: {
|
|
31
|
+
name?: string;
|
|
32
|
+
arguments?: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface TokenUsage {
|
|
36
|
+
prompt_tokens?: number;
|
|
37
|
+
completion_tokens?: number;
|
|
38
|
+
total_tokens?: number;
|
|
39
|
+
}
|
|
40
|
+
export type ToolCallStatus = 'running' | 'ok' | 'error';
|
|
41
|
+
export interface TextPart {
|
|
42
|
+
kind: 'text';
|
|
43
|
+
text: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ReasoningPart {
|
|
46
|
+
kind: 'reasoning';
|
|
47
|
+
text: string;
|
|
48
|
+
durationMs?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface ToolCallPart {
|
|
51
|
+
kind: 'tool_call';
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
args: string;
|
|
55
|
+
status: ToolCallStatus;
|
|
56
|
+
result?: string;
|
|
57
|
+
startLine?: number;
|
|
58
|
+
}
|
|
59
|
+
export type SubagentStatus = 'running' | 'done' | 'failed';
|
|
60
|
+
export interface SubagentPart {
|
|
61
|
+
kind: 'subagent';
|
|
62
|
+
id: string;
|
|
63
|
+
status: SubagentStatus;
|
|
64
|
+
agentType?: string;
|
|
65
|
+
color?: string;
|
|
66
|
+
background?: boolean;
|
|
67
|
+
description?: string;
|
|
68
|
+
actions?: string[];
|
|
69
|
+
summary?: string;
|
|
70
|
+
report?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface ApprovalOption {
|
|
73
|
+
label: string;
|
|
74
|
+
description?: string;
|
|
75
|
+
}
|
|
76
|
+
export type ApprovalAnswerValue = {
|
|
77
|
+
kind: 'confirm';
|
|
78
|
+
allowed: boolean;
|
|
79
|
+
allowDir?: boolean;
|
|
80
|
+
denyMessage?: string;
|
|
81
|
+
} | {
|
|
82
|
+
kind: 'ask';
|
|
83
|
+
text: string;
|
|
84
|
+
chat?: boolean;
|
|
85
|
+
};
|
|
86
|
+
export interface ApprovalPart {
|
|
87
|
+
kind: 'approval';
|
|
88
|
+
id: string;
|
|
89
|
+
approvalKind: 'confirm' | 'ask' | 'plan';
|
|
90
|
+
toolName?: string;
|
|
91
|
+
command?: string;
|
|
92
|
+
reason?: string;
|
|
93
|
+
agent?: string;
|
|
94
|
+
mode?: string;
|
|
95
|
+
question?: string;
|
|
96
|
+
header?: string;
|
|
97
|
+
multiSelect?: boolean;
|
|
98
|
+
options?: ApprovalOption[];
|
|
99
|
+
plan?: string;
|
|
100
|
+
canAllowDirectory?: boolean;
|
|
101
|
+
resolved?: boolean;
|
|
102
|
+
answer?: string;
|
|
103
|
+
}
|
|
104
|
+
export interface NoticePart {
|
|
105
|
+
kind: 'notice' | 'warning' | 'error';
|
|
106
|
+
text: string;
|
|
107
|
+
detail?: string;
|
|
108
|
+
}
|
|
109
|
+
export type TodoStatus = 'pending' | 'in_progress' | 'completed';
|
|
110
|
+
export interface TodoItem {
|
|
111
|
+
content: string;
|
|
112
|
+
status: TodoStatus;
|
|
113
|
+
activeForm?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface TodoSnapshotPart {
|
|
116
|
+
kind: 'todo_snapshot';
|
|
117
|
+
todos: TodoItem[];
|
|
118
|
+
}
|
|
119
|
+
export type MessagePart = TextPart | ReasoningPart | ToolCallPart | SubagentPart | ApprovalPart | NoticePart | TodoSnapshotPart;
|
|
120
|
+
export type MessagePartKind = MessagePart['kind'];
|
|
121
|
+
export type PseudoUserKind = 'command-input' | 'shell-input' | 'compaction';
|
|
122
|
+
export interface ChatMessage {
|
|
123
|
+
id: string;
|
|
124
|
+
role: string;
|
|
125
|
+
content?: string | null | undefined;
|
|
126
|
+
parentId?: string | null | undefined;
|
|
127
|
+
model?: string | null | undefined;
|
|
128
|
+
providerId?: string | null | undefined;
|
|
129
|
+
reasoning?: string | undefined;
|
|
130
|
+
reasoningDuration?: number | undefined;
|
|
131
|
+
responsesOutput?: unknown[] | null | undefined;
|
|
132
|
+
stopped?: boolean | undefined;
|
|
133
|
+
timestamp?: string | undefined;
|
|
134
|
+
tokensUsed?: TokenUsage | undefined;
|
|
135
|
+
toolCallId?: string | undefined;
|
|
136
|
+
toolCalls?: ToolCall[] | null | undefined;
|
|
137
|
+
attachments?: AttachmentRef[] | null | undefined;
|
|
138
|
+
author?: ChatUser | undefined;
|
|
139
|
+
conversationId?: string | undefined;
|
|
140
|
+
error?: string | null | undefined;
|
|
141
|
+
parts?: MessagePart[] | null | undefined;
|
|
142
|
+
pseudo?: PseudoUserKind | null | undefined;
|
|
143
|
+
}
|
|
144
|
+
export interface Conversation {
|
|
145
|
+
id: string;
|
|
146
|
+
messages: ChatMessage[];
|
|
147
|
+
title?: string | null;
|
|
148
|
+
activeBranchId?: string | null;
|
|
149
|
+
branches?: string[] | null;
|
|
150
|
+
canCollaborate?: boolean;
|
|
151
|
+
createdAt?: string;
|
|
152
|
+
isOwner?: boolean;
|
|
153
|
+
updatedAt?: string | null;
|
|
154
|
+
}
|
|
155
|
+
export interface ConversationSummary {
|
|
156
|
+
id: string;
|
|
157
|
+
canCollaborate: boolean;
|
|
158
|
+
createdAt: string;
|
|
159
|
+
isOwner: boolean;
|
|
160
|
+
messageCount: number;
|
|
161
|
+
activeBranchId?: string;
|
|
162
|
+
preview?: string;
|
|
163
|
+
title?: string;
|
|
164
|
+
updatedAt?: string;
|
|
165
|
+
}
|
|
166
|
+
export interface ChatModel {
|
|
167
|
+
id: string;
|
|
168
|
+
object: string;
|
|
169
|
+
created: number;
|
|
170
|
+
owned_by: string;
|
|
171
|
+
tool_calling_mode: 'native' | 'emulated' | 'none';
|
|
172
|
+
name?: string;
|
|
173
|
+
provider?: string;
|
|
174
|
+
provider_name?: string;
|
|
175
|
+
provider_owner?: string;
|
|
176
|
+
provider_type?: string;
|
|
177
|
+
context_window?: number;
|
|
178
|
+
input_rate?: number;
|
|
179
|
+
output_rate?: number;
|
|
180
|
+
reasoning_efforts?: string[] | null;
|
|
181
|
+
supports_responses?: boolean;
|
|
182
|
+
supports_usage?: boolean;
|
|
183
|
+
usage_not_supported?: boolean;
|
|
184
|
+
}
|
|
185
|
+
export interface UnreachableSession {
|
|
186
|
+
name: string;
|
|
187
|
+
owner: string;
|
|
188
|
+
}
|
|
189
|
+
export type CspKind = 'openai' | 'anthropic' | 'google' | 'azure' | 'aws' | 'other';
|
|
190
|
+
export interface ProviderInfo {
|
|
191
|
+
id: string;
|
|
192
|
+
name: string;
|
|
193
|
+
displayName?: string;
|
|
194
|
+
user: string;
|
|
195
|
+
cspKind: CspKind;
|
|
196
|
+
platformLabel?: string;
|
|
197
|
+
status: string;
|
|
198
|
+
group?: string;
|
|
199
|
+
groupBlocked?: boolean;
|
|
200
|
+
}
|
|
201
|
+
export interface Allocation {
|
|
202
|
+
name: string;
|
|
203
|
+
total: number;
|
|
204
|
+
used?: number;
|
|
205
|
+
}
|
|
206
|
+
export interface ChatNavigation {
|
|
207
|
+
toConversation(id: string): void;
|
|
208
|
+
toNewChat(): void;
|
|
209
|
+
toAttachments(): void;
|
|
210
|
+
}
|
|
211
|
+
export interface ChatNotify {
|
|
212
|
+
success(message: string): void;
|
|
213
|
+
error(message: string): void;
|
|
214
|
+
info(message: string): void;
|
|
215
|
+
}
|
|
216
|
+
export type SharePermissionLevel = 'view' | 'collaborate';
|
|
217
|
+
export interface SharePermission {
|
|
218
|
+
id?: string;
|
|
219
|
+
team?: string | null;
|
|
220
|
+
teamName?: string | null;
|
|
221
|
+
permission: SharePermissionLevel;
|
|
222
|
+
entireOrganization: boolean;
|
|
223
|
+
}
|
|
224
|
+
export interface ShareGroup {
|
|
225
|
+
id: string;
|
|
226
|
+
name: string;
|
|
227
|
+
}
|
|
228
|
+
export type ChatLinkTarget = {
|
|
229
|
+
kind: 'conversation';
|
|
230
|
+
id: string;
|
|
231
|
+
} | {
|
|
232
|
+
kind: 'attachments';
|
|
233
|
+
} | {
|
|
234
|
+
kind: 'external';
|
|
235
|
+
href: string;
|
|
236
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export interface DropdownOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
/** A second line under the label, for choices that need explaining. */
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Rendered as a plain option; the trailing checkmark and bold never apply. */
|
|
8
|
+
muted?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface DropdownProps {
|
|
11
|
+
options: DropdownOption[];
|
|
12
|
+
value: string;
|
|
13
|
+
onChange: (value: string) => void;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** 'bare' drops the input background and text colour, for a trigger that
|
|
17
|
+
* reads as a chip or as toolbar text. */
|
|
18
|
+
variant?: 'default' | 'bare';
|
|
19
|
+
/** Leading content in the trigger, before the label. */
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
/** Shown in the trigger instead of the selected option's label. */
|
|
22
|
+
valueLabel?: string;
|
|
23
|
+
ariaLabel?: string;
|
|
24
|
+
/** Tooltip on the closed trigger. */
|
|
25
|
+
hint?: string;
|
|
26
|
+
wrapperClassName?: string;
|
|
27
|
+
textBoxClassName?: string;
|
|
28
|
+
listClassName?: string;
|
|
29
|
+
}
|
|
30
|
+
export default function Dropdown({ options, value, onChange, placeholder, disabled, variant, icon, valueLabel, ariaLabel, hint, wrapperClassName, textBoxClassName, listClassName, }: DropdownProps): import("react").JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ControlsConfig } from 'streamdown';
|
|
2
|
+
interface MarkdownProps {
|
|
3
|
+
children: string;
|
|
4
|
+
isStreaming?: boolean;
|
|
5
|
+
controls?: ControlsConfig;
|
|
6
|
+
}
|
|
7
|
+
export default function Markdown({ children, isStreaming, controls }: MarkdownProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type NoticeTone = 'neutral' | 'info' | 'warning' | 'danger';
|
|
3
|
+
/** A standing condition on the surface: a full-width bar under the header
|
|
4
|
+
* with a title, an explanation, and the one thing the reader can do about it. */
|
|
5
|
+
export declare function NoticeBar({ tone, title, children, action, onAction, testId, }: {
|
|
6
|
+
tone: NoticeTone;
|
|
7
|
+
title: string;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
action?: string;
|
|
10
|
+
onAction?: () => void;
|
|
11
|
+
testId?: string;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
/** An inline notice next to the composer. One with no dismiss states a fact
|
|
14
|
+
* that is still true; one with a dismiss is a message the reader can put away. */
|
|
15
|
+
export declare function NoticeCard({ tone, children, onDismiss, dismissLabel, testId, }: {
|
|
16
|
+
tone?: NoticeTone;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
onDismiss?: () => void;
|
|
19
|
+
dismissLabel?: string;
|
|
20
|
+
testId?: string;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ghostButtonClasses = "inline-flex items-center gap-1.5 h-8 px-3 rounded-md text-sm text-(--theme-muted-text-color,#6c757d) hover:text-(--theme-app,#000000) hover:bg-(--theme-hover,#f3f4f6) transition-colors";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface HastText {
|
|
2
|
+
type: 'text';
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
interface HastElement {
|
|
6
|
+
type: 'element';
|
|
7
|
+
tagName: string;
|
|
8
|
+
properties?: Record<string, unknown>;
|
|
9
|
+
children: HastNode[];
|
|
10
|
+
}
|
|
11
|
+
type HastNode = HastText | HastElement | {
|
|
12
|
+
type: string;
|
|
13
|
+
children?: HastNode[];
|
|
14
|
+
};
|
|
15
|
+
export declare function rehypeCodeBreaks(): (tree: HastNode) => void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const chatProseClasses: string;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type OpenMenu, type RowMenuItem } from '../../list/index.js';
|
|
3
|
+
export declare const SIDEBAR_RAIL_WIDTH_PX = 48;
|
|
4
|
+
export declare const SIDEBAR_DEFAULT_WIDTH_PX = 256;
|
|
5
|
+
/** The column a conversation list lives in: it animates between its width
|
|
6
|
+
* and a rail, unless a drag is setting the width right now. */
|
|
7
|
+
export declare function SidebarPanel({ collapsed, width, railWidth, resizing, label, className, style, children, }: {
|
|
8
|
+
collapsed: boolean;
|
|
9
|
+
width?: number;
|
|
10
|
+
railWidth?: number;
|
|
11
|
+
resizing?: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
export declare function SidebarToggle({ collapsed, onToggle, openLabel, closeLabel, className, }: {
|
|
18
|
+
collapsed: boolean;
|
|
19
|
+
onToggle: () => void;
|
|
20
|
+
openLabel: string;
|
|
21
|
+
closeLabel: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
export declare function SidebarGroupHeading({ children, tone, testId, }: {
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
/** 'attention' is for the group the reader is being asked to act on. */
|
|
27
|
+
tone?: 'default' | 'attention';
|
|
28
|
+
testId?: string;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
30
|
+
/** One entry in the list: the row highlights while it is the open one or
|
|
31
|
+
* while its menu is up, and the menu opens from its button or a right-click. */
|
|
32
|
+
export declare function SidebarRow({ selected, menuItems, openMenu, className, children, }: {
|
|
33
|
+
selected: boolean;
|
|
34
|
+
menuItems: RowMenuItem[];
|
|
35
|
+
openMenu: OpenMenu;
|
|
36
|
+
className?: string;
|
|
37
|
+
children: ReactNode;
|
|
38
|
+
}): import("react").JSX.Element;
|
|
39
|
+
/** One entry in the collapsed rail: a square the size of the toggle, with the
|
|
40
|
+
* same highlight as a row, holding whatever stands in for the item. */
|
|
41
|
+
export declare function SidebarRailItem({ selected, label, onSelect, testId, tooltipProps, children, }: {
|
|
42
|
+
selected: boolean;
|
|
43
|
+
label: string;
|
|
44
|
+
onSelect: () => void;
|
|
45
|
+
testId?: string;
|
|
46
|
+
tooltipProps?: Record<string, string>;
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
}): import("react").JSX.Element;
|
|
49
|
+
export declare function RenameDialog({ open, title, label, placeholder, confirmLabel, value, onChange, onConfirm, onClose, }: {
|
|
50
|
+
open: boolean;
|
|
51
|
+
title: string;
|
|
52
|
+
label: string;
|
|
53
|
+
placeholder: string;
|
|
54
|
+
confirmLabel: string;
|
|
55
|
+
value: string;
|
|
56
|
+
onChange: (value: string) => void;
|
|
57
|
+
onConfirm: () => void;
|
|
58
|
+
onClose: () => void;
|
|
59
|
+
}): import("react").JSX.Element;
|
|
60
|
+
export interface RowDialogStrings<T> {
|
|
61
|
+
deleteTitle: string;
|
|
62
|
+
deleteBody: (item: T) => ReactNode;
|
|
63
|
+
deleteAction: string;
|
|
64
|
+
renameTitle: string;
|
|
65
|
+
renameLabel: string;
|
|
66
|
+
renamePlaceholder: string;
|
|
67
|
+
renameAction: string;
|
|
68
|
+
}
|
|
69
|
+
/** The delete confirmation and rename dialog every list of rows needs, with
|
|
70
|
+
* the item they are about. A handler that returns false keeps its dialog
|
|
71
|
+
* open, for a refusal the reader should see before trying again. */
|
|
72
|
+
export declare function useRowDialogs<T>({ strings, nameOf, onDelete, onRename, }: {
|
|
73
|
+
strings: RowDialogStrings<T>;
|
|
74
|
+
nameOf: (item: T) => string;
|
|
75
|
+
onDelete: (item: T) => Promise<boolean | undefined> | boolean | undefined;
|
|
76
|
+
onRename: (item: T, name: string) => Promise<boolean | undefined> | boolean | undefined;
|
|
77
|
+
}): {
|
|
78
|
+
requestDelete: (item: T) => void;
|
|
79
|
+
requestRename: (item: T) => void;
|
|
80
|
+
dialogs: ReactNode;
|
|
81
|
+
};
|